Package org.apache.pivot.beans

Examples of org.apache.pivot.beans.BXMLSerializer


        return false;
    }

    public Window load(String fileName)
        throws SerializationException, IOException {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        return (Window)bxmlSerializer.readObject(Windows.class, fileName);
    }
View Full Code Here


    }

    public Window getWindow(final Window ownerArgument) {
        this.owner = ownerArgument;
        final BXMLSerializer bxmlSerializer = new BXMLSerializer();
        try {
            result = (Dialog)bxmlSerializer.readObject(Pivot714.class.getResource("pivot_714.bxml"));
        } catch (IOException e) {
            e.printStackTrace();
        } catch (SerializationException e) {
            e.printStackTrace();
        }

        final ListButton motif = (ListButton)bxmlSerializer.getNamespace().get("motif");

        ArrayList<String> al = new ArrayList<String>();
        al.add("One");
        al.add("Two");
        motif.setListData(al);

        CalendarButton cbDate = (CalendarButton)bxmlSerializer.getNamespace().get("date");
        dcl = (new DialogCloseListener() {
            @Override
            public void dialogClosed(Dialog dialog, boolean modal) {
                // empty block
            }
View Full Code Here

        }

        @Override
        public Vote previewExpandedChange(Rollup rollup) {
            if (this.component == null) {
                BXMLSerializer bxmlSerializer = new BXMLSerializer();
                try {
                    this.component = (Component)bxmlSerializer.readObject(KitchenSink.class, "navigation.bxml");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }
View Full Code Here

        }

        @Override
        public Vote previewExpandedChange(Rollup rollup) {
            if (this.component == null) {
                BXMLSerializer bxmlSerializer = new BXMLSerializer();
                try {
                    this.component = (Component)bxmlSerializer.readObject(KitchenSink.class, "splitters.bxml");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }
View Full Code Here

    private Window window = null;

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window)bxmlSerializer.readObject(TablePaneTest.class, "table_pane_test.bxml");
        window.open(display);
    }
View Full Code Here

    private Frame frame = null;

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        frame = new Frame((Component)bxmlSerializer.readObject(getClass().getResource("form_test.bxml")));
        frame.setTitle("Form Test");
        frame.setPreferredSize(480, 360);
        frame.open(display);
    }
View Full Code Here

                        // Update the image
                        MenusRollupStateHandler.this.menuImageView.setImage(image);
                    }
                });

                BXMLSerializer bxmlSerializer = new BXMLSerializer();
                try {
                    this.component = (Component)bxmlSerializer.readObject(KitchenSink.class, "menus.bxml");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }

                this.menuImageView = (ImageView)bxmlSerializer.getNamespace().get("menuImageView");
                this.helpAboutMenuItem  = (Menu.Item)bxmlSerializer.getNamespace().get("helpAboutMenuItem");

                rollup.setContent(this.component);

                try {
                    this.menuSection = (Menu.Section)bxmlSerializer.readObject(KitchenSink.class, "menu_section.bxml");
                    this.imageMenuGroup = (ButtonGroup)bxmlSerializer.getNamespace().get("imageMenuGroup");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }
View Full Code Here

        activityIndicator = (ActivityIndicator)namespace.get("activityIndicator");
        activityIndicatorBoxPane = (BoxPane)namespace.get("activityIndicatorBoxPane");

        // Load the add/edit sheet
        try {
            BXMLSerializer bxmlSerializer = new BXMLSerializer();
            expenseSheet = (ExpenseSheet)bxmlSerializer.readObject(ExpenseSheet.class,
                "expense_sheet.bxml", true);
        } catch (IOException exception) {
            throw new RuntimeException(exception);
        } catch (SerializationException exception) {
            throw new RuntimeException(exception);
View Full Code Here

    public static final String WINDOW_TITLE = "XML Viewer";

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

        window = (Window)bxmlSerializer.readObject(XMLViewer.class, "xml_viewer.bxml");
        bxmlSerializer.bind(this);

        Label prompt = new Label("Drag or paste XML here");
        prompt.getStyles().put("horizontalAlignment", HorizontalAlignment.CENTER);
        prompt.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
        promptDecorator.setOverlay(prompt);
View Full Code Here

        }

        @Override
        public Vote previewExpandedChange(Rollup rollup) {
            if (this.component == null) {
                BXMLSerializer bxmlSerializer = new BXMLSerializer();
                try {
                    this.component = (Component)bxmlSerializer.readObject(KitchenSink.class, "meters.bxml");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }

                this.activityIndicator1 = (ActivityIndicator)bxmlSerializer.getNamespace().get("activityIndicator1");
                this.activityIndicator2 = (ActivityIndicator)bxmlSerializer.getNamespace().get("activityIndicator2");
                this.activityIndicator3 = (ActivityIndicator)bxmlSerializer.getNamespace().get("activityIndicator3");

                rollup.setContent(this.component);

                KitchenSink.this.metersRollup.getRollupStateListeners().add(new RollupStateListener() {
                    @Override
View Full Code Here

TOP

Related Classes of org.apache.pivot.beans.BXMLSerializer

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.