public class ContextMenuItemWidget
extends com.google.gwt.user.client.ui.FocusWidget
Modifier and Type | Field and Description |
---|---|
protected com.google.gwt.dom.client.ImageElement |
icon |
Constructor and Description |
---|
ContextMenuItemWidget() |
Modifier and Type | Method and Description |
---|---|
void |
addSubMenuItem(ContextMenuItemWidget contextMenuItem)
Adds given context menu item into the sub menu of this item.
|
void |
clearItems()
Removes all the items from the submenu of this item.
|
void |
closeSiblingMenus() |
protected void |
closeThisAndSelectParent() |
boolean |
eventTargetsPopup(com.google.gwt.user.client.Event nativeEvent) |
String |
getId() |
ContextMenuItemWidget |
getParentItem() |
boolean |
hasSubMenu() |
void |
hideSubMenu()
Hides the sub menu that's been opened from this item
|
boolean |
isRootItem() |
boolean |
isSubmenuOpen() |
protected boolean |
onItemClicked()
Called when context menu item is clicked or is focused and enter is
pressed.
|
protected void |
selectLowerSibling() |
protected void |
selectUpperSibling() |
void |
setCaption(String caption) |
void |
setEnabled(boolean enabled) |
void |
setFocus(boolean focused) |
void |
setIcon(String url) |
void |
setId(String id) |
void |
setOverlay(org.vaadin.peter.contextmenu.client.ContextMenuOverlay owner)
Sets the menu component to which this item belongs to
|
void |
setParentItem(ContextMenuItemWidget parentItem)
Sets parent item meaning that this item is in the sub menu of given
parent item.
|
void |
setRootComponent(ContextMenuWidget rootComponent) |
void |
setSeparatorVisible(boolean separatorVisible) |
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setTabIndex
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
public void setFocus(boolean focused)
setFocus
in interface com.google.gwt.user.client.ui.Focusable
setFocus
in class com.google.gwt.user.client.ui.FocusWidget
public boolean hasSubMenu()
public void hideSubMenu()
public boolean isRootItem()
public void setOverlay(org.vaadin.peter.contextmenu.client.ContextMenuOverlay owner)
owner
- public void setParentItem(ContextMenuItemWidget parentItem)
parentItem
- public ContextMenuItemWidget getParentItem()
public boolean isSubmenuOpen()
public void clearItems()
public void addSubMenuItem(ContextMenuItemWidget contextMenuItem)
contextMenuItem
- public void setCaption(String caption)
public void setIcon(String url)
public void setRootComponent(ContextMenuWidget rootComponent)
public void setId(String id)
public String getId()
public void closeSiblingMenus()
protected void selectLowerSibling()
protected void selectUpperSibling()
protected void closeThisAndSelectParent()
protected boolean onItemClicked()
public boolean eventTargetsPopup(com.google.gwt.user.client.Event nativeEvent)
nativeEvent
- public void setSeparatorVisible(boolean separatorVisible)
public void setEnabled(boolean enabled)
setEnabled
in interface com.google.gwt.user.client.ui.HasEnabled
setEnabled
in class com.google.gwt.user.client.ui.FocusWidget
Copyright © 2016 Magnolia International Ltd.. All rights reserved.