Class MenuItemStateMap
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.ui.menu.MenuItemStateMap
-
public class MenuItemStateMap extends Object
A helper class for managingIMenuItemState
s in thePopupMenuBuilder
.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,List<IMenuItemState>>
states
All currently registered states.
-
Constructor Summary
Constructors Constructor Description MenuItemStateMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMenuItemState(String id, IMenuItemState state)
Add an additional state for the given id.protected boolean
isActive(String id, NatEventData natEventData)
Checks if all the registered states for the given id are active.
-
-
-
Field Detail
-
states
protected Map<String,List<IMenuItemState>> states
All currently registered states.
-
-
Method Detail
-
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. Otherwisefalse
.
-
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.
-
-