bibliothek.gui.dock.common
Enum EnableableItem

java.lang.Object
  extended by java.lang.Enum<EnableableItem>
      extended by bibliothek.gui.dock.common.EnableableItem
All Implemented Interfaces:
Serializable, Comparable<EnableableItem>

public enum EnableableItem
extends Enum<EnableableItem>

Describes one part of a CDockable that can be disabled.

Author:
Benjamin Sigg

Enum Constant Summary
ACTIONS
          Allows to disabled any CAction or DockAction
ALL
          A combination of all EnableableItem that exist
SELF
          Allows to disabled the CDockable or CStation itself
TABS
          Allows to disabled any kind of tab
TITLES
          Allows to disabled any DockTitle
 
Method Summary
static int add(int flags, EnableableItem item)
          Adds item to the flags and returns a new flag.
 int getFlag()
          Gets the flag of this item, the flag is used to store a combination of several items.
static boolean isEnabled(int flags, EnableableItem item)
          Tells whether the flags, which was created by add(int, EnableableItem) and remove(int, EnableableItem), contains item.
static int remove(int flags, EnableableItem item)
          Removes item from flags and returns a new flag.
static EnableableItem valueOf(String name)
          Returns 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're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TITLES

public static final EnableableItem TITLES
Allows to disabled any DockTitle


ACTIONS

public static final EnableableItem ACTIONS
Allows to disabled any CAction or DockAction


TABS

public static final EnableableItem TABS
Allows to disabled any kind of tab


SELF

public static final EnableableItem SELF
Allows to disabled the CDockable or CStation itself


ALL

public static final EnableableItem ALL
A combination of all EnableableItem that exist

Method Detail

values

public static final EnableableItem[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(EnableableItem c : EnableableItem.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static EnableableItem valueOf(String name)
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 name

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

public static boolean isEnabled(int flags,
                                EnableableItem item)
Tells whether the flags, which was created by add(int, EnableableItem) and remove(int, EnableableItem), contains item.

Parameters:
flags - the flags that are enabled
item - the item to test
Returns:
whether item is enabled

add

public static int add(int flags,
                      EnableableItem item)
Adds item to the flags and returns a new flag.

Parameters:
flags - the enabled items
item - the item that should be enabled too
Returns:
the new flag including flags and item

remove

public static int remove(int flags,
                         EnableableItem item)
Removes item from flags and returns a new flag.

Parameters:
flags - the enabled items
item - the item that should no longer be enabled
Returns:
the new flag including flags except item