Package org.opencms.ui.shared
Class CmsContextMenuState
java.lang.Object
com.vaadin.shared.communication.SharedState
com.vaadin.shared.AbstractComponentState
org.opencms.ui.shared.CmsContextMenuState
- All Implemented Interfaces:
Serializable
The context menu state.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe menu item state. -
Field Summary
Fields inherited from class com.vaadin.shared.AbstractComponentState
caption, captionAsHtml, description, descriptionContentMode, errorLevel, errorMessage, height, id, primaryStyleName, styles, widthFields inherited from class com.vaadin.shared.communication.SharedState
enabled, registeredEventListeners, resources -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a child item.Returns the root items.booleanReturns whether the menu is set to hide automatically.booleanReturns whether the menu is set to open automatically.voidsetHideAutomatically(boolean hideAutomatically) Enables or disables automatic hiding of context menu.voidsetOpenAutomatically(boolean openAutomatically) Enables or disables open automatically feature.voidsetRootItems(List<CmsContextMenuState.ContextMenuItemState> rootItems) Sets the root items.
-
Constructor Details
-
CmsContextMenuState
public CmsContextMenuState()Constructor.
-
-
Method Details
-
addChild
Adds a child item.- Parameters:
itemCaption- the captionitemId- the id- Returns:
- the item state
-
getRootItems
Returns the root items.- Returns:
- the root items
-
isHideAutomatically
Returns whether the menu is set to hide automatically.- Returns:
trueif context menu is hidden automatically
-
isOpenAutomatically
Returns whether the menu is set to open automatically.- Returns:
trueif 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
Enables or disables automatic hiding of context menu.- Parameters:
hideAutomatically- the hide automatically flag
-
setOpenAutomatically
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
-