Package org.apache.pivot.beans

Examples of org.apache.pivot.beans.BXMLSerializer


        public void startup(Display display, Map<String, String> properties) throws Exception {

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

            window.open(display);
        }
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);
                }

                this.infoPivotVersion = (Label)bxmlSerializer.getNamespace().get("info-pivot-version");
                this.infoPivotVersion.setText(this.infoPivotVersion.getText() + ApplicationContext.getPivotVersion().toString());

                this.infoPivotOrigin = (Label)bxmlSerializer.getNamespace().get("info-pivot-origin");
                String origin = (ApplicationContext.getOrigin() != null) ? ApplicationContext.getOrigin().toString() : "";
                this.infoPivotOrigin.setText(this.infoPivotOrigin.getText() + "\"" + origin + "\"");

                this.infoJavaVersion = (Label)bxmlSerializer.getNamespace().get("info-java-version");
                // String javaVersion = ApplicationContext.getJVMVersion().toString();
                String javaVersion = System.getProperty("java.version");
                this.infoJavaVersion.setText(this.infoJavaVersion.getText() + javaVersion);

                rollup.setContent(this.component);
View Full Code Here

public class Pivot837 extends Application.Adapter
{

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

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

                this.editableListView = (ListView)bxmlSerializer.getNamespace().get("editableListView");
                this.iconListView = (ListView)bxmlSerializer.getNamespace().get("iconListView");
                this.checkedListView = (ListView)bxmlSerializer.getNamespace().get("checkedListView");
                this.iconListButton = (ListButton)bxmlSerializer.getNamespace().get("iconListButton");

                rollup.setContent(this.component);

                List<ListItem> listData = (List<ListItem>)this.editableListView.getListData();
                listData.setComparator(new Comparator<ListItem>() {
View Full Code Here

            port = Integer.parseInt(properties.get(PORT_KEY));
        } else {
            port = origin.getPort();
        }

        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        expensesWindow = (ExpensesWindow)bxmlSerializer.readObject(ExpensesWindow.class,
            "expenses_window.bxml", true);
        expensesWindow.setExpensesApplication(this);
        expensesWindow.open(display);
    }
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, "text.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, "calendars.bxml");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }
View Full Code Here

        int x = 0;
        int y = 0;

        for (int i = 0; i < 3; i++) {
            BXMLSerializer bxmlSerializer = new BXMLSerializer();
            bxmlSerializer.getNamespace().put("application", this);

            Frame frame;
            try {
                frame = (Frame)bxmlSerializer.readObject(Windows.class, "frame.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, "color_choosers.bxml");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }
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.