Package org.apache.pivot.beans

Examples of org.apache.pivot.beans.BXMLSerializer.readObject()


    public static TestDialog create() {
        System.out.println("TestDialog create()");
        TestDialog dialog = null;
        try {
            BXMLSerializer bxmlSerializer = new BXMLSerializer();
            dialog = (TestDialog) bxmlSerializer.readObject(TestDialog.class, DIALOG_MARKUP_FILE);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (SerializationException e) {
            e.printStackTrace();
        }
View Full Code Here


                BXMLSerializer bxmlSerializer = new BXMLSerializer();
                bxmlSerializer.getNamespace().put("menuHandler", menuHandler);

                Component tab;
                try {
                    tab = new Border((Component)bxmlSerializer.readObject(MenuBars.class, "document.bxml"));
                } 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 {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        BoxPane boxPane = (BoxPane)bxmlSerializer.readObject(ColorListButtonTest.class,
            "color_list_button_test.bxml");
        listButton = (ListButton)bxmlSerializer.getNamespace().get("listButton");
        // test the getListPopup() method
        listButton.getListPopup().getDecorators().add(new ReflectionDecorator());
View Full Code Here

            CreateHighlightedXML xml = new CreateHighlightedXML();
            Document doc = xml.prettyPrint(CreateHighlightedXML.class.getResourceAsStream("builder-test1.bxml"));

            BXMLSerializer bxmlSerializer = new BXMLSerializer();
            window = (Window) bxmlSerializer.readObject(BXMLExplorer.class,
                "CreateHighlightedXml.bxml", true);

            TextPane textPane = (TextPane) bxmlSerializer.getNamespace().get("textPane");
            textPane.setDocument(doc);
View Full Code Here

                // Make the new row available to script blocks
                bxmlSerializer.getNamespace().put("row", row);

                try {
                    sheet = (Sheet)bxmlSerializer.readObject(TablePanes.class,
                        "table_panes_configure_row.bxml");
                } catch (SerializationException exception) {
                    throw new RuntimeException(exception);
                } catch (IOException exception) {
                    throw new RuntimeException(exception);
View Full Code Here

                int columnIndex = tablePane.getColumnAt(contextMenuHandler.getX());
                TablePane.Column column = tablePane.getColumns().get(columnIndex);
                bxmlSerializer.getNamespace().put("column", column);

                try {
                    sheet = (Sheet)bxmlSerializer.readObject(TablePanes.class,
                        "table_panes_configure_column.bxml");
                } catch (SerializationException exception) {
                    throw new RuntimeException(exception);
                } catch (IOException exception) {
                    throw new RuntimeException(exception);
View Full Code Here

                // Make the new column available to script blocks
                bxmlSerializer.getNamespace().put("column", column);

                try {
                    sheet = (Sheet)bxmlSerializer.readObject(TablePanes.class,
                        "table_panes_configure_column.bxml");
                } catch (SerializationException exception) {
                    throw new RuntimeException(exception);
                } catch (IOException 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, "info.bxml");
                } 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 {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        Window window = (Window) bxmlSerializer.readObject(getClass().getResource("pivot_837.bxml"));
        window.open(display);
    }

    @Override
    public boolean shutdown(boolean optional) throws 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, "buttons.bxml");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }
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.