Class MenuItemStateMap

java.lang.Object
org.eclipse.nebula.widgets.nattable.ui.menu.MenuItemStateMap

public class MenuItemStateMap extends Object
A helper class for managing IMenuItemStates in the PopupMenuBuilder.
  • Field Details

  • Constructor Details

    • MenuItemStateMap

      public MenuItemStateMap()
  • Method Details

    • isActive

      protected boolean isActive(String id, NatEventData natEventData)
      Checks if all the registered states for the given id are active.
      Parameters:
      id - the id identifying the menu item to be checked for activeness.
      natEventData - NatTable location information where the popup menu was requested.
      Returns:
      true if ALL states registered for the given id are active OR no states exist. Otherwise false.
    • addMenuItemState

      public void addMenuItemState(String id, IMenuItemState state)
      Add an additional state for the given id.
      Parameters:
      id - the id identifying the menu item to be associated with the given state.
      state - the state that will be called to check for activeness.