public class VContextMenu extends VOverlay implements SubPartAware
Overlay.PositionAndSize, Overlay.ResizeAnimation
com.google.gwt.user.client.ui.PopupPanel.AnimationType, com.google.gwt.user.client.ui.PopupPanel.PositionCallback
ADDITIONAL_CLASSNAME_ANIMATE_IN, ADDITIONAL_CLASSNAME_ANIMATE_OUT, CLASSNAME_CONTAINER, CLASSNAME_SHADOW, current, Z_INDEX
Constructor and Description |
---|
VContextMenu()
This method should be used only by Client object as only one per client
should exists.
|
Modifier and Type | Method and Description |
---|---|
void |
ensureHidden(ActionOwner actionOwner)
Hides context menu if it is currently shown by given action owner.
|
com.google.gwt.user.client.Element |
getSubPartElement(String subPart)
Locates an element inside a component using the identifier provided in
subPart . |
String |
getSubPartName(com.google.gwt.user.client.Element subElement)
Provides an identifier that identifies the element within the component.
|
protected void |
imagesLoaded() |
void |
setActionOwner(ActionOwner ao)
Sets the element from which to build menu.
|
void |
showAt(ActionOwner ao,
int left,
int top) |
void |
showAt(int left,
int top)
Shows context menu at given location IF it contain at least one item.
|
getApplicationConnection, getOverlayContainer, getOverlayContainer, setApplicationConnection, setOverlayContainerLabel
center, getOwner, hide, hide, hide, isFitInWindow, isShimElementEnabled, needsShimElement, onAttach, onDetach, positionOrSizeUpdated, setFitInWindow, setHeight, setOwner, setPopupPosition, setVisible, setWidth, setZIndex, show, updateShadowSizeAndPosition
addAutoHidePartner, addCloseHandler, addPopupListener, getAnimationType, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onPreviewNativeEvent, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAnimationType, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setWidget, showRelativeTo
add, getWidget, iterator, remove, setWidget
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public VContextMenu()
protected void imagesLoaded()
public void setActionOwner(ActionOwner ao)
ao
- public void showAt(int left, int top)
left
- top
- public void showAt(ActionOwner ao, int left, int top)
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
SubPartAware
subPart
. The subPart
identifier is component specific and
may be any string of characters, numbers, space characters and brackets.getSubPartElement
in interface SubPartAware
subPart
- The identifier for the element inside the componentpublic String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAware
subElement
is a part of the component and must never be null.
Note!
getSubPartElement(getSubPartName(element)) == element
is not
always true. A component can choose to provide a more generic
identifier for any given element if the results of all interactions with
subElement
are the same as interactions with the element
identified by the return value. For example a button can return an
identifier for the root element even though a DIV inside the button was
passed as subElement
because interactions with the DIV and the
root button element produce the same result.
getSubPartName
in interface SubPartAware
subElement
- The element the identifier string should uniquely identifysubElement
or null
if no identifier could be provided.public void ensureHidden(ActionOwner actionOwner)
actionOwner
- Copyright © 2018 Vaadin Ltd. All rights reserved.