Package org.apache.pivot.beans

Examples of org.apache.pivot.beans.BXMLSerializer


        }

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

                this.numericSpinner = (Spinner)bxmlSerializer.getNamespace().get("numericSpinner");
                this.dateSpinner = (Spinner)bxmlSerializer.getNamespace().get("dateSpinner");

                this.redSlider = (Slider)bxmlSerializer.getNamespace().get("redSlider");
                this.greenSlider = (Slider)bxmlSerializer.getNamespace().get("greenSlider");
                this.blueSlider = (Slider)bxmlSerializer.getNamespace().get("blueSlider");
                this.colorBorder = (Border)bxmlSerializer.getNamespace().get("colorBorder");

                rollup.setContent(this.component);

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


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

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window)bxmlSerializer.readObject(WebQueries.class, "web_queries.bxml");

        listView = (ListView)bxmlSerializer.getNamespace().get("listView");
        loadingLabel = (Label)bxmlSerializer.getNamespace().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

    private Window window = null;

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

    private Window window;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window) bxmlSerializer.readObject(Pivot721.class, "pivot_721.bxml");

        // force fill into button renderer, but only in some buttons ...
        ButtonDataRenderer filledButtonDataRenderer = new ButtonDataRenderer();
        filledButtonDataRenderer.setFillIcon(true);
        PushButton button3 = (PushButton) bxmlSerializer.getNamespace().get("button3");
        // ((ButtonDataRenderer)button3.getDataRenderer()).setFillIcon(true);  // ok, but note that all buttons share a common renderer instance
        button3.setDataRenderer(filledButtonDataRenderer)// set/use the customized renderer instance
        PushButton button4 = (PushButton) bxmlSerializer.getNamespace().get("button4");
        button4.setDataRenderer(filledButtonDataRenderer)// set/use the customized renderer instance

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

    private Window reflectionWindow = null;
    private Frame translucentFrame = null;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        reflectionWindow = (Window)bxmlSerializer.readObject(DecoratorDemo.class,
            "reflection_window.bxml");
        translucentFrame = (Frame)bxmlSerializer.readObject(DecoratorDemo.class,
            "translucent_frame.bxml");

        final FadeDecorator fadeDecorator = new FadeDecorator();
        translucentFrame.getDecorators().insert(fadeDecorator, 0);
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, "tables.bxml");
                } catch(IOException exception) {
                    throw new RuntimeException(exception);
                } catch(SerializationException exception) {
                    throw new RuntimeException(exception);
                }

                this.sortableTableView = (TableView)bxmlSerializer.getNamespace().get("sortableTableView");
                this.customTableView = (TableView)bxmlSerializer.getNamespace().get("customTableView");

                rollup.setContent(this.component);

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

                System.out.println("Set as origin the user home");
                origin = (new File(USER_HOME).toURI()).toURL();
            }
        }

        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window)bxmlSerializer.readObject(LargeData.class, "large_data.bxml");
        fileListButton = (ListButton)bxmlSerializer.getNamespace().get("fileListButton");
        loadDataButton = (PushButton)bxmlSerializer.getNamespace().get("loadDataButton");
        cancelButton = (PushButton)bxmlSerializer.getNamespace().get("cancelButton");
        statusLabel = (Label)bxmlSerializer.getNamespace().get("statusLabel");
        tableView = (TableView)bxmlSerializer.getNamespace().get("tableView");

        fileListButton.getListButtonSelectionListeners().add(new ListButtonSelectionListener.Adapter() {
            @Override
            public void selectedItemChanged(ListButton listButtonArgument, Object previousSelectedItem) {
                Object selectedItem = listButtonArgument.getSelectedItem();
View Full Code Here

    }

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window) bxmlSerializer.readObject(Pivot718.class, "pivot_718.bxml");

        controlTree(bxmlSerializer);
        controlList(bxmlSerializer);

        window.open(display);
View Full Code Here

    }

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

    public TextPaneDemo() {
    }

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window)bxmlSerializer.readObject(TextPaneDemo.class, "text_pane_demo.bxml");
        bxmlSerializer.bind(this, TextPaneDemo.class);

        window.setTitle("Apache Pivot Rich Text Editor Demo");

        // make the text on the "bold" button bold
        Font boldButtonFont = (Font)boldButton.getStyles().get("font");
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.