Class CmsContextMenuState

java.lang.Object
com.vaadin.shared.communication.SharedState
com.vaadin.shared.AbstractComponentState
org.opencms.ui.shared.CmsContextMenuState
All Implemented Interfaces:
Serializable

public class CmsContextMenuState extends com.vaadin.shared.AbstractComponentState
The context menu state.

See Also:
  • Constructor Details

  • Method Details

    • addChild

      Adds a child item.

      Parameters:
      itemCaption - the caption
      itemId - the id
      Returns:
      the item state
    • getRootItems

      Returns the root items.

      Returns:
      the root items
    • isHideAutomatically

      public boolean isHideAutomatically()
      Returns whether the menu is set to hide automatically.

      Returns:
      true if context menu is hidden automatically
    • isOpenAutomatically

      public boolean isOpenAutomatically()
      Returns whether the menu is set to open automatically.

      Returns:
      true if open automatically is on. If open automatically is on, it means that context menu will always be opened when it's host component is right clicked. If automatic opening is turned off, context menu will only open when server side open(x, y) is called.
    • setHideAutomatically

      public void setHideAutomatically(boolean hideAutomatically)
      Enables or disables automatic hiding of context menu.

      Parameters:
      hideAutomatically - the hide automatically flag
    • setOpenAutomatically

      public void setOpenAutomatically(boolean openAutomatically)
      Enables or disables open automatically feature. If open automatically is on, it means that context menu will always be opened when it's host component is right clicked. If automatic opening is turned off, context menu will only open when server side open(x, y) is called.

      Parameters:
      openAutomatically - the open automatically flag
    • setRootItems

      Sets the root items.

      Parameters:
      rootItems - the root items