public class MenuItemStateMap extends Object
IMenuItemStates in the
PopupMenuBuilder.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,List<IMenuItemState>> |
states
All currently registered states.
|
| Constructor and Description |
|---|
MenuItemStateMap() |
| Modifier and Type | Method and 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.
|
protected Map<String,List<IMenuItemState>> states
protected boolean isActive(String id, NatEventData natEventData)
id - the id identifying the menu item to be checked for activeness.natEventData - NatTable location information where the popup menu was
requested.true if ALL states registered for the given id are
active OR no states exist. Otherwise false.public void addMenuItemState(String id, IMenuItemState state)
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.Copyright © 2017. All rights reserved.