com.miginfocom.util.states
Class GenericStates

java.lang.Object
  extended by com.miginfocom.util.states.GenericStates

public class GenericStates
extends java.lang.Object

The states that a normal object can have.

States are OR:ed together since many states can be "on" at the same time.

To Check for a specific state you can use this code: if ((states & GenericStates.MOUSE_OVER_BIT) != 0) doMyStuff();

See Also:
States

Field Summary
static int ALL_STATES
          Denotes all states
static PropertyKey DRAGGING
           
static int DRAGGING_BIT
          The dragging state type
static PropertyKey MOUSE_OVER
           
static int MOUSE_OVER_BIT
          The mouse over state type
static PropertyKey RESIZE_END
           
static int RESIZE_END_BIT
          The activitys end time state type
static PropertyKey RESIZE_START
           
static int RESIZE_START_BIT
          The activitys start time state type
static PropertyKey SELECTED
           
static int SELECTED_BIT
          The selected state type
 
Constructor Summary
GenericStates()
           
 
Method Summary
static int keyToBit(PropertyKey stateKey)
          Returns the bit of a state that are represented by a property key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MOUSE_OVER_BIT

public static final int MOUSE_OVER_BIT
The mouse over state type

See Also:
Constant Field Values

MOUSE_OVER

public static final PropertyKey MOUSE_OVER

SELECTED_BIT

public static final int SELECTED_BIT
The selected state type

See Also:
Constant Field Values

SELECTED

public static final PropertyKey SELECTED

DRAGGING_BIT

public static final int DRAGGING_BIT
The dragging state type

See Also:
Constant Field Values

DRAGGING

public static final PropertyKey DRAGGING

RESIZE_START_BIT

public static final int RESIZE_START_BIT
The activitys start time state type

See Also:
Constant Field Values

RESIZE_START

public static final PropertyKey RESIZE_START

RESIZE_END_BIT

public static final int RESIZE_END_BIT
The activitys end time state type

See Also:
Constant Field Values

RESIZE_END

public static final PropertyKey RESIZE_END

ALL_STATES

public static final int ALL_STATES
Denotes all states

See Also:
Constant Field Values
Constructor Detail

GenericStates

public GenericStates()
Method Detail

keyToBit

public static final int keyToBit(PropertyKey stateKey)
Returns the bit of a state that are represented by a property key. E.g. MOUSE_OVER to MOUSE_OVER_BIT conversion.

Parameters:
stateKey - The state in textual form. eg. MOUSE_OVER
Returns:
The corresponding bit as an int or 0 if unknown.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.