Class ContextMenuItemCommand
java.lang.Object
com.levigo.jadice.web.client.ui.menu.contextmenu.ContextMenuItem
com.levigo.jadice.web.client.ui.menu.contextmenu.ContextMenuItemCommand
A menu or context menu item which executes the contained command when clicking on the item.
-
Field Summary
Fields inherited from class com.levigo.jadice.web.client.ui.menu.contextmenu.ContextMenuItem
handler, parentWidget -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(com.google.gwt.dom.client.Element rowElement) Overriden in subclasses.booleanReturns whether this item is a sub-menu or notvoidonAttach()Call on attach.voidonDetach()Call on detach.voidsetContext(Collection<Object> context) Sets the context to this itemprotected voidupdate()Methods inherited from class com.levigo.jadice.web.client.ui.menu.contextmenu.ContextMenuItem
_onKeyDown, getKeyStrokeString, getLabel, hide, init, onKeyDown, setAvailable, setEnabled, setHover, setSelected
-
Constructor Details
-
ContextMenuItemCommand
Creates a new menu item.- Parameters:
action- the action for this context menu item
-
-
Method Details
-
setContext
Sets the context to this item- Parameters:
context- the context
-
execute
public boolean execute(com.google.gwt.dom.client.Element rowElement) Description copied from class:ContextMenuItemOverriden in subclasses.- Specified by:
executein classContextMenuItem- Parameters:
rowElement- An element that can be used to dynamically place the new context menu entry.- Returns:
- True if it was successfully executed (stop propagation, prevent default browser behavior).
-
onAttach
public void onAttach()Description copied from class:ContextMenuItemCall on attach. Executes attach actions.- Overrides:
onAttachin classContextMenuItem
-
onDetach
public void onDetach()Description copied from class:ContextMenuItemCall on detach. Executes detach actions.- Overrides:
onDetachin classContextMenuItem
-
update
protected void update()
-