Package org.opencms.ui.contextmenu
Class CmsMenuItemVisibilityMode
- java.lang.Object
-
- org.opencms.util.A_CmsModeIntEnumeration
-
- org.opencms.ui.contextmenu.CmsMenuItemVisibilityMode
-
- All Implemented Interfaces:
java.io.Serializable
public final class CmsMenuItemVisibilityMode extends A_CmsModeIntEnumeration
The visibility modes of a context menu item in the explorer view.- Since:
- 6.5.6
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static CmsMenuItemVisibilityMode
VISIBILITY_ACTIVE
Menu item visibility: active.static CmsMenuItemVisibilityMode
VISIBILITY_INACTIVE
Menu item visibility: inactive.static CmsMenuItemVisibilityMode
VISIBILITY_INVISIBLE
Menu item visibility: invisible.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CmsMenuItemVisibilityMode
activeInactive(boolean active)
Utilitiy method that returns 'active' if the parameter is true, otherwise inactive.static CmsMenuItemVisibilityMode
activeInvisible(boolean active)
Utility method that returns 'active' if the parameter is true, otherwise invisible.CmsMenuItemVisibilityMode
addMessageKey(java.lang.String messageKey)
Adds the name of the message key for the visibility mode.protected CmsMenuItemVisibilityMode
clone()
java.lang.String
getMessageKey()
Returns the name of the message key for the visibility mode.boolean
isActive()
Returns if the mode is set toVISIBILITY_ACTIVE
.boolean
isInActive()
Returns if the mode is set toVISIBILITY_INACTIVE
.boolean
isInVisible()
Returns if the mode is set toVISIBILITY_INVISIBLE
.boolean
isPrioritized()
Returns the prioritization flag.CmsMenuItemVisibilityMode
prioritize(boolean prioritized)
Returns a prioritized instance of the visibility mode.static CmsMenuItemVisibilityMode
valueOf(int type)
Returns the menu item visibility mode for the given mode value.-
Methods inherited from class org.opencms.util.A_CmsModeIntEnumeration
equals, getMode, hashCode, toString
-
-
-
-
Field Detail
-
VISIBILITY_ACTIVE
public static final CmsMenuItemVisibilityMode VISIBILITY_ACTIVE
Menu item visibility: active.
-
VISIBILITY_INACTIVE
public static final CmsMenuItemVisibilityMode VISIBILITY_INACTIVE
Menu item visibility: inactive.
-
VISIBILITY_INVISIBLE
public static final CmsMenuItemVisibilityMode VISIBILITY_INVISIBLE
Menu item visibility: invisible.
-
-
Method Detail
-
activeInactive
public static CmsMenuItemVisibilityMode activeInactive(boolean active)
Utilitiy method that returns 'active' if the parameter is true, otherwise inactive.- Parameters:
active
- - whether return value should be 'active'- Returns:
- the visibility
-
activeInvisible
public static CmsMenuItemVisibilityMode activeInvisible(boolean active)
Utility method that returns 'active' if the parameter is true, otherwise invisible.- Parameters:
active
- - whether return value should be 'active' rather than 'invisible'- Returns:
- the visibility
-
valueOf
public static CmsMenuItemVisibilityMode valueOf(int type)
Returns the menu item visibility mode for the given mode value.This is used only for serialization and should not be accessed for other purposes.
- Parameters:
type
- the mode value to get the item visibility mode for- Returns:
- the menu item visibility mode for the given mode value
-
addMessageKey
public CmsMenuItemVisibilityMode addMessageKey(java.lang.String messageKey)
Adds the name of the message key for the visibility mode.- Parameters:
messageKey
- the name of the message key for the visibility mode- Returns:
- an extended visibility mode containing the message key
-
getMessageKey
public java.lang.String getMessageKey()
Returns the name of the message key for the visibility mode.Is usually used as description for the inactive visibility modes.
- Returns:
- the name of the message key for the visibility mode
-
isActive
public boolean isActive()
Returns if the mode is set toVISIBILITY_ACTIVE
.- Returns:
- true if the mode is set to
VISIBILITY_ACTIVE
, otherwise false
-
isInActive
public boolean isInActive()
Returns if the mode is set toVISIBILITY_INACTIVE
.- Returns:
- true if the mode is set to
VISIBILITY_INACTIVE
, otherwise false
-
isInVisible
public boolean isInVisible()
Returns if the mode is set toVISIBILITY_INVISIBLE
.- Returns:
- true if the mode is set to
VISIBILITY_INVISIBLE
, otherwise false
-
isPrioritized
public boolean isPrioritized()
Returns the prioritization flag.- Returns:
- prioritization flag
-
prioritize
public CmsMenuItemVisibilityMode prioritize(boolean prioritized)
Returns a prioritized instance of the visibility mode.- Parameters:
prioritized
-true
to prioritize- Returns:
- the new visibility mode instance
-
clone
protected CmsMenuItemVisibilityMode clone()
- Overrides:
clone
in classjava.lang.Object
- See Also:
Object.clone()
-
-