Package org.apache.pivot.wtkx

Examples of org.apache.pivot.wtkx.WTKXSerializer.readObject()


    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        wtkxSerializer.put(APPLICATION_KEY, this);

        window = (Window)wtkxSerializer.readObject(this, "search_demo.wtkx");
        wtkxSerializer.bind(this, SearchDemo.class);

        searchButton.setButtonData(searchImage);
        window.open(display);
View Full Code Here


            throw new RuntimeException(exception);
        }

        WTKXSerializer wtkxSerializer = new WTKXSerializer(resources);
        try {
            content = (Component)wtkxSerializer.readObject(this, "event_logger_skin.wtkx");
        } catch (IOException exception) {
            throw new RuntimeException(exception);
        } catch (SerializationException exception) {
            throw new RuntimeException(exception);
        }
View Full Code Here

        // Load the alert content
        WTKXSerializer wtkxSerializer = new WTKXSerializer();

        Component content;
        try {
            content = (Component)wtkxSerializer.readObject(this, "terra_alert_skin.wtkx");
        } catch(Exception exception) {
            throw new RuntimeException(exception);
        }

        alert.setContent(content);
View Full Code Here

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        Resources resources = new Resources(getClass().getName());
        WTKXSerializer wtkxSerializer = new WTKXSerializer(resources);
        window = (Window)wtkxSerializer.readObject(this, "resolve_test.wtkx");
        window.open(display);
    }

    @Override
    public boolean shutdown(boolean optional) {
View Full Code Here

    @WTKX private Menu.Section hoursSection;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = (Window)wtkxSerializer.readObject(this, "context_menu_test.wtkx");
        wtkxSerializer.bind(this, ContextMenuTest.class);

        window.setMenuHandler(new MenuHandler.Adapter() {
            @Override
            public boolean configureContextMenu(Component component, Menu menu, int x, int y) {
View Full Code Here

    private Window window = null;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = (Window)wtkxSerializer.readObject(this, "data_binding_test.wtkx");
        window.open(display);

        HashMap<String, Object> context = new HashMap<String, Object>();
        context.put("id1", "1");
        context.put("id2", "2");
View Full Code Here

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        frame = new Frame((Component)wtkxSerializer.readObject(getClass().getResource("text_area_test.wtkx")));
        frame.setTitle("TextArea Test");
        frame.setPreferredSize(640, 480);
        frame.setLocation(80, 40);
        frame.open(display);
View Full Code Here

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();

        window = (Window)wtkxSerializer.readObject(this, "calendar_test.wtkx");
        wtkxSerializer.bind(this, CalendarTest.class);

        Filter<CalendarDate> todayFilter = new Filter<CalendarDate>() {
            @Override
            public boolean include(CalendarDate date) {
View Full Code Here

        };

        Action.getNamedActions().put("buttonAction", action);

        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        frame = new Frame((Component)wtkxSerializer.readObject(getClass().getResource("spinner_focus_test.wtkx")));
        frame.setTitle("Spinner Focus Test");
        frame.open(display);

        Spinner spinner = (Spinner)wtkxSerializer.get("spinner");
        spinner.requestFocus();
View Full Code Here

        frame1.setLocation(50, 50);
        frame1.setPreferredSize(320, 240);
        frame1.open(display);

        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        frame2 = (Frame)wtkxSerializer.readObject(this, "menu_bar_test.wtkx");
        wtkxSerializer.bind(this, MenuBarTest.class);

        MenuHandler menuHandler = new MenuHandler.Adapter() {
            @Override
            public void configureMenuBar(Component component, MenuBar menuBar) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.