Examples of WTKXSerializer


Examples of org.apache.pivot.wtkx.WTKXSerializer

        private Border colorBorder = null;

        @Override
        public Vote previewExpandedChange(Rollup rollup) {
            if (component == null) {
                WTKXSerializer wtkxSerializer = new WTKXSerializer();
                try {
                    component = (Component)wtkxSerializer.readObject(this, "spinners.wtkx");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }

                numericSpinner = (Spinner)wtkxSerializer.get("numericSpinner");
                dateSpinner = (Spinner)wtkxSerializer.get("dateSpinner");

                redSlider = (Slider)wtkxSerializer.get("redSlider");
                greenSlider = (Slider)wtkxSerializer.get("greenSlider");
                blueSlider = (Slider)wtkxSerializer.get("blueSlider");
                colorBorder = (Border)wtkxSerializer.get("colorBorder");

                rollup.setContent(component);

                initializeNumericSpinner(numericSpinner);
                initializeDateSpinner(dateSpinner);
View Full Code Here

Examples of org.apache.pivot.wtkx.WTKXSerializer

        private TableView customTableView = null;

        @Override
        public Vote previewExpandedChange(Rollup rollup) {
            if (component == null) {
                WTKXSerializer wtkxSerializer = new WTKXSerializer();
                try {
                    component = (Component)wtkxSerializer.readObject(this, "tables.wtkx");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }

                sortableTableView = (TableView)wtkxSerializer.get("sortableTableView");
                customTableView = (TableView)wtkxSerializer.get("customTableView");

                rollup.setContent(component);

                // Set table header data
                TableView.ColumnSequence columns = sortableTableView.getColumns();
View Full Code Here

Examples of org.apache.pivot.wtkx.WTKXSerializer

    @WTKX private PushButton openSheetButton = null;

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

        window = (Window)wtkxSerializer.readObject(getClass().getResource("file_browsing.wtkx"));
        wtkxSerializer.bind(this, FileBrowsing.class);

        openSheetButton.getButtonPressListeners().add(new ButtonPressListener() {
            @Override
            public void buttonPressed(Button button) {
                Button selection = fileBrowserSheetModeGroup.getSelection();
View Full Code Here

Examples of org.apache.pivot.wtkx.WTKXSerializer

                    // executes because this is a potentially time-consuming
                    // operation
                    inputStream = new MonitoredInputStream(new BufferedInputStream(url.openStream()));

                    if (url.getFile().endsWith("wtkd")) {
                        WTKXSerializer serializer = new WTKXSerializer();
                        image = (Drawing)serializer.readObject(inputStream);
                    } else {
                        BufferedImageSerializer serializer = new BufferedImageSerializer();
                        BufferedImage bufferedImage = serializer.readObject(inputStream);
                        image = new Picture(bufferedImage);
                    }
                } finally {
                    if (inputStream != null) {
                        inputStream.close();
View Full Code Here

Examples of org.apache.pivot.wtkx.WTKXSerializer

    public MenuBars() {
        Action.getNamedActions().put("fileNew", new Action() {
            @Override
            public void perform() {
                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

Examples of org.apache.pivot.wtkx.WTKXSerializer

    }

    @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(FileBrowserSheet.Mode.OPEN);

        window.open(display);
    }
View Full Code Here

Examples of org.apache.pivot.wtkx.WTKXSerializer

            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

Examples of org.apache.pivot.wtkx.WTKXSerializer

    private ListView listView = null;
    private Label loadingLabel = null;

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

        listView = (ListView)wtkxSerializer.get("listView");
        loadingLabel = (Label)wtkxSerializer.get("loadingLabel");

        // Execute the query:
        // http://pipes.yahoo.com/pipes/pipe.run?_id=43115761f2da5af5341ae2e56a93d646&_render=json
        GetQuery getQuery = new GetQuery("pipes.yahoo.com", "/pipes/pipe.run");
        getQuery.getParameters().put("_id", "43115761f2da5af5341ae2e56a93d646");
View Full Code Here

Examples of org.apache.pivot.wtkx.WTKXSerializer

    @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, "demo.wtkx");
        tableView = (TableView)wtkxSerializer.get("tableView");

        TableViewRowEditor tableViewRowEditor = new TableViewRowEditor();
        tableViewRowEditor.setEditEffect(CardPaneSkin.SelectionChangeEffect.HORIZONTAL_SLIDE);
        tableView.setRowEditor(tableViewRowEditor);
View Full Code Here

Examples of org.apache.pivot.wtkx.WTKXSerializer

            }
        };

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

        action.setEnabled(false);
    }
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.