Class ContextMenuItemCommand

java.lang.Object
com.levigo.jadice.web.client.ui.menu.contextmenu.ContextMenuItem
com.levigo.jadice.web.client.ui.menu.contextmenu.ContextMenuItemCommand

public class ContextMenuItemCommand extends ContextMenuItem
A menu or context menu item which executes the contained command when clicking on the item.
  • Constructor Details

    • ContextMenuItemCommand

      public ContextMenuItemCommand(Action action)
      Creates a new menu item.
      Parameters:
      action - the action for this context menu item
  • Method Details

    • setContext

      public void setContext(Collection<Object> context)
      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: ContextMenuItem
      Overriden in subclasses.
      Specified by:
      execute in class ContextMenuItem
      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).
    • isSubmenu

      public boolean isSubmenu()
      Description copied from class: ContextMenuItem
      Returns whether this item is a sub-menu or not
      Specified by:
      isSubmenu in class ContextMenuItem
      Returns:
      true if it is a sub-menu, false if not
    • onAttach

      public void onAttach()
      Description copied from class: ContextMenuItem
      Call on attach. Executes attach actions.
      Overrides:
      onAttach in class ContextMenuItem
    • onDetach

      public void onDetach()
      Description copied from class: ContextMenuItem
      Call on detach. Executes detach actions.
      Overrides:
      onDetach in class ContextMenuItem
    • update

      protected void update()