Examples of Menupopup


Examples of org.zkoss.zul.Menupopup

                if (command.accepts(taskComponent)) {
                        menuBuilder.item(command.getName(), command.getIcon(),
                            command.toItemAction());
                }
            }
            Menupopup result = menuBuilder.createWithoutSettingContext();
            contextMenus.put(taskComponent, result);
            return result;
        }
        return contextMenus.get(taskComponent);
    }
View Full Code Here

Examples of org.zkoss.zul.Menupopup

            dependencyComponent.redrawDependency();
        }
    }

    private void addContextMenu(DependencyComponent dependencyComponent) {
        Menupopup contextMenu = dependencyComponent.hasLimitingTasks() ?
                getLimitingContextMenu()
                : getContextMenu();
        dependencyComponent.setContext(contextMenu);
    }
View Full Code Here

Examples of pivot.wtk.MenuPopup

        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

Examples of pivot.wtk.MenuPopup

    @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

Examples of pivot.wtk.MenuPopup

        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

Examples of pivot.wtk.MenuPopup

    @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

Examples of pivot.wtk.MenuPopup

        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

Examples of pivot.wtk.MenuPopup

    @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

Examples of pivot.wtk.MenuPopup

        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

Examples of pivot.wtk.MenuPopup

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