bibliothek.gui.dock.action
Class ActionContentModifier

java.lang.Object
  extended by bibliothek.gui.dock.action.ActionContentModifier

public class ActionContentModifier
extends Object

An ActionContentModifier tells what modifications may be applied to the contents (e.g. the icon) of a StandardDockAction. All ActionContentModifier that are used by this framework will always be declared as constant in this class. Clients are however free to add additional modifiers.

Author:
Benjamin Sigg

Field Summary
static ActionContentModifier DISABLED
          the action is disabled.
static ActionContentModifier DISABLED_HORIZONTAL
          the action is disabled, the action is guaranteed to be shown horizontally
static ActionContentModifier DISABLED_HOVER
          the action is disabled and the mouse is hovering over the action.
static ActionContentModifier DISABLED_HOVER_HORIZONTAL
          the action is disabled and the mouse is hovering over the action, the action is guaranteed to be shown horizontally
static ActionContentModifier DISABLED_HOVER_VERTICAL
          the action is disabled and the mouse is hovering over the action, the action is guaranteed to be shown vertically
static ActionContentModifier DISABLED_PRESSED
          the action is disabled and the mouse is pressed over the action.
static ActionContentModifier DISABLED_PRESSED_HORIZONTAL
          the action is disabled and the mouse is pressed over the action, the action is guaranteed to be shown horizontally
static ActionContentModifier DISABLED_PRESSED_VERTICAL
          the action is disabled and the mouse is pressed over the action, the action is guaranteed to be shown vertically
static ActionContentModifier DISABLED_VERTICAL
          the action is disabled, the action is guaranteed to be shown vertically
static ActionContentModifier NONE
          no modifier at all.
static ActionContentModifier NONE_HORIZONTAL
          no modifier at all, the action is guaranteed to be shown horizontally
static ActionContentModifier NONE_HOVER
          the mouse is somehow hovering over the action.
static ActionContentModifier NONE_HOVER_HORIZONTAL
          the mouse is somehow hovering over the action, the action is guaranteed to be shown horizontally
static ActionContentModifier NONE_HOVER_VERTICAL
          the mouse is somehow hovering over the action, the action is guaranteed to be shown vertically
static ActionContentModifier NONE_PRESSED
          the mouse was pressed over the action.
static ActionContentModifier NONE_PRESSED_HORIZONTAL
          the mouse was pressed over the action, the action is guaranteed to be shown horizontally
static ActionContentModifier NONE_PRESSED_VERTICAL
          the mouse was pressed over the action, the action is guaranteed to be shown vertically
static ActionContentModifier NONE_VERTICAL
          no modifier at all, the action is guaranteed to be shown vertically
 
Constructor Summary
ActionContentModifier(String id, boolean enabled, ActionContentModifier backup)
          Creates a new modifier.
ActionContentModifier(String id, boolean enabled, boolean horizontal, boolean vertical, ActionContentModifier backup)
          Creates a new modifier.
 
Method Summary
 boolean equals(Object obj)
           
 ActionContentModifier getBackup()
          Gets the modifier which should be used if this is not available.
 int hashCode()
           
 boolean isEnabled()
          Tells whether the DockAction is supposed to be enabled if this modifier is used or not.
 boolean isHorizontal()
          Tells whether this modifier represents an action that is guaranteed to be shown horizontally.
 boolean isVertical()
          Tells whether this modifier represents an action that is guaranteed to be shown vertically.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final ActionContentModifier NONE
no modifier at all. The framework never uses this modifier directly, instead one of vertical or horizontal versions of this modifier is used.


NONE_VERTICAL

public static final ActionContentModifier NONE_VERTICAL
no modifier at all, the action is guaranteed to be shown vertically


NONE_HORIZONTAL

public static final ActionContentModifier NONE_HORIZONTAL
no modifier at all, the action is guaranteed to be shown horizontally


NONE_HOVER

public static final ActionContentModifier NONE_HOVER
the mouse is somehow hovering over the action. The framework never uses this modifier directly, instead one of vertical or horizontal versions of this modifier is used.


NONE_HOVER_VERTICAL

public static final ActionContentModifier NONE_HOVER_VERTICAL
the mouse is somehow hovering over the action, the action is guaranteed to be shown vertically


NONE_HOVER_HORIZONTAL

public static final ActionContentModifier NONE_HOVER_HORIZONTAL
the mouse is somehow hovering over the action, the action is guaranteed to be shown horizontally


NONE_PRESSED

public static final ActionContentModifier NONE_PRESSED
the mouse was pressed over the action. The framework never uses this modifier directly, instead one of vertical or horizontal versions of this modifier is used.


NONE_PRESSED_VERTICAL

public static final ActionContentModifier NONE_PRESSED_VERTICAL
the mouse was pressed over the action, the action is guaranteed to be shown vertically


NONE_PRESSED_HORIZONTAL

public static final ActionContentModifier NONE_PRESSED_HORIZONTAL
the mouse was pressed over the action, the action is guaranteed to be shown horizontally


DISABLED

public static final ActionContentModifier DISABLED
the action is disabled. The framework never uses this modifier directly, instead one of vertical or horizontal versions of this modifier is used.


DISABLED_VERTICAL

public static final ActionContentModifier DISABLED_VERTICAL
the action is disabled, the action is guaranteed to be shown vertically


DISABLED_HORIZONTAL

public static final ActionContentModifier DISABLED_HORIZONTAL
the action is disabled, the action is guaranteed to be shown horizontally


DISABLED_HOVER

public static final ActionContentModifier DISABLED_HOVER
the action is disabled and the mouse is hovering over the action. The framework never uses this modifier directly, instead one of vertical or horizontal versions of this modifier is used.


DISABLED_HOVER_VERTICAL

public static final ActionContentModifier DISABLED_HOVER_VERTICAL
the action is disabled and the mouse is hovering over the action, the action is guaranteed to be shown vertically


DISABLED_HOVER_HORIZONTAL

public static final ActionContentModifier DISABLED_HOVER_HORIZONTAL
the action is disabled and the mouse is hovering over the action, the action is guaranteed to be shown horizontally


DISABLED_PRESSED

public static final ActionContentModifier DISABLED_PRESSED
the action is disabled and the mouse is pressed over the action. The framework never uses this modifier directly, instead one of vertical or horizontal versions of this modifier is used.


DISABLED_PRESSED_VERTICAL

public static final ActionContentModifier DISABLED_PRESSED_VERTICAL
the action is disabled and the mouse is pressed over the action, the action is guaranteed to be shown vertically


DISABLED_PRESSED_HORIZONTAL

public static final ActionContentModifier DISABLED_PRESSED_HORIZONTAL
the action is disabled and the mouse is pressed over the action, the action is guaranteed to be shown horizontally

Constructor Detail

ActionContentModifier

public ActionContentModifier(String id,
                             boolean enabled,
                             ActionContentModifier backup)
Creates a new modifier.

Parameters:
id - the new modifier
enabled - whether this modifier describes an action which is enabled
backup - the modifier that applies if this is not defined. It is the callers responsibility to ensure, that no cycle of modifiers is built. This argument can be null.

ActionContentModifier

public ActionContentModifier(String id,
                             boolean enabled,
                             boolean horizontal,
                             boolean vertical,
                             ActionContentModifier backup)
Creates a new modifier.

Parameters:
id - the new modifier
enabled - whether this modifier describes an action which is enabled
horizontal - whether the action is guaranteed to be shown horizontally
vertical - whether the action is guaranteed to be shown vertically
backup - the modifier that applies if this is not defined. It is the callers responsibility to ensure, that no cycle of modifiers is built. This argument can be null.
Method Detail

getBackup

public ActionContentModifier getBackup()
Gets the modifier which should be used if this is not available.

Returns:
the modifier, can be null

isEnabled

public boolean isEnabled()
Tells whether the DockAction is supposed to be enabled if this modifier is used or not.

Returns:
whether the action is supposed to be enabled

isHorizontal

public boolean isHorizontal()
Tells whether this modifier represents an action that is guaranteed to be shown horizontally.

Returns:
true if the action is hown horizontally, false if the orientation is now known or not horizontal

isVertical

public boolean isVertical()
Tells whether this modifier represents an action that is guaranteed to be shown vertically.

Returns:
true if the action is hown vertically, false if the orientation is now known or not vertical

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object