|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.server.AbstractClientConnector com.vaadin.server.AbstractExtension org.vaadin.peter.contextmenu.ContextMenu
public class ContextMenu
Nested Class Summary | |
---|---|
static class |
ContextMenu.ContextMenuClosedEvent
ContextMenuClosedEvent is an event fired by the context menu when it's closed. |
static interface |
ContextMenu.ContextMenuClosedListener
ContextMenuClosedListener is used to listen for the event that the context menu is closed, either when a item is clicked or when the popup is canceled. |
class |
ContextMenu.ContextMenuItem
ContextMenuItem represents one clickable item in the context menu. |
static class |
ContextMenu.ContextMenuItemClickEvent
ContextMenuItemClickEvent is an event produced by the context menu item when it is clicked. |
static interface |
ContextMenu.ContextMenuItemClickListener
ContextMenuItemClickListener is listener for context menu items wanting to notify listeners about item click |
static interface |
ContextMenu.ContextMenuOpenedListener
ContextMenuOpenedListener is used to modify the content of context menu based on what was clicked. |
static class |
ContextMenu.ContextMenuOpenedOnComponentEvent
ContextMenuOpenedOnComponentEvent is an event fired by the context menu when it's opened from a component |
static class |
ContextMenu.ContextMenuOpenedOnTableFooterEvent
ContextMenuOpenedOnTableFooterEvent is an event that is fired by the context menu when it's opened by clicking on table footer |
static class |
ContextMenu.ContextMenuOpenedOnTableHeaderEvent
ContextMenuOpenedOnTableHeaderEvent is an event fired by the context menu when it's opened by clicking on table header row. |
static class |
ContextMenu.ContextMenuOpenedOnTableRowEvent
ContextMenuOpenedOnTableRowEvent is an event that is fired when context menu is opened by clicking on table row. |
static class |
ContextMenu.ContextMenuOpenedOnTreeItemEvent
ContextMenuOpenedOnTreeItemEvent is an event fired by the context menu when it's opened by clicking on tree item. |
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector |
---|
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 Summary | |
---|---|
ContextMenu()
|
Method Summary | |
---|---|
void |
addContextMenuCloseListener(ContextMenu.ContextMenuClosedListener contextMenuClosedListener)
Adds listener that will be invoked when context menu is closed. |
void |
addContextMenuComponentListener(ContextMenu.ContextMenuOpenedListener.ComponentListener contextMenuComponentListener)
Adds listener that will be invoked when context menu is opened from the component to which it's assigned to. |
void |
addContextMenuTableListener(ContextMenu.ContextMenuOpenedListener.TableListener contextMenuTableListener)
Adds listener that will be invoked when context menu is opened from com.vaadin.ui.Table component. |
void |
addContextMenuTreeListener(ContextMenu.ContextMenuOpenedListener.TreeListener contextMenuTreeListener)
Adds listener that will be invoked when context menu is openef from com.vaadin.ui.Tree component. |
ContextMenu.ContextMenuItem |
addItem(com.vaadin.server.Resource icon)
Adds new item to context menu root with given icon without caption. |
ContextMenu.ContextMenuItem |
addItem(String caption)
Adds new item to context menu root with given caption. |
ContextMenu.ContextMenuItem |
addItem(String caption,
com.vaadin.server.Resource icon)
Adds new item to context menu root with given caption and icon. |
void |
addItemClickListener(ContextMenu.ContextMenuItemClickListener clickListener)
Adds click listener to context menu. |
protected String |
getNextId()
|
protected ContextMenuState |
getState()
|
void |
open(int x,
int y)
Opens the context menu to given coordinates. |
void |
removeAllItems()
Removes all items from the context menu. |
void |
removeRootItem(ContextMenu.ContextMenuItem contextMenuItem)
Removes given root item from the context menu |
void |
setAsContextMenuOf(com.vaadin.server.AbstractClientConnector component)
Assigns this as context menu of given component which will react to right mouse button click. |
void |
setAsTableContextMenu(com.vaadin.ui.Table table)
Assigns this as the context menu of given table. |
void |
setAsTreeContextMenu(com.vaadin.ui.Tree tree)
Assigns this as context menu of given tree. |
void |
setOpenAutomatically(boolean openAutomatically)
Enables or disables open automatically feature. |
Methods inherited from class com.vaadin.server.AbstractExtension |
---|
extend, getParent, getSupportedParentType, remove, setParent |
Methods inherited from class com.vaadin.server.AbstractClientConnector |
---|
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getState, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vaadin.server.ClientConnector |
---|
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
Methods inherited from interface com.vaadin.shared.Connector |
---|
getConnectorId |
Constructor Detail |
---|
public ContextMenu()
Method Detail |
---|
protected String getNextId()
public void setOpenAutomatically(boolean openAutomatically)
openAutomatically
- public ContextMenu.ContextMenuItem addItem(String caption)
caption
-
public ContextMenu.ContextMenuItem addItem(com.vaadin.server.Resource icon)
icon
-
public ContextMenu.ContextMenuItem addItem(String caption, com.vaadin.server.Resource icon)
caption
- icon
-
public void removeRootItem(ContextMenu.ContextMenuItem contextMenuItem)
contextMenuItem
- public void removeAllItems()
public void setAsTableContextMenu(com.vaadin.ui.Table table)
table
- public void setAsTreeContextMenu(com.vaadin.ui.Tree tree)
tree
- public void setAsContextMenuOf(com.vaadin.server.AbstractClientConnector component)
component
- public void open(int x, int y)
x
- y
- protected ContextMenuState getState()
getState
in class com.vaadin.server.AbstractClientConnector
public void addItemClickListener(ContextMenu.ContextMenuItemClickListener clickListener)
clickListener
- public void addContextMenuTableListener(ContextMenu.ContextMenuOpenedListener.TableListener contextMenuTableListener)
contextMenuTableListener
- public void addContextMenuTreeListener(ContextMenu.ContextMenuOpenedListener.TreeListener contextMenuTreeListener)
contextMenuTreeListener
- public void addContextMenuCloseListener(ContextMenu.ContextMenuClosedListener contextMenuClosedListener)
contextMenuClosedListener
- public void addContextMenuComponentListener(ContextMenu.ContextMenuOpenedListener.ComponentListener contextMenuComponentListener)
contextMenuComponentListener
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |