Package org.opencms.ui.shared
Class CmsContextMenuState.ContextMenuItemState
- java.lang.Object
-
- org.opencms.ui.shared.CmsContextMenuState.ContextMenuItemState
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- CmsContextMenuState
public static class CmsContextMenuState.ContextMenuItemState extends java.lang.Object implements java.io.Serializable
The menu item state.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ContextMenuItemState()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsContextMenuState.ContextMenuItemStateaddChild(java.lang.String caption, java.lang.String id)Adds a child item.booleanequals(java.lang.Object obj)java.lang.StringgetCaption()Returns the caption.java.util.List<CmsContextMenuState.ContextMenuItemState>getChildren()Returns the child items.java.lang.StringgetDescription()Returns the description.java.lang.StringgetId()Returns the id.java.util.Set<java.lang.String>getStyles()Returns the styles.inthashCode()booleanisEnabled()Returns whether the item is enabled.booleanisSeparator()Returns whether a separator should be displayed.voidremoveChild(CmsContextMenuState.ContextMenuItemState child)Removes the given child.voidsetCaption(java.lang.String caption)Sets the caption.voidsetChildren(java.util.List<CmsContextMenuState.ContextMenuItemState> children)Sets the child items.voidsetDescription(java.lang.String description)Sets the description.voidsetEnabled(boolean enabled)Sets the item enabled.voidsetId(java.lang.String id)Sets the id.voidsetSeparator(boolean separator)Sets whether a separator should be displayed.voidsetStyles(java.util.Set<java.lang.String> styleNames)Sets the styles.
-
-
-
Constructor Detail
-
ContextMenuItemState
public ContextMenuItemState()
Constructor.
-
-
Method Detail
-
addChild
public CmsContextMenuState.ContextMenuItemState addChild(java.lang.String caption, java.lang.String id)
Adds a child item.- Parameters:
caption- the captionid- the id- Returns:
- the child item state
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
getCaption
public java.lang.String getCaption()
Returns the caption.- Returns:
- the caption
-
getChildren
public java.util.List<CmsContextMenuState.ContextMenuItemState> getChildren()
Returns the child items.- Returns:
- the child items
-
getDescription
public java.lang.String getDescription()
Returns the description.- Returns:
- the description
-
getId
public java.lang.String getId()
Returns the id.- Returns:
- the id
-
getStyles
public java.util.Set<java.lang.String> getStyles()
Returns the styles.- Returns:
- the styles
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
isSeparator
public boolean isSeparator()
Returns whether a separator should be displayed.- Returns:
trueif a separator should be displayed
-
isEnabled
public boolean isEnabled()
Returns whether the item is enabled.- Returns:
trueif the item is enabled
-
removeChild
public void removeChild(CmsContextMenuState.ContextMenuItemState child)
Removes the given child.- Parameters:
child- the child to remove
-
setCaption
public void setCaption(java.lang.String caption)
Sets the caption.- Parameters:
caption- the caption
-
setChildren
public void setChildren(java.util.List<CmsContextMenuState.ContextMenuItemState> children)
Sets the child items.- Parameters:
children- the children
-
setDescription
public void setDescription(java.lang.String description)
Sets the description.- Parameters:
description- the description to set
-
setEnabled
public void setEnabled(boolean enabled)
Sets the item enabled.- Parameters:
enabled-trueto enable the item
-
setId
public void setId(java.lang.String id)
Sets the id.- Parameters:
id- the id to set
-
setSeparator
public void setSeparator(boolean separator)
Sets whether a separator should be displayed.- Parameters:
separator-trueif a separator should be displayed
-
setStyles
public void setStyles(java.util.Set<java.lang.String> styleNames)
Sets the styles.- Parameters:
styleNames- the styles
-
-