Package org.apache.pivot.beans

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


    private Window window = null;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = new Window((Component)bxmlSerializer.readObject(getClass().getResource("baseline_test.bxml")));
        window.setTitle("Baseline Test");
        window.setMaximized(true);
        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, "dragdrop.bxml");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }
View Full Code Here

    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(JSONViewer.class, "json_viewer.bxml");
        bxmlSerializer.bind(this);

        Label prompt = new Label("Drag or paste JSON here");
        prompt.getStyles().put("horizontalAlignment", HorizontalAlignment.CENTER);
        prompt.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
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(SaturationDecoratorTest.class,
            "saturation_decorator_test.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, "alerts.bxml");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }
View Full Code Here

                            options.add("Cancel");

                            Component body = null;
                            BXMLSerializer serializer = new BXMLSerializer();
                            try {
                                body = (Component)serializer.readObject(KitchenSink.class, "alert.bxml");
                            } catch(Exception exception) {
                                System.err.println(exception);
                            }

                            Alert alert = new Alert(MessageType.QUESTION, "Please select your favorite icon:",
View Full Code Here

                            options.add("Cancel");

                            Component body = null;
                            BXMLSerializer serializer = new BXMLSerializer();
                            try {
                                body = (Component)serializer.readObject(KitchenSink.class, "alert.bxml");
                            } catch(Exception exception) {
                                System.err.println(exception);
                            }

                            Prompt prompt = new Prompt(MessageType.QUESTION, "Please select your favorite icon:",
View Full Code Here

    @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(SearchDemo.class, "search_demo.bxml");
        bxmlSerializer.bind(this, SearchDemo.class);

        searchButton.setButtonData(searchImage);
        window.open(display);
View Full Code Here

        throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();

        System.out.println("Double Click on Table elements to open the Row Editor");

        window = (Window)bxmlSerializer.readObject(TableViewTest2.class, "table_view_test2.bxml");
        tableView = (TableView)bxmlSerializer.getNamespace().get("tableView");
        menu = (Window)bxmlSerializer.readObject(TableViewTest2.class, "context_menus.bxml");

        tableView.setMenuHandler(new ContextMenusSampleMenuHandlerAdapter());
        System.out.println("Right  Click on Table elements to display Contextual Menu: " + menu);
View Full Code Here

        System.out.println("Double Click on Table elements to open the Row Editor");

        window = (Window)bxmlSerializer.readObject(TableViewTest2.class, "table_view_test2.bxml");
        tableView = (TableView)bxmlSerializer.getNamespace().get("tableView");
        menu = (Window)bxmlSerializer.readObject(TableViewTest2.class, "context_menus.bxml");

        tableView.setMenuHandler(new ContextMenusSampleMenuHandlerAdapter());
        System.out.println("Right  Click on Table elements to display Contextual Menu: " + menu);

        TableViewRowEditor tableViewRowEditor = new TableViewRowEditor();
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.