org.eclipse.nebula.widgets.nattable.ui.menu
Class PopupMenuBuilder

java.lang.Object
  extended by org.eclipse.nebula.widgets.nattable.ui.menu.PopupMenuBuilder

public class PopupMenuBuilder
extends Object

This class is used to create a context menu.


Nested Class Summary
protected  class PopupMenuBuilder.PopupContributionItem
          Wrapper class to build up a ContributionItem based on a given IMenuItemProvider.
 
Field Summary
static String AUTO_RESIZE_ALL_SELECTED_COLUMN_MENU_ITEM_ID
           
static String AUTO_RESIZE_COLUMN_MENU_ITEM_ID
           
static String AUTO_RESIZE_ROW_MENU_ITEM_ID
           
static String CATEGORIES_BASED_COLUMN_CHOOSER_MENU_ITEM_ID
           
static String CLEAR_ALL_FILTERS_MENU_ITEM_ID
           
static String COLUMN_CHOOSER_MENU_ITEM_ID
           
static String COLUMN_RENAME_MENU_ITEM_ID
           
static String COLUMN_STYLE_EDITOR_MENU_ITEM_ID
           
static String CREATE_COLUMN_GROUP_MENU_ITEM_ID
           
protected  MenuItemStateMap enablement
          Collection of all registered enablement state checkers for configured id's.
static String HIDE_COLUMN_MENU_ITEM_ID
           
static String HIDE_ROW_MENU_ITEM_ID
           
static String INSPECT_LABEL_MENU_ITEM_ID
           
protected  org.eclipse.jface.action.MenuManager menuManager
          The MenuManager that is used by this popup menu builder.
protected  NatTable natTable
          The active NatTable instance the context menu should be added to.
protected  org.eclipse.swt.widgets.Menu popupMenu
          The Menu that is created with this popup menu builder.
static String REMOVE_COLUMN_GROUP_MENU_ITEM_ID
           
static String RENAME_COLUMN_GROUP_MENU_ITEM_ID
           
static String SEPARATOR_MENU_ITEM_ID
           
static String SHOW_ALL_COLUMNS_MENU_ITEM_ID
           
static String SHOW_ALL_ROWS_MENU_ITEM_ID
           
static String STATE_MANAGER_MENU_ITEM_ID
           
static String TOGGLE_FILTER_ROW_MENU_ITEM_ID
           
static String UNGROUP_COLUMNS_MENU_ITEM_ID
           
protected  MenuItemStateMap visibility
          Collection of all registered visibility state checkers for configured id's.
 
Constructor Summary
PopupMenuBuilder(NatTable parent)
          Creates PopupMenuBuilder that builds up a new Menu that is only configurable with this instance of PopupMenuBuilder.
PopupMenuBuilder(NatTable natTable, org.eclipse.swt.widgets.Menu menu)
          Creates a popup menu builder based on the given menu.
PopupMenuBuilder(NatTable parent, org.eclipse.jface.action.MenuManager manager)
          Creates a PopupMenuBuilder that builds up a new Menu using the given MenuManager.
 
Method Summary
 org.eclipse.swt.widgets.Menu build()
          Builds and returns the created Menu.
 PopupMenuBuilder withAutoResizeSelectedColumnsMenuItem()
          Adds the menu item for auto resizing selected columns to the popup menu.
 PopupMenuBuilder withAutoResizeSelectedColumnsMenuItem(String menuLabel)
          Adds the menu item for auto resizing selected columns to the popup menu.
 PopupMenuBuilder withAutoResizeSelectedRowsMenuItem()
           
 PopupMenuBuilder withAutoResizeSelectedRowsMenuItem(String menuLabel)
           
 PopupMenuBuilder withCategoriesBasedColumnChooser()
           
 PopupMenuBuilder withCategoriesBasedColumnChooser(String menuLabel)
           
 PopupMenuBuilder withClearAllFilters()
           
 PopupMenuBuilder withClearAllFilters(String menuLabel)
           
 PopupMenuBuilder withColumnChooserMenuItem()
           
 PopupMenuBuilder withColumnChooserMenuItem(String menuLabel)
           
 PopupMenuBuilder withColumnRenameDialog()
           
 PopupMenuBuilder withColumnRenameDialog(String menuLabel)
           
 PopupMenuBuilder withColumnStyleEditor()
           
 PopupMenuBuilder withColumnStyleEditor(String menuLabel)
           
 PopupMenuBuilder withContributionItem(org.eclipse.jface.action.ContributionItem contributionItem)
          Adds the menu item(s) provided by the given PopupMenuBuilder.PopupContributionItem to the popup menu.
 PopupMenuBuilder withCreateColumnGroupsMenuItem()
           
 PopupMenuBuilder withCreateColumnGroupsMenuItem(String menuLabel)
           
 PopupMenuBuilder withEnabledState(String id, IMenuItemState state)
          Associate a enabled IMenuItemState with the menu item identified by the given id.
 PopupMenuBuilder withHideColumnMenuItem()
          Adds the menu item for hiding a column to the popup menu.
 PopupMenuBuilder withHideColumnMenuItem(String menuLabel)
          Adds the menu item for hiding a column to the popup menu.
 PopupMenuBuilder withHideRowMenuItem()
          Adds the menu item for hiding a row to the popup menu.
 PopupMenuBuilder withHideRowMenuItem(String menuLabel)
          Adds the menu item for hiding a row to the popup menu.
 PopupMenuBuilder withInspectLabelsMenuItem()
           
 PopupMenuBuilder withMenuItemProvider(IMenuItemProvider menuItemProvider)
          Adds the menu item provided by the given IMenuItemProvider to the popup menu.
 PopupMenuBuilder withMenuItemProvider(String id, IMenuItemProvider menuItemProvider)
          Adds the menu item provided by the given IMenuItemProvider to the popup menu.
 PopupMenuBuilder withRemoveColumnGroupMenuItem()
           
 PopupMenuBuilder withRemoveColumnGroupMenuItem(String menuLabel)
           
 PopupMenuBuilder withRenameColumnGroupMenuItem()
           
 PopupMenuBuilder withRenameColumnGroupMenuItem(String menuLabel)
           
 PopupMenuBuilder withSeparator()
          Adds a separator to the popup menu.
 PopupMenuBuilder withSeparator(String id)
          Adds a separator to the popup menu with the given id.
 PopupMenuBuilder withShowAllColumnsMenuItem()
          Adds the menu item for showing all columns to the popup menu.
 PopupMenuBuilder withShowAllColumnsMenuItem(String menuLabel)
          Adds the menu item for showing all columns to the popup menu.
 PopupMenuBuilder withShowAllRowsMenuItem()
          Adds the menu item for showing all rows to the popup menu.
 PopupMenuBuilder withShowAllRowsMenuItem(String menuLabel)
          Adds the menu item for showing all rows to the popup menu.
 PopupMenuBuilder withStateManagerMenuItemProvider()
          Adds the menu item for opening the view management dialog to the popup menu.
 PopupMenuBuilder withStateManagerMenuItemProvider(String menuLabel)
          Adds the menu item for opening the view management dialog to the popup menu.
 PopupMenuBuilder withToggleFilterRow()
          Adds a menu item for toggling the visibility of the filter row.
 PopupMenuBuilder withToggleFilterRow(String menuLabel)
          Adds a menu item for toggling the visibility of the filter row.
 PopupMenuBuilder withUngroupColumnsMenuItem()
           
 PopupMenuBuilder withUngroupColumnsMenuItem(String menuLabel)
           
 PopupMenuBuilder withVisibleState(String id, IMenuItemState state)
          Associate a visibility IMenuItemState with the menu item identified by the given id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIDE_COLUMN_MENU_ITEM_ID

public static final String HIDE_COLUMN_MENU_ITEM_ID
See Also:
Constant Field Values

SHOW_ALL_COLUMNS_MENU_ITEM_ID

public static final String SHOW_ALL_COLUMNS_MENU_ITEM_ID
See Also:
Constant Field Values

HIDE_ROW_MENU_ITEM_ID

public static final String HIDE_ROW_MENU_ITEM_ID
See Also:
Constant Field Values

SHOW_ALL_ROWS_MENU_ITEM_ID

public static final String SHOW_ALL_ROWS_MENU_ITEM_ID
See Also:
Constant Field Values

AUTO_RESIZE_COLUMN_MENU_ITEM_ID

public static final String AUTO_RESIZE_COLUMN_MENU_ITEM_ID
See Also:
Constant Field Values

AUTO_RESIZE_ROW_MENU_ITEM_ID

public static final String AUTO_RESIZE_ROW_MENU_ITEM_ID
See Also:
Constant Field Values

AUTO_RESIZE_ALL_SELECTED_COLUMN_MENU_ITEM_ID

public static final String AUTO_RESIZE_ALL_SELECTED_COLUMN_MENU_ITEM_ID
See Also:
Constant Field Values

COLUMN_CHOOSER_MENU_ITEM_ID

public static final String COLUMN_CHOOSER_MENU_ITEM_ID
See Also:
Constant Field Values

COLUMN_STYLE_EDITOR_MENU_ITEM_ID

public static final String COLUMN_STYLE_EDITOR_MENU_ITEM_ID
See Also:
Constant Field Values

COLUMN_RENAME_MENU_ITEM_ID

public static final String COLUMN_RENAME_MENU_ITEM_ID
See Also:
Constant Field Values

CREATE_COLUMN_GROUP_MENU_ITEM_ID

public static final String CREATE_COLUMN_GROUP_MENU_ITEM_ID
See Also:
Constant Field Values

RENAME_COLUMN_GROUP_MENU_ITEM_ID

public static final String RENAME_COLUMN_GROUP_MENU_ITEM_ID
See Also:
Constant Field Values

REMOVE_COLUMN_GROUP_MENU_ITEM_ID

public static final String REMOVE_COLUMN_GROUP_MENU_ITEM_ID
See Also:
Constant Field Values

UNGROUP_COLUMNS_MENU_ITEM_ID

public static final String UNGROUP_COLUMNS_MENU_ITEM_ID
See Also:
Constant Field Values

INSPECT_LABEL_MENU_ITEM_ID

public static final String INSPECT_LABEL_MENU_ITEM_ID
See Also:
Constant Field Values

CATEGORIES_BASED_COLUMN_CHOOSER_MENU_ITEM_ID

public static final String CATEGORIES_BASED_COLUMN_CHOOSER_MENU_ITEM_ID
See Also:
Constant Field Values

CLEAR_ALL_FILTERS_MENU_ITEM_ID

public static final String CLEAR_ALL_FILTERS_MENU_ITEM_ID
See Also:
Constant Field Values

TOGGLE_FILTER_ROW_MENU_ITEM_ID

public static final String TOGGLE_FILTER_ROW_MENU_ITEM_ID
See Also:
Constant Field Values

STATE_MANAGER_MENU_ITEM_ID

public static final String STATE_MANAGER_MENU_ITEM_ID
See Also:
Constant Field Values

SEPARATOR_MENU_ITEM_ID

public static final String SEPARATOR_MENU_ITEM_ID
See Also:
Constant Field Values

natTable

protected NatTable natTable
The active NatTable instance the context menu should be added to. Needed in advance to be able to add custom menu items that need the NatTable instance.


popupMenu

protected org.eclipse.swt.widgets.Menu popupMenu
The Menu that is created with this popup menu builder.


menuManager

protected org.eclipse.jface.action.MenuManager menuManager
The MenuManager that is used by this popup menu builder. Can be null if plain SWT menu mechanisms are used.


visibility

protected final MenuItemStateMap visibility
Collection of all registered visibility state checkers for configured id's.


enablement

protected final MenuItemStateMap enablement
Collection of all registered enablement state checkers for configured id's.

Constructor Detail

PopupMenuBuilder

public PopupMenuBuilder(NatTable parent)
Creates PopupMenuBuilder that builds up a new Menu that is only configurable with this instance of PopupMenuBuilder. Uses a MenuManager internally to be able to configure visibility and enabled states.

Parameters:
parent - The active NatTable instance the context menu should be added to.

PopupMenuBuilder

public PopupMenuBuilder(NatTable parent,
                        org.eclipse.jface.action.MenuManager manager)
Creates a PopupMenuBuilder that builds up a new Menu using the given MenuManager.

Parameters:
parent - The active NatTable instance the context menu should be added to.
manager - The MenuManager that should be used to create the Menu.

PopupMenuBuilder

public PopupMenuBuilder(NatTable natTable,
                        org.eclipse.swt.widgets.Menu menu)
Creates a popup menu builder based on the given menu. Using this enables the possibility to use configured context menus from plugin.xml and adding NatTable commands programmatically.

As an example you might want to create a PopupMenuBuilder by using a configured menu with the id org.eclipse.nebula.widgets.nattable.example.contextmenu

 ISelectionProvider isp =
         new RowSelectionProvider<?>(selectionLayer, bodyDataProvider, false);
 MenuManager menuManager = new MenuManager();
 menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
 getSite().registerContextMenu(
         "org.eclipse.nebula.widgets.nattable.example.contextmenu", menuManager, isp);
 PopupMenuBuilder popupMenu =
         new PopupMenuBuilder(menuManager.createContextMenu(natTable));
 

For usage with Eclipse 4 you can use the EMenuService to register the menu to a NatTable instance. Afterwards get the menu and remove it from the NatTable to avoid the SWT control menu. The generated menu carries a MenuManager in the Widget.getData() which will be used within this PopupMenuBuilder.

 menuService.registerContextMenu(natTable, menuId);
 Menu swtMenu = natTable.getMenu();
 natTable.setMenu(null);
 

Parameters:
natTable - The active NatTable instance which might be needed for creation of menu items that need the NatTable instance to work.
menu - The registered context menu.
Method Detail

withMenuItemProvider

public PopupMenuBuilder withMenuItemProvider(IMenuItemProvider menuItemProvider)
Adds the menu item provided by the given IMenuItemProvider to the popup menu. You can use this to add your own item to the popup menu.

Items added by this method can not be identified by id, so adding visible or enabled state checkers is not possible for these providers.

Parameters:
menuItemProvider - The IMenuItemProvider that provides the menu item that should be added to the popup menu.
Returns:
The current PopupMenuBuilder with the added item.

withMenuItemProvider

public PopupMenuBuilder withMenuItemProvider(String id,
                                             IMenuItemProvider menuItemProvider)
Adds the menu item provided by the given IMenuItemProvider to the popup menu. You can use this to add your own item to the popup menu.

As items added by this method can be identified via the given id it is possible to register visible or enabled state checkers for these providers.

Parameters:
id - The id under which the given IMenuItemProvider should be identifiable.
menuItemProvider - The IMenuItemProvider that provides the menu item that should be added to the popup menu.
Returns:
The current PopupMenuBuilder with the added item.

withContributionItem

public PopupMenuBuilder withContributionItem(org.eclipse.jface.action.ContributionItem contributionItem)
Adds the menu item(s) provided by the given PopupMenuBuilder.PopupContributionItem to the popup menu. You can use this to add your own item to the popup menu.

This method is only working if the PopupMenuBuilder is using a MenuManager.

Using this adds support for visibility and enabled states of menu items.

Parameters:
contributionItem - The PopupMenuBuilder.PopupContributionItem that is used to add a menu item to the menu.
Returns:
The current PopupMenuBuilder with the added item.
Throws:
IllegalStateException - if this PopupMenuBuilder does not use a MenuManager

withHideColumnMenuItem

public PopupMenuBuilder withHideColumnMenuItem()
Adds the menu item for hiding a column to the popup menu. Uses the default text localized in NatTable core resource bundles.

Returns:
The PopupMenuBuilder with the hide column menu item added.
See Also:
MenuItemProviders.hideColumnMenuItemProvider()

withHideColumnMenuItem

public PopupMenuBuilder withHideColumnMenuItem(String menuLabel)
Adds the menu item for hiding a column to the popup menu. Uses the given String as label for the menu item.

Parameters:
menuLabel - The label to use for showing the item in the popup menu.
Returns:
The PopupMenuBuilder with the hide column menu item added.
See Also:
MenuItemProviders.hideColumnMenuItemProvider(String)

withShowAllColumnsMenuItem

public PopupMenuBuilder withShowAllColumnsMenuItem()
Adds the menu item for showing all columns to the popup menu. Uses the default text localized in NatTable core resource bundles.

Returns:
The PopupMenuBuilder with the show all columns menu item added.
See Also:
MenuItemProviders.showAllColumnsMenuItemProvider()

withShowAllColumnsMenuItem

public PopupMenuBuilder withShowAllColumnsMenuItem(String menuLabel)
Adds the menu item for showing all columns to the popup menu. Uses the given String as label for the menu item.

Parameters:
menuLabel - The label to use for showing the item in the popup menu.
Returns:
The PopupMenuBuilder with the show all columns menu item added.
See Also:
MenuItemProviders.showAllColumnsMenuItemProvider(String)

withHideRowMenuItem

public PopupMenuBuilder withHideRowMenuItem()
Adds the menu item for hiding a row to the popup menu. Uses the default text localized in NatTable core resource bundles.

Returns:
The PopupMenuBuilder with the hide row menu item added.
See Also:
MenuItemProviders.hideRowMenuItemProvider()

withHideRowMenuItem

public PopupMenuBuilder withHideRowMenuItem(String menuLabel)
Adds the menu item for hiding a row to the popup menu. Uses the given String as label for the menu item.

Parameters:
menuLabel - The label to use for showing the item in the popup menu.
Returns:
The PopupMenuBuilder with the hide row menu item added.
See Also:
MenuItemProviders.hideRowMenuItemProvider(String)

withShowAllRowsMenuItem

public PopupMenuBuilder withShowAllRowsMenuItem()
Adds the menu item for showing all rows to the popup menu. Uses the default text localized in NatTable core resource bundles.

Returns:
The PopupMenuBuilder with the show all rows menu item added.
See Also:
MenuItemProviders.showAllRowsMenuItemProvider()

withShowAllRowsMenuItem

public PopupMenuBuilder withShowAllRowsMenuItem(String menuLabel)
Adds the menu item for showing all rows to the popup menu. Uses the given String as label for the menu item.

Parameters:
menuLabel - The label to use for showing the item in the popup menu.
Returns:
The PopupMenuBuilder with the show all rows menu item added.
See Also:
MenuItemProviders.showAllRowsMenuItemProvider(String)

withAutoResizeSelectedColumnsMenuItem

public PopupMenuBuilder withAutoResizeSelectedColumnsMenuItem()
Adds the menu item for auto resizing selected columns to the popup menu. Uses the default text localized in NatTable core resource bundles.

Returns:
The PopupMenuBuilder with the resize selected columns menu item added.
See Also:
MenuItemProviders.autoResizeColumnMenuItemProvider()

withAutoResizeSelectedColumnsMenuItem

public PopupMenuBuilder withAutoResizeSelectedColumnsMenuItem(String menuLabel)
Adds the menu item for auto resizing selected columns to the popup menu. Uses the given String as label for the menu item.

Returns:
The PopupMenuBuilder with the resize selected columns menu item added.
See Also:
MenuItemProviders.autoResizeColumnMenuItemProvider(String)

withAutoResizeSelectedRowsMenuItem

public PopupMenuBuilder withAutoResizeSelectedRowsMenuItem()

withAutoResizeSelectedRowsMenuItem

public PopupMenuBuilder withAutoResizeSelectedRowsMenuItem(String menuLabel)

withColumnChooserMenuItem

public PopupMenuBuilder withColumnChooserMenuItem()

withColumnChooserMenuItem

public PopupMenuBuilder withColumnChooserMenuItem(String menuLabel)

withColumnStyleEditor

public PopupMenuBuilder withColumnStyleEditor()

withColumnStyleEditor

public PopupMenuBuilder withColumnStyleEditor(String menuLabel)

withColumnRenameDialog

public PopupMenuBuilder withColumnRenameDialog()

withColumnRenameDialog

public PopupMenuBuilder withColumnRenameDialog(String menuLabel)

withCreateColumnGroupsMenuItem

public PopupMenuBuilder withCreateColumnGroupsMenuItem()

withCreateColumnGroupsMenuItem

public PopupMenuBuilder withCreateColumnGroupsMenuItem(String menuLabel)

withUngroupColumnsMenuItem

public PopupMenuBuilder withUngroupColumnsMenuItem()

withUngroupColumnsMenuItem

public PopupMenuBuilder withUngroupColumnsMenuItem(String menuLabel)

withRenameColumnGroupMenuItem

public PopupMenuBuilder withRenameColumnGroupMenuItem()

withRenameColumnGroupMenuItem

public PopupMenuBuilder withRenameColumnGroupMenuItem(String menuLabel)

withRemoveColumnGroupMenuItem

public PopupMenuBuilder withRemoveColumnGroupMenuItem()

withRemoveColumnGroupMenuItem

public PopupMenuBuilder withRemoveColumnGroupMenuItem(String menuLabel)

withInspectLabelsMenuItem

public PopupMenuBuilder withInspectLabelsMenuItem()

withCategoriesBasedColumnChooser

public PopupMenuBuilder withCategoriesBasedColumnChooser()

withCategoriesBasedColumnChooser

public PopupMenuBuilder withCategoriesBasedColumnChooser(String menuLabel)

withClearAllFilters

public PopupMenuBuilder withClearAllFilters()

withClearAllFilters

public PopupMenuBuilder withClearAllFilters(String menuLabel)

withToggleFilterRow

public PopupMenuBuilder withToggleFilterRow()
Adds a menu item for toggling the visibility of the filter row. Uses the default text localized in NatTable core resource bundles.

Returns:
The PopupMenuBuilder with the toggle filter row menu item added.
See Also:
MenuItemProviders.clearToggleFilterRowMenuItemProvider()

withToggleFilterRow

public PopupMenuBuilder withToggleFilterRow(String menuLabel)
Adds a menu item for toggling the visibility of the filter row. Uses the given String as label for the menu item.

Parameters:
menuLabel - The label to use for showing the item in the popup menu.
Returns:
The PopupMenuBuilder with the toggle filter row menu item added.
See Also:
MenuItemProviders.clearToggleFilterRowMenuItemProvider(String)

withStateManagerMenuItemProvider

public PopupMenuBuilder withStateManagerMenuItemProvider()
Adds the menu item for opening the view management dialog to the popup menu. Uses the default text localized in NatTable core resource bundles. Uses the given String as label for the menu item.

Returns:
The PopupMenuBuilder with the menu item added for showing the view management dialog for managing NatTable states.
See Also:
MenuItemProviders.stateManagerMenuItemProvider()

withStateManagerMenuItemProvider

public PopupMenuBuilder withStateManagerMenuItemProvider(String menuLabel)
Adds the menu item for opening the view management dialog to the popup menu.

Parameters:
menuLabel - The label to use for showing the item in the popup menu.
Returns:
The PopupMenuBuilder with the menu item added for showing the view management dialog for managing NatTable states.
See Also:
MenuItemProviders.stateManagerMenuItemProvider(String)

withSeparator

public PopupMenuBuilder withSeparator()
Adds a separator to the popup menu.

Returns:
The PopupMenuBuilder with an added separator.
See Also:
MenuItemProviders.separatorMenuItemProvider()

withSeparator

public PopupMenuBuilder withSeparator(String id)
Adds a separator to the popup menu with the given id.

Parameters:
id - The id to identify the separator. Necessary if there should be visibility contraints for specific separators.
Returns:
The PopupMenuBuilder with an added separator.
See Also:
MenuItemProviders.separatorMenuItemProvider()

build

public org.eclipse.swt.widgets.Menu build()
Builds and returns the created Menu.

Note: Calling this method will also add a DisposeListener to the NatTable instance to ensure the created Menu is disposed when the NatTable itself gets disposed.

Returns:
The Menu that is created by this builder.

withVisibleState

public PopupMenuBuilder withVisibleState(String id,
                                         IMenuItemState state)
Associate a visibility IMenuItemState with the menu item identified by the given id.

The visibility state is handled by the internal MenuManager. If no MenuManager is used, this method will have not effect.

For the item to be visible, all associated IMenuItemState must be active OR no IMenuItemState must be associated with the item.

Parameters:
id - the registered IMenuItemState will affect the menu item identified by the given id.
state - the IMenuItemState to queried for the visibility state of the menu item with the given id.
Returns:
This PopupMenuBuilder with the visible state checker for the given id.

withEnabledState

public PopupMenuBuilder withEnabledState(String id,
                                         IMenuItemState state)
Associate a enabled IMenuItemState with the menu item identified by the given id.

The enabled state is handled by the internal MenuManager. If no MenuManager is used, this method will have not effect.

For the item to be enabled, all associated IMenuItemState must be active OR no IMenuItemState must be associated with the item.

Parameters:
id - the registered IMenuItemState will affect the menu item identified by the given id.
state - the IMenuItemState to queried for the enabled state of the menu item with the given id.
Returns:
This PopupMenuBuilder with the enabled state checker for the given id.


Copyright © 2015. All rights reserved.