Package bibliothek.gui.dock.common
Enum EnableableItem
- All Implemented Interfaces:
Serializable,Comparable<EnableableItem>,java.lang.constant.Constable
Describes one part of a
CDockable that can be disabled.- Author:
- Benjamin Sigg
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic intadd(int flags, EnableableItem item) Addsitemto theflagsand returns a new flag.intgetFlag()Gets the flag of this item, the flag is used to store a combination of several items.static booleanisEnabled(int flags, EnableableItem item) Tells whether theflags, which was created byadd(int, EnableableItem)andremove(int, EnableableItem), containsitem.static intremove(int flags, EnableableItem item) Removesitemfromflagsand returns a new flag.static EnableableItemReturns the enum constant of this type with the specified name.static EnableableItem[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
TITLES
Allows to disabled anyDockTitle -
ACTIONS
Allows to disabled anyCActionorDockAction -
TABS
Allows to disabled any kind of tab -
SELF
-
ALL
A combination of allEnableableItemthat exist
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getFlag
public int getFlag()Gets the flag of this item, the flag is used to store a combination of several items.- Returns:
- the flag
-
isEnabled
Tells whether theflags, which was created byadd(int, EnableableItem)andremove(int, EnableableItem), containsitem.- Parameters:
flags- the flags that are enableditem- the item to test- Returns:
- whether
itemis enabled
-
add
Addsitemto theflagsand returns a new flag.- Parameters:
flags- the enabled itemsitem- the item that should be enabled too- Returns:
- the new flag including
flagsanditem
-
remove
Removesitemfromflagsand returns a new flag.- Parameters:
flags- the enabled itemsitem- the item that should no longer be enabled- Returns:
- the new flag including
flagsexceptitem
-