Package org.apache.pivot.beans

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


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

        window.setMenuHandler(new MenuHandler.Adapter() {
            @Override
            public boolean configureContextMenu(Component component, Menu menu, int x, int y) {
                menu.getSections().add(globalSection);
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

        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);
        promptDecorator.setOverlay(prompt);
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

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

        termTextInput.requestFocus();
View Full Code Here

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

        textInput.getTextInputContentListeners().add(new TextInputContentListener.Adapter() {
            @Override
            public void textInserted(TextInput textInput, int index, int count) {
                ArrayList<String> suggestions = new ArrayList<String>("One", "Two", "Three", "Four", "Five");
View Full Code Here

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();

        window = (Window)bxmlSerializer.readObject(CalendarTest.class, "calendar_test.bxml");
        bxmlSerializer.bind(this, CalendarTest.class);

        Filter<CalendarDate> todayFilter = new Filter<CalendarDate>() {
            @Override
            public boolean include(CalendarDate date) {
                CalendarDate today = new CalendarDate();
View Full Code Here

        frame1.setPreferredSize(320, 240);
        frame1.open(display);

        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        frame2 = (Frame)bxmlSerializer.readObject(MenuBarTest.class, "menu_bar_test.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: " + component);
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

            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

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.