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:
java.io.Serializable
public class CmsContextMenuState extends com.vaadin.shared.AbstractComponentState
The context menu state.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsContextMenuState.ContextMenuItemState
The menu item state.
-
Constructor Summary
Constructors Constructor Description CmsContextMenuState()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsContextMenuState.ContextMenuItemState
addChild(java.lang.String itemCaption, java.lang.String itemId)
Adds a child item.java.util.List<CmsContextMenuState.ContextMenuItemState>
getRootItems()
Returns the root items.boolean
isHideAutomatically()
Returns whether the menu is set to hide automatically.boolean
isOpenAutomatically()
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(java.util.List<CmsContextMenuState.ContextMenuItemState> rootItems)
Sets the root items.
-
-
-
Constructor Detail
-
CmsContextMenuState
public CmsContextMenuState()
Constructor.
-
-
Method Detail
-
addChild
public CmsContextMenuState.ContextMenuItemState addChild(java.lang.String itemCaption, java.lang.String itemId)
Adds a child item.- Parameters:
itemCaption
- the captionitemId
- the id- Returns:
- the item state
-
getRootItems
public java.util.List<CmsContextMenuState.ContextMenuItemState> 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
public void setRootItems(java.util.List<CmsContextMenuState.ContextMenuItemState> rootItems)
Sets the root items.- Parameters:
rootItems
- the root items
-
-