Package com.smartgwt.client.widgets.menu

Examples of com.smartgwt.client.widgets.menu.MenuItem.addClickHandler()


        if (null != UserSessionManager.getUserPreferences()) {
            retrievedRefreshInterval = UserSessionManager.getUserPreferences().getPageRefreshInterval();
        }
        for (RefreshSelectItemData item : RefreshSelectItemData.values()) {
            MenuItem menuItem = new MenuItem(item.getLabel(), "");
            menuItem.addClickHandler(menuClick);
            refreshMenuMappings.put(item.getTimeSpanInSeconds(), item.getLabel());
            if (retrievedRefreshInterval == item.getTimeSpanInSeconds()) {
                menuItem.setIcon(ImageManager.getAvailabilityIcon(true));
            }
            menuItemList.add(menuItem);
View Full Code Here


                // menu action
                Menu menu = new Menu();
                final Map<String, Object> menuEntries = tableAction.getValueMap();
                for (final String key : menuEntries.keySet()) {
                    MenuItem item = new MenuItem(key);
                    item.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() {
                        public void onClick(MenuItemClickEvent event) {
                            disableAllFooterControls();
                            tableAction.getAction().executeAction(listGrid.getSelectedRecords(), menuEntries.get(key));
                        }
                    });
View Full Code Here

        content = new HTMLFlow();
        content.setPosition(Positioning.ABSOLUTE);
        injectFunctions(this);
        showDetailsMenu = new Menu();
        MenuItem showDetailsMenuItem = new MenuItem(MSG.view_messageCenter_messageBarShowDetails());
        showDetailsMenuItem.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(MenuItemClickEvent event) {
                MessageCenterView.showDetails(MessageBar.this.currentMessage);
            }
        });
View Full Code Here

                MessageCenterView.showDetails(MessageBar.this.currentMessage);
            }
        });

        MenuItem showRootCauseMenuItem = new MenuItem(MSG.view_messageCenter_messageRootCause());
        showRootCauseMenuItem.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(MenuItemClickEvent event) {
                Message msg = MessageBar.this.currentMessage;
                if (msg != null) {
                    String rootCause = msg.getRootCauseMessage();
View Full Code Here

            // separator
            addItem(new MenuItemSeparator());

            // refresh node
            MenuItem refresh = new MenuItem(MSG.common_button_refresh());
            refresh.addClickHandler(new ClickHandler() {

                public void onClick(MenuItemClickEvent event) {
                    // refresh the tree and detail
                    ((ResourceTreeView) treeView).contextMenuRefresh(treeGrid, node, false);
                }
View Full Code Here

        // plugin config
        MenuItem pluginConfiguration = new MenuItem(MSG.view_tabs_common_connectionSettings());
        boolean pluginConfigEnabled = resourceType.getPluginConfigurationDefinition() != null;
        pluginConfiguration.setEnabled(pluginConfigEnabled);
        if (pluginConfigEnabled) {
            pluginConfiguration.addClickHandler(new ClickHandler() {
                public void onClick(MenuItemClickEvent event) {
                    CoreGUI.goToView(LinkManager.getEntityTabLink(EntityContext.forGroup(group), "Inventory",
                        "ConnectionSettings"));
                }
            });
View Full Code Here

        MenuItem resourceConfiguration = new MenuItem(MSG.view_tree_common_contextMenu_resourceConfiguration());
        boolean resourceConfigEnabled = groupComposite.getResourcePermission().isConfigureRead()
            && resourceType.getResourceConfigurationDefinition() != null;
        resourceConfiguration.setEnabled(resourceConfigEnabled);
        if (resourceConfigEnabled) {
            resourceConfiguration.addClickHandler(new ClickHandler() {
                public void onClick(MenuItemClickEvent event) {
                    CoreGUI.goToView(LinkManager.getEntityTabLink(EntityContext.forGroup(group), "Configuration",
                        "Current"));
                }
            });
View Full Code Here

            for (String displayName : ordered) {
                final OperationDefinition operationDefinition = definitionMap.get(displayName);

                MenuItem operationItem = new MenuItem(operationDefinition.getDisplayName());
                operationItem.addClickHandler(new ClickHandler() {
                    public void onClick(MenuItemClickEvent event) {
                        String viewPath = LinkManager.getEntityTabLink(EntityContext.forGroup(group),
                            ResourceDetailView.Tab.Operations.NAME, "Schedules")
                            + "/0/"
                            + operationDefinition.getId();
View Full Code Here

        Menu menu = new Menu();
        for (SectionStackSection section : sectionStack.getSections()) {
            MenuItem item = new MenuItem(section.getTitle());
            item.setAttribute("name", section.getName());
            item.addClickHandler(new ClickHandler() {
                public void onClick(MenuItemClickEvent event) {
                    int index = event.getMenu().getItemNum(event.getItem());
                    sectionStack.expandSection(index);
                    sectionStack.showSection(index);
                }
View Full Code Here

            menu.addItem(item);
        }
        menu.addItem(new MenuItemSeparator());

        MenuItem hideAllItem = new MenuItem(MSG.view_configEdit_hideAll());
        hideAllItem.addClickHandler(new ClickHandler() {
            public void onClick(MenuItemClickEvent event) {
                for (int i = 0; i < sectionStack.getSections().length; i++) {
                    sectionStack.collapseSection(i);
                }
            }
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.