Package org.apache.pivot.wtkx

Examples of org.apache.pivot.wtkx.WTKXSerializer$Attribute


    public MenuBars() {
        Action.getNamedActions().put("fileNew", new Action() {
            @Override
            public void perform(Component source) {
                WTKXSerializer wtkxSerializer = new WTKXSerializer();
                Component tab;
                try {
                    tab = new Border((Component)wtkxSerializer.readObject(this, "document.wtkx"));

                    TextInput textInput1 = (TextInput)wtkxSerializer.get("textInput1");
                    textInput1.setMenuHandler(menuHandler);

                    TextInput textInput2 = (TextInput)wtkxSerializer.get("textInput2");
                    textInput2.setMenuHandler(menuHandler);

                    PushButton pushButton = (PushButton)wtkxSerializer.get("pushButton");
                    pushButton.setMenuHandler(menuHandler);
                } catch (IOException exception) {
                    throw new RuntimeException(exception);
                } catch (SerializationException exception) {
                    throw new RuntimeException(exception);
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, "menu_bars.wtkx");

        tabPane = (TabPane)wtkxSerializer.get("tabPane");

        fileBrowserSheet = new FileBrowserSheet();

        window.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, "context_menus.wtkx");
        window.setMenuHandler(menuHandler);

        window.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, "menu_buttons.wtkx");
        colorListButton = (ListButton)wtkxSerializer.get("colorListButton");
        imageView = (ImageView)wtkxSerializer.get("imageView");

        drawing = new Drawing();

        Rectangle borderRectangle = new Rectangle();
        borderRectangle.setSize(MAX_X, MAX_Y);
View Full Code Here

            throw new RuntimeException(exception);
        } catch (SerializationException exception) {
            throw new RuntimeException(exception);
        }

        WTKXSerializer wtkxSerializer = new WTKXSerializer(resources);

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

        fileBrowserSheet.setContent(content);

        wtkxSerializer.bind(this, TerraFileBrowserSheetSkin.class);

        saveAsTextInput.getTextInputTextListeners().add(new TextInputTextListener() {
            @Override
            public void textChanged(TextInput textInput) {
                updateOKButtonState();
View Full Code Here

        if (language != null) {
            Locale.setDefault(new Locale(language));
        }

        Resources resources = new Resources(StockTrackerWindow.class.getName());
        WTKXSerializer wtkxSerializer = new WTKXSerializer(resources);
        window = (StockTrackerWindow)wtkxSerializer.readObject(this, "stock_tracker_window.wtkx");
        window.open(display);
    }
View Full Code Here

    private FileList fileList = null;

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

        fileList = new FileList();
        fileTableView.setTableData(fileList);

        fileList.getListListeners().add(new ListListener.Adapter<File>() {
View Full Code Here

    @WTKX private PushButton pasteFilesButton;

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

        // Text
        label.setDragSource(new DragSource() {
            private LocalManifest content = null;
View Full Code Here

        cancelImage = Image.load(getClass().getResource("bullet_cross.png"));
    }

    @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);

        termTextInput.requestFocus();
View Full Code Here

            throw new RuntimeException(exception);
        } catch (SerializationException exception) {
            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);
        }

        eventLogger.add(content);

        declaredEventsTreeView = wtkxSerializer.getValue("declaredEventsTreeView");
        firedEventsTableView = wtkxSerializer.getValue("firedEventsTableView");

        // Propagate check state upwards or downwards as necessary
        declaredEventsTreeView.getTreeViewNodeStateListeners().add(new TreeViewNodeStateListener() {
            @Override
            public void nodeCheckStateChanged(TreeView treeView, Path path,
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtkx.WTKXSerializer$Attribute

Copyright © 2018 www.massapicom. 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.