java.lang.Object
com.levigo.jadice.web.client.ui.menu.contextmenu.ContextMenu
All Implemented Interfaces:
com.google.gwt.user.client.ui.IsWidget
Direct Known Subclasses:
ContextMenuSubMenu

public class ContextMenu extends Object implements com.google.gwt.user.client.ui.IsWidget
Displays a menu or a context menu.
  • Constructor Details

    • ContextMenu

      public ContextMenu()
      Creates a new menu with the default context menu style UIStyle.contextMenuStyle().
    • ContextMenu

      public ContextMenu(ContextMenuStyle style)
      Creates a new menu with the given style.
      Parameters:
      style - the style for the menu or context menu
  • Method Details

    • asWidget

      public com.google.gwt.user.client.ui.Widget asWidget()
      Specified by:
      asWidget in interface com.google.gwt.user.client.ui.IsWidget
    • fireEvent

      public void fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
      Fires the given GwtEvent on the widget.
      Parameters:
      event - the event which should be fired
    • setSuccessfulExecutionHandler

      public void setSuccessfulExecutionHandler(ContextMenu.SuccessfulExecutionHandler successfulExecutionHandler)
    • show

      public void show(int top, int left)
      Shows the menu at the given position
      Parameters:
      top - the top offset
      left - the left offset
    • addItem

      public void addItem(ContextMenuItem item)
      Adds a item to the menu.
      Parameters:
      item - the item which should be added
    • addSeparator

      public void addSeparator()
      Adds a Separator to separate MenuItems
    • doAddSeparator

      protected void doAddSeparator()
    • clear

      public void clear()
    • hide

      public void hide()
    • isSubmenu

      public boolean isSubmenu()