Package pivot.wtk

Examples of pivot.wtk.MenuPopup$MenuPopupListenerList


        alertButton = (PushButton)wtkxSerializer.getObjectByName("alerts.alertButton");
        promptButton = (PushButton)wtkxSerializer.getObjectByName("alerts.promptButton");
        initializeAlertButtons();

        menuPopup = new MenuPopup((Menu)wtkxSerializer.readObject("pivot/tutorials/menu_popup.wtkx"));

        window = new Window();
        window.setTitle("Pivot Demo");
        window.setMaximized(true);
        window.setContent(content);
View Full Code Here


    @Override
    public void install(Component component) {
        super.install(component);

        MenuPopup menuPopup = (MenuPopup)component;
        menuPopup.getMenuPopupListeners().add(this);

        if (menuPopup.isOpen()) {
            Component.getComponentClassListeners().add(this);
        }

        Menu menu = menuPopup.getMenu();
        if (menu != null) {
            menu.getMenuItemSelectionListeners().add(menuItemPressListener);
        }

        panorama.setView(menu);
        menuPopup.setContent(border);

        // Attach the drop-shadow decorator
        dropShadowDecorator = new DropShadowDecorator(3, 3, 3);
        menuPopup.getDecorators().add(dropShadowDecorator);
    }
View Full Code Here

        menuPopup.getDecorators().add(dropShadowDecorator);
    }

    @Override
    public void uninstall() {
        MenuPopup menuPopup = (MenuPopup)getComponent();
        menuPopup.getMenuPopupListeners().remove(this);

        if (menuPopup.isOpen()) {
            Component.getComponentClassListeners().remove(this);
        }

        Menu menu = menuPopup.getMenu();
        if (menu != null) {
            menu.getMenuItemSelectionListeners().remove(menuItemPressListener);
        }

        panorama.setView(null);
        menuPopup.setContent(null);

        // Detach the drop shadow decorator
        menuPopup.getDecorators().remove(dropShadowDecorator);
        dropShadowDecorator = null;

        super.uninstall();
    }
View Full Code Here

    @Override
    public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {
        boolean consumed = super.keyPressed(component, keyCode, keyLocation);

        if (keyCode == Keyboard.KeyCode.ESCAPE) {
            MenuPopup menuPopup = (MenuPopup)getComponent();
            Component affiliate = menuPopup.getAffiliate();
            if (affiliate != null
                && affiliate.isFocusable()) {
                affiliate.requestFocus();
            }

            menuPopup.close();
        }

        return consumed;
    }
View Full Code Here

        panorama.setView(menu);
    }

    public void focusedComponentChanged(Component previousFocusedComponent) {
        MenuPopup menuPopup = (MenuPopup)getComponent();

        if (!menuPopup.containsFocus()) {
            Component affiliate = menuPopup.getAffiliate();
            Component focusedComponent = Component.getFocusedComponent();

            if (focusedComponent != null
                && focusedComponent != affiliate) {
                Window window = focusedComponent.getWindow();

                if (window != menuPopup
                    && !menuPopup.isOwner(window)) {
                    menuPopup.close();
                }
            }
        }
    }
View Full Code Here

    @Override
    public void install(Component component) {
        super.install(component);

        MenuPopup menuPopup = (MenuPopup)component;
        menuPopup.getMenuPopupListeners().add(this);

        if (menuPopup.isOpen()) {
            Component.getComponentClassListeners().add(this);
        }

        Menu menu = menuPopup.getMenu();
        if (menu != null) {
            menu.getMenuItemSelectionListeners().add(menuItemPressListener);
        }

        panorama.setView(menu);
        menuPopup.setContent(border);

        // Attach the drop-shadow decorator
        dropShadowDecorator = new DropShadowDecorator(3, 3, 3);
        menuPopup.getDecorators().add(dropShadowDecorator);
    }
View Full Code Here

        menuPopup.getDecorators().add(dropShadowDecorator);
    }

    @Override
    public void uninstall() {
        MenuPopup menuPopup = (MenuPopup)getComponent();
        menuPopup.getMenuPopupListeners().remove(this);

        if (menuPopup.isOpen()) {
            Component.getComponentClassListeners().remove(this);
        }

        Menu menu = menuPopup.getMenu();
        if (menu != null) {
            menu.getMenuItemSelectionListeners().remove(menuItemPressListener);
        }

        panorama.setView(null);
        menuPopup.setContent(null);

        // Detach the drop shadow decorator
        menuPopup.getDecorators().remove(dropShadowDecorator);
        dropShadowDecorator = null;

        super.uninstall();
    }
View Full Code Here

    @Override
    public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation) {
        boolean consumed = super.keyPressed(component, keyCode, keyLocation);

        if (keyCode == Keyboard.KeyCode.ESCAPE) {
            MenuPopup menuPopup = (MenuPopup)getComponent();
            Component affiliate = menuPopup.getAffiliate();
            if (affiliate != null
                && affiliate.isFocusable()
                && affiliate.isShowing()) {
                affiliate.requestFocus();
            }

            menuPopup.close();
        }

        return consumed;
    }
View Full Code Here

        panorama.setView(menu);
    }

    public void focusedComponentChanged(Component previousFocusedComponent) {
        MenuPopup menuPopup = (MenuPopup)getComponent();

        if (!menuPopup.containsFocus()) {
            Component affiliate = menuPopup.getAffiliate();
            Component focusedComponent = Component.getFocusedComponent();

            if (focusedComponent != null
                && focusedComponent != affiliate) {
                Window window = focusedComponent.getWindow();

                if (window != menuPopup
                    && !menuPopup.isOwner(window)) {
                    menuPopup.close();
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of pivot.wtk.MenuPopup$MenuPopupListenerList

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.