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.ContextMenuItemState
addChild(java.lang.String caption, java.lang.String id)
Adds a child item.boolean
equals(java.lang.Object obj)
java.lang.String
getCaption()
Returns the caption.java.util.List<CmsContextMenuState.ContextMenuItemState>
getChildren()
Returns the child items.java.lang.String
getDescription()
Returns the description.java.lang.String
getId()
Returns the id.java.util.Set<java.lang.String>
getStyles()
Returns the styles.int
hashCode()
boolean
isEnabled()
Returns whether the item is enabled.boolean
isSeparator()
Returns whether a separator should be displayed.void
removeChild(CmsContextMenuState.ContextMenuItemState child)
Removes the given child.void
setCaption(java.lang.String caption)
Sets the caption.void
setChildren(java.util.List<CmsContextMenuState.ContextMenuItemState> children)
Sets the child items.void
setDescription(java.lang.String description)
Sets the description.void
setEnabled(boolean enabled)
Sets the item enabled.void
setId(java.lang.String id)
Sets the id.void
setSeparator(boolean separator)
Sets whether a separator should be displayed.void
setStyles(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:
equals
in 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:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
isSeparator
public boolean isSeparator()
Returns whether a separator should be displayed.- Returns:
true
if a separator should be displayed
-
isEnabled
public boolean isEnabled()
Returns whether the item is enabled.- Returns:
true
if 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
-true
to 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
-true
if a separator should be displayed
-
setStyles
public void setStyles(java.util.Set<java.lang.String> styleNames)
Sets the styles.- Parameters:
styleNames
- the styles
-
-