Class ContextMenu
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
Displays a menu or a context menu.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new menu with the default context menu styleUIStyle.contextMenuStyle()
.ContextMenu
(ContextMenuStyle style) Creates a new menu with the given style. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addItem
(ContextMenuItem item) Adds a item to the menu.void
Adds a Separator to separate MenuItemscom.google.gwt.user.client.ui.Widget
asWidget()
void
clear()
protected void
void
fireEvent
(com.google.gwt.event.shared.GwtEvent<?> event) Fires the givenGwtEvent
on the widget.void
hide()
boolean
void
setSuccessfulExecutionHandler
(ContextMenu.SuccessfulExecutionHandler successfulExecutionHandler) void
show
(int top, int left) Shows the menu at the given position
-
Constructor Details
-
ContextMenu
public ContextMenu()Creates a new menu with the default context menu styleUIStyle.contextMenuStyle()
.
-
-
Method Details
-
asWidget
public com.google.gwt.user.client.ui.Widget asWidget()- Specified by:
asWidget
in interfacecom.google.gwt.user.client.ui.IsWidget
-
show
public void show(int top, int left) Shows the menu at the given position- Parameters:
top
- the top offsetleft
- the left offset
-
addSeparator
public void addSeparator()Adds a Separator to separate MenuItems -
doAddSeparator
protected void doAddSeparator() -
clear
public void clear() -
hide
public void hide()
-