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
Modifier and TypeClassDescriptionstatic class
The menu item state. -
Field Summary
Fields inherited from class com.vaadin.shared.AbstractComponentState
caption, captionAsHtml, description, descriptionContentMode, errorLevel, errorMessage, height, id, primaryStyleName, styles, width
Fields inherited from class com.vaadin.shared.communication.SharedState
enabled, registeredEventListeners, resources
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a child item.Returns the root items.boolean
Returns whether the menu is set to hide automatically.boolean
Returns whether the menu is set to open automatically.void
setHideAutomatically
(boolean hideAutomatically) Enables or disables automatic hiding of context menu.void
setOpenAutomatically
(boolean openAutomatically) Enables or disables open automatically feature.void
setRootItems
(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:
true
if context menu is hidden automatically
-
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
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
-