Package org.apache.pivot.beans

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


        });

        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        frame2 = (Frame)bxmlSerializer.readObject(MenuBarTest.class, "menu_bar_test.bxml");
        frame2.setTitle("Frame 2, from bxml");
        bxmlSerializer.bind(this, MenuBarTest.class);

        MenuHandler menuHandler = new MenuHandler.Adapter() {
            @Override
            public void configureMenuBar(Component component, MenuBar menuBar) {
                System.out.println("Configure menu bar: got focus on " + component.getName());
View Full Code Here


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

        selectFolderButton.getButtonPressListeners().add(new ButtonPressListener() {
            @Override
            public void buttonPressed(Button button) {
                final FileBrowserSheet fileBrowserSheet = new FileBrowserSheet();
View Full Code Here

            throw new RuntimeException(exception);
        }

        fileBrowserSheet.setContent(content);

        bxmlSerializer.bind(this, TerraFileBrowserSheetSkin.class);

        // set the same rootDirectory to fileBrowser
        fileBrowser.setRootDirectory(fileBrowserSheet.getRootDirectory());

        saveAsTextInput.getTextInputContentListeners().add(new TextInputContentListener.Adapter() {
View Full Code Here

            throw new RuntimeException(exception);
        }

        fileBrowser.add(content);

        bxmlSerializer.bind(this, TerraFileBrowserSkin.class);

        driveListButton.getListButtonSelectionListeners().add(new ListButtonSelectionListener.Adapter() {
            @Override
            public void selectedItemChanged(ListButton listButton, Object previousSelectedItem) {
                if (previousSelectedItem != null) {
View Full Code Here

    @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

            throw new RuntimeException(exception);
        }

        fileBrowserSheet.setContent(content);

        bxmlSerializer.bind(this, TerraFileBrowserSheetSkin.class);

        saveAsTextInput.getTextInputContentListeners().add(new TextInputContentListener.Adapter() {
            @Override
            public void textChanged(TextInput textInput) {
                updateOKButtonState();
View Full Code Here

            throw new RuntimeException(exception);
        }

        fileBrowser.add(content);

        bxmlSerializer.bind(this, TerraFileBrowserSkin.class);

        driveListButton.getListButtonSelectionListeners().add(new ListButtonSelectionListener.Adapter() {
            @Override
            public void selectedItemChanged(ListButton listButton, Object previousSelectedItem) {
                if (previousSelectedItem != null) {
View Full Code Here

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

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

        buttonsRollup = (Rollup)bxmlSerializer.getNamespace().get("buttonsRollup");
        buttonsRollup.getRollupStateListeners().add(new ButtonsRollupStateHandler());

        listsRollup = (Rollup)bxmlSerializer.getNamespace().get("listsRollup");
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.