org.havi.ui
Interface HState

All Known Implementing Classes:
HAnimation, HGraphicButton, HIcon, HListGroup, HMultilineEntry, HRange, HRangeValue, HSinglelineEntry, HStaticAnimation, HStaticIcon, HStaticRange, HStaticText, HText, HTextButton, HToggleButton, HVisible

public interface HState

The HState interface encapsulates constants for component states which are used in the various HVisible setContent and getContent methods to indicate which state the specified content is to be set.

There are two sets of constants defined in this interface. The first set are mutually exclusive state bits, which define properties of the component. The order of the states is important; each state has precedence over the one before it when considering the effect on the component. For example, the DISABLED_STATE_BIT property is considered the most significant property of a state. The state bits are shown in the table below.

NameInterpretation
FOCUSED_STATE_BITcomponent has focus
ACTIONED_STATE_BITcomponent is actioned
DISABLED_STATE_BITcomponent is disabled

The state bits combine to provide the actual interaction states which HVisible components may be in. Content for components is set on these states, not the state bits shown above. The interaction states are shown in the table below.

StateDISABLED_BITACTIONED_BIT FOCUSED_BIT
NORMAL_STATE 000
FOCUSED_STATE 001
ACTIONED_STATE 010
ACTIONED_FOCUSED_STATE011
DISABLED_STATE 100
DISABLED_FOCUSED_STATE101
DISABLED_ACTIONED_STATE110
DISABLED_ACTIONED_FOCUSED_STATE111

See Also:
HVisible.setTextContent(java.lang.String, int), HVisible.getTextContent(int), HVisible.setGraphicContent(java.awt.Image, int), HVisible.getGraphicContent(int), HVisible.setAnimateContent(java.awt.Image[], int), HVisible.getAnimateContent(int), HVisible.setContent(java.lang.Object, int), HVisible.getContent(int), HVisible.setInteractionState(int), HVisible.getInteractionState()

Field Summary
static int ACTIONED_FOCUSED_STATE
          This state indicates that the widget has been actioned, and has focus.
static int ACTIONED_STATE
          This state indicates that the widget has been actioned, but does not have focus.
static int ACTIONED_STATE_BIT
          This state bit indicates that the widget has been actioned.
static int ALL_STATES
          Constant used to indicate all of the applicable states for a given component.
static int DISABLED_ACTIONED_FOCUSED_STATE
          This state indicates that the widget has been actioned and has input focus but is disabled.
static int DISABLED_ACTIONED_STATE
          This state indicates that the widget has been actioned but is disabled.
static int DISABLED_FOCUSED_STATE
          This state indicates that the widget has input focus but is disabled.
static int DISABLED_STATE
          This state indicates that the widget is disabled.
static int DISABLED_STATE_BIT
          This state bit indicates that the component is disabled.
static int FIRST_STATE
          Constant used to indicate the value of the first (builtin) component state.
static int FOCUSED_STATE
          This state indicates that the widget has input focus.
static int FOCUSED_STATE_BIT
          This state bit indicates that the widget has the input focus.
static int LAST_STATE
          Constant used to indicate the value of the last (builtin) component state.
static int NORMAL_STATE
          This constant (i.e.
 

Field Detail

FOCUSED_STATE_BIT

static final int FOCUSED_STATE_BIT
This state bit indicates that the widget has the input focus. This state is only valid for widgets implementing HNavigable. If state-based content is not used, the associated look should visually distinguish components with this bit set e.g. by highlighting them.

See Also:
Constant Field Values

ACTIONED_STATE_BIT

static final int ACTIONED_STATE_BIT
This state bit indicates that the widget has been actioned. HActionable components only have this bit set for the duration of the calls to their registered ActionListeners, whereas HSwitchable components may remain with the ACTIONED bit set until further user input causes them to leave it. If state-based content is not used, the associated look should visually distinguish components with this bit set e.g. by drawing them as "pushed in".

See Also:
Constant Field Values

DISABLED_STATE_BIT

static final int DISABLED_STATE_BIT
This state bit indicates that the component is disabled. Regardless of other bits being set it shall not respond to user action, shortcut keys or mouse clicks. However the component is only disabled at the HAVi level. It may still receive AWT events directly, which interoperable components must ignore. If state-based content is not used the associated look should visually distinguish components with this bit set e.g. by graying them out.

See Also:
Constant Field Values

FIRST_STATE

static final int FIRST_STATE
Constant used to indicate the value of the first (builtin) component state.

See Also:
Constant Field Values

NORMAL_STATE

static final int NORMAL_STATE
This constant (i.e. no state bits set) indicates that the widget is in its normal state. This state is applicable to all HVisible components.

See Also:
HVisible, Constant Field Values

FOCUSED_STATE

static final int FOCUSED_STATE
This state indicates that the widget has input focus. This state is applicable to all HNavigable components.

See Also:
HNavigable, Constant Field Values

ACTIONED_STATE

static final int ACTIONED_STATE
This state indicates that the widget has been actioned, but does not have focus. HSwitchable components may stay in this state until they are actioned again. This state is applicable to all HActionable and HSwitchable components.

See Also:
HActionable, HSwitchable, Constant Field Values

ACTIONED_FOCUSED_STATE

static final int ACTIONED_FOCUSED_STATE
This state indicates that the widget has been actioned, and has focus. HSwitchable components may stay in this state until they are actioned again. This state is applicable to all HActionable and HSwitchable components.

See Also:
HActionable, HSwitchable, Constant Field Values

DISABLED_STATE

static final int DISABLED_STATE
This state indicates that the widget is disabled. This state is applicable to all HVisible components.

See Also:
HVisible, Constant Field Values

DISABLED_FOCUSED_STATE

static final int DISABLED_FOCUSED_STATE
This state indicates that the widget has input focus but is disabled. This state is applicable to all HNavigable components.

See Also:
HNavigable, Constant Field Values

DISABLED_ACTIONED_STATE

static final int DISABLED_ACTIONED_STATE
This state indicates that the widget has been actioned but is disabled. This state is applicable to all HSwitchable components.

See Also:
HSwitchable, Constant Field Values

DISABLED_ACTIONED_FOCUSED_STATE

static final int DISABLED_ACTIONED_FOCUSED_STATE
This state indicates that the widget has been actioned and has input focus but is disabled. This state is applicable to all HSwitchable components.

See Also:
HSwitchable, Constant Field Values

ALL_STATES

static final int ALL_STATES
Constant used to indicate all of the applicable states for a given component.

Note that the ALL_STATES constant should only be used in setting content

The ALL_STATES constant should not be used for retrieving content:

See Also:
Constant Field Values

LAST_STATE

static final int LAST_STATE
Constant used to indicate the value of the last (builtin) component state.

See Also:
Constant Field Values