Package org.opencms.ui.contextmenu
Class CmsMenuItemVisibilityMode
java.lang.Object
org.opencms.util.A_CmsModeIntEnumeration
org.opencms.ui.contextmenu.CmsMenuItemVisibilityMode
- All Implemented Interfaces:
Serializable
The visibility modes of a context menu item in the explorer view.
- Since:
- 6.5.6
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CmsMenuItemVisibilityModeMenu item visibility: active.static final CmsMenuItemVisibilityModeMenu item visibility: inactive.static final CmsMenuItemVisibilityModeMenu item visibility: invisible.static final CmsMenuItemVisibilityModeMenu item visibility: invisible, use next best menu item with same ID. -
Method Summary
Modifier and TypeMethodDescriptionstatic CmsMenuItemVisibilityModeactiveInactive(boolean active) Utilitiy method that returns 'active' if the parameter is true, otherwise inactive.static CmsMenuItemVisibilityModeactiveInvisible(boolean active) Utility method that returns 'active' if the parameter is true, otherwise invisible.addMessageKey(String messageKey) Adds the name of the message key for the visibility mode.protected CmsMenuItemVisibilityModeclone()Returns the name of the message key for the visibility mode.booleanisActive()Returns if the mode is set toVISIBILITY_ACTIVE.booleanReturns if the mode is set toVISIBILITY_INACTIVE.booleanReturns if the mode is set toVISIBILITY_INVISIBLEorVISIBILITY_USE_NEXT.booleanReturns the prioritization flag.booleanReturns true if this item is invisible, but the next best item with the same ID should be used instead.prioritize(boolean prioritized) Returns a prioritized instance of the visibility mode.static CmsMenuItemVisibilityModevalueOf(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 Details
-
VISIBILITY_ACTIVE
Menu item visibility: active. -
VISIBILITY_INACTIVE
Menu item visibility: inactive. -
VISIBILITY_INVISIBLE
Menu item visibility: invisible. -
VISIBILITY_USE_NEXT
Menu item visibility: invisible, use next best menu item with same ID.
-
-
Method Details
-
activeInactive
Utilitiy method that returns 'active' if the parameter is true, otherwise inactive.- Parameters:
active- - whether return value should be 'active'- Returns:
- the visibility
-
activeInvisible
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
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
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
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
Returns if the mode is set toVISIBILITY_ACTIVE.- Returns:
- true if the mode is set to
VISIBILITY_ACTIVE, otherwise false
-
isInActive
Returns if the mode is set toVISIBILITY_INACTIVE.- Returns:
- true if the mode is set to
VISIBILITY_INACTIVE, otherwise false
-
isInVisible
Returns if the mode is set toVISIBILITY_INVISIBLEorVISIBILITY_USE_NEXT.- Returns:
- true if the mode is set to
VISIBILITY_INVISIBLEorVISIBILITY_USE_NEXT, otherwise false
-
isPrioritized
Returns the prioritization flag.- Returns:
- prioritization flag
-
isUseNext
Returns true if this item is invisible, but the next best item with the same ID should be used instead.- Returns:
- true if this item is invisible, but the next best item with the same ID should be used instead
-
prioritize
Returns a prioritized instance of the visibility mode.- Parameters:
prioritized-trueto prioritize- Returns:
- the new visibility mode instance
-
clone
-