Class ContextMenu

java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractExtension
io.jmix.ui.widget.addon.contextmenu.ContextMenu
All Implemented Interfaces:
com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Extension, com.vaadin.shared.Connector, Serializable
Direct Known Subclasses:
GridContextMenu, TableContextMenu, TreeContextMenu

public class ContextMenu extends com.vaadin.server.AbstractExtension
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     

    Nested classes/interfaces inherited from class com.vaadin.server.AbstractClientConnector

    com.vaadin.server.AbstractClientConnector.IncorrectConcurrentAccessHandler

    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

    Constructors
    Constructor
    Description
    ContextMenu(com.vaadin.ui.AbstractComponent parentComponent, boolean setAsMenuForParentComponent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    com.vaadin.ui.MenuBar.MenuItem
    addItem(String caption)
     
    com.vaadin.ui.MenuBar.MenuItem
    addItem(String caption, com.vaadin.server.Resource icon, com.vaadin.ui.MenuBar.Command command)
     
    com.vaadin.ui.MenuBar.MenuItem
    addItem(String caption, 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
     
    com.vaadin.ui.MenuBar.MenuItem
    addSeparatorBefore(com.vaadin.ui.MenuBar.MenuItem itemToAddBefore)
     
    void
    beforeClientResponse(boolean initial)
     
    protected com.vaadin.event.ContextClickEvent.ContextClickListener
     
    List<com.vaadin.ui.MenuBar.MenuItem>
     
    int
     
     
    getState(boolean markAsDirty)
     
    boolean
     
    void
    open(int x, int y)
     
    void
    removeItem(com.vaadin.ui.MenuBar.MenuItem item)
     
    void
     
    void
    setAsContextMenuOf(com.vaadin.event.ContextClickEvent.ContextClickNotifier component)
    Sets this as a context menu of the component.
    void
    setHtmlContentAllowed(boolean htmlContentAllowed)
     

    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, addListener, addListener, addListener, addMethodInvocationToQueue, attach, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getIncorrectConcurrentAccessHandler, 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, setConnectorResource, setErrorHandler, setIncorrectConcurrentAccessHandler, setResource, updateDiffstate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.server.ClientConnector

    addAttachListener, addDetachListener, attach, 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 Details

    • ContextMenu

      public ContextMenu(com.vaadin.ui.AbstractComponent parentComponent, boolean setAsMenuForParentComponent)
      Parameters:
      parentComponent - The component to whose lifecycle the context menu is tied to.
      setAsMenuForParentComponent - Determines if this menu will be shown for the parent component.
  • Method Details

    • getState

      protected ContextMenuState getState(boolean markAsDirty)
      Overrides:
      getState in class com.vaadin.server.AbstractClientConnector
    • getState

      protected ContextMenuState getState()
      Overrides:
      getState in class com.vaadin.server.AbstractClientConnector
    • setAsContextMenuOf

      public void setAsContextMenuOf(com.vaadin.event.ContextClickEvent.ContextClickNotifier component)
      Sets this as a context menu of the component. You can set one menu to as many components as you wish.
      Parameters:
      component - the component to set the context menu to
    • addContextMenuOpenListener

      public void addContextMenuOpenListener(ContextMenu.ContextMenuOpenListener contextMenuComponentListener)
    • beforeClientResponse

      public void beforeClientResponse(boolean initial)
      Specified by:
      beforeClientResponse in interface com.vaadin.server.ClientConnector
      Overrides:
      beforeClientResponse in class com.vaadin.server.AbstractClientConnector
    • open

      public void open(int x, int y)
    • getContextClickListener

      protected com.vaadin.event.ContextClickEvent.ContextClickListener getContextClickListener()
    • addSeparator

      public com.vaadin.ui.MenuBar.MenuItem addSeparator()
    • addSeparatorBefore

      public com.vaadin.ui.MenuBar.MenuItem addSeparatorBefore(com.vaadin.ui.MenuBar.MenuItem itemToAddBefore)
    • addItem

      public com.vaadin.ui.MenuBar.MenuItem addItem(String caption)
    • addItem

      public com.vaadin.ui.MenuBar.MenuItem addItem(String caption, @Nullable com.vaadin.ui.MenuBar.Command command)
    • addItem

      public com.vaadin.ui.MenuBar.MenuItem addItem(String caption, com.vaadin.server.Resource icon, @Nullable com.vaadin.ui.MenuBar.Command command)
    • addItemBefore

      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)
    • getItems

      public List<com.vaadin.ui.MenuBar.MenuItem> getItems()
    • removeItem

      public void removeItem(com.vaadin.ui.MenuBar.MenuItem item)
    • removeItems

      public void removeItems()
    • getSize

      public int getSize()
    • setHtmlContentAllowed

      public void setHtmlContentAllowed(boolean htmlContentAllowed)
    • isHtmlContentAllowed

      public boolean isHtmlContentAllowed()