public class CmsContextMenuState extends com.vaadin.shared.AbstractComponentState
Modifier and Type | Class and Description |
---|---|
static class |
CmsContextMenuState.ContextMenuItemState
The menu item state.
|
Constructor and Description |
---|
CmsContextMenuState()
Constructor.
|
Modifier and Type | Method and 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.
|
public CmsContextMenuState()
public CmsContextMenuState.ContextMenuItemState addChild(java.lang.String itemCaption, java.lang.String itemId)
itemCaption
- the captionitemId
- the idpublic java.util.List<CmsContextMenuState.ContextMenuItemState> getRootItems()
public boolean isHideAutomatically()
true
if context menu is hidden automaticallypublic boolean isOpenAutomatically()
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.public void setHideAutomatically(boolean hideAutomatically)
hideAutomatically
- the hide automatically flagpublic void setOpenAutomatically(boolean openAutomatically)
openAutomatically
- the open automatically flagpublic void setRootItems(java.util.List<CmsContextMenuState.ContextMenuItemState> rootItems)
rootItems
- the root items