public class ContextMenu
extends com.vaadin.server.AbstractExtension
Modifier and Type | Class and Description |
---|---|
static interface |
ContextMenu.ContextMenuOpenListener |
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
Constructor and Description |
---|
ContextMenu(com.vaadin.ui.AbstractComponent parentComponent,
boolean setAsMenuForParentComponent) |
Modifier and Type | Method and Description |
---|---|
void |
addContextMenuOpenListener(ContextMenu.ContextMenuOpenListener contextMenuComponentListener) |
com.vaadin.ui.MenuBar.MenuItem |
addItem(String caption) |
com.vaadin.ui.MenuBar.MenuItem |
addItem(String caption,
com.vaadin.ui.MenuBar.Command command) |
com.vaadin.ui.MenuBar.MenuItem |
addItem(String caption,
com.vaadin.server.Resource icon,
com.vaadin.ui.MenuBar.Command command) |
com.vaadin.ui.MenuBar.MenuItem |
addItemBefore(String caption,
com.vaadin.server.Resource icon,
com.vaadin.ui.MenuBar.Command command,
com.vaadin.ui.MenuBar.MenuItem itemToAddBefore) |
com.vaadin.ui.MenuBar.MenuItem |
addSeparator() |
com.vaadin.ui.MenuBar.MenuItem |
addSeparatorBefore(com.vaadin.ui.MenuBar.MenuItem itemToAddBefore) |
void |
beforeClientResponse(boolean initial) |
protected com.vaadin.event.ContextClickEvent.ContextClickListener |
getContextClickListener() |
List<com.vaadin.ui.MenuBar.MenuItem> |
getItems() |
int |
getSize() |
protected ContextMenuState |
getState() |
protected ContextMenuState |
getState(boolean markAsDirty) |
boolean |
isHtmlContentAllowed() |
void |
open(int x,
int y) |
void |
removeItem(com.vaadin.ui.MenuBar.MenuItem item) |
void |
removeItems() |
void |
setAsContextMenuOf(com.vaadin.event.ContextClickEvent.ContextClickNotifier component)
Sets this as a context menu of the component.
|
void |
setHtmlContentAllowed(boolean htmlContentAllowed) |
extend, getParent, getSupportedParentType, remove, setParent
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, attach, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addAttachListener, addDetachListener, attach, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
public ContextMenu(com.vaadin.ui.AbstractComponent parentComponent, boolean setAsMenuForParentComponent)
parentComponent
- The component to whose lifecycle the context menu is tied to.setAsMenuForParentComponent
- Determines if this menu will be shown for the parent
component.protected ContextMenuState getState(boolean markAsDirty)
getState
in class com.vaadin.server.AbstractClientConnector
protected ContextMenuState getState()
getState
in class com.vaadin.server.AbstractClientConnector
public void setAsContextMenuOf(com.vaadin.event.ContextClickEvent.ContextClickNotifier component)
component
- the component to set the context menu topublic void addContextMenuOpenListener(ContextMenu.ContextMenuOpenListener contextMenuComponentListener)
public void beforeClientResponse(boolean initial)
beforeClientResponse
in interface com.vaadin.server.ClientConnector
beforeClientResponse
in class com.vaadin.server.AbstractClientConnector
public void open(int x, int y)
protected com.vaadin.event.ContextClickEvent.ContextClickListener getContextClickListener()
public com.vaadin.ui.MenuBar.MenuItem addSeparator()
public com.vaadin.ui.MenuBar.MenuItem addSeparatorBefore(com.vaadin.ui.MenuBar.MenuItem itemToAddBefore)
public com.vaadin.ui.MenuBar.MenuItem addItem(String caption)
public com.vaadin.ui.MenuBar.MenuItem addItem(String caption, com.vaadin.ui.MenuBar.Command command)
public com.vaadin.ui.MenuBar.MenuItem addItem(String caption, com.vaadin.server.Resource icon, com.vaadin.ui.MenuBar.Command command)
public com.vaadin.ui.MenuBar.MenuItem addItemBefore(String caption, com.vaadin.server.Resource icon, com.vaadin.ui.MenuBar.Command command, com.vaadin.ui.MenuBar.MenuItem itemToAddBefore)
public List<com.vaadin.ui.MenuBar.MenuItem> getItems()
public void removeItem(com.vaadin.ui.MenuBar.MenuItem item)
public void removeItems()
public int getSize()
public void setHtmlContentAllowed(boolean htmlContentAllowed)
public boolean isHtmlContentAllowed()
Copyright © 2021 Magnolia International Ltd.. All rights reserved.