|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Name | Interpretation |
---|---|
FOCUSED_STATE_BIT | component has focus |
ACTIONED_STATE_BIT | component is actioned |
DISABLED_STATE_BIT | component 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.
State | DISABLED_BIT | ACTIONED_BIT | FOCUSED_BIT |
---|---|---|---|
NORMAL_STATE
| 0 | 0 | 0 |
FOCUSED_STATE
| 0 | 0 | 1 |
ACTIONED_STATE
| 0 | 1 | 0 |
ACTIONED_FOCUSED_STATE | 0 | 1 | 1 |
DISABLED_STATE
| 1 | 0 | 0 |
DISABLED_FOCUSED_STATE | 1 | 0 | 1 |
DISABLED_ACTIONED_STATE | 1 | 1 | 0 |
DISABLED_ACTIONED_FOCUSED_STATE | 1 | 1 | 1 |
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. no state bits set) indicates that the widget is in its normal state. |
Field Detail |
---|
static final int FOCUSED_STATE_BIT
static final int ACTIONED_STATE_BIT
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".
static final int DISABLED_STATE_BIT
static final int FIRST_STATE
static final int NORMAL_STATE
HVisible
components.
HVisible
,
Constant Field Valuesstatic final int FOCUSED_STATE
HNavigable
components.
HNavigable
,
Constant Field Valuesstatic final int ACTIONED_STATE
HSwitchable
components may stay in this state until they are actioned
again. This state is applicable to all
HActionable
and
HSwitchable
components.
HActionable
,
HSwitchable
,
Constant Field Valuesstatic final int ACTIONED_FOCUSED_STATE
HSwitchable
components may stay in this state until they are actioned
again. This state is applicable to all
HActionable
and
HSwitchable
components.
HActionable
,
HSwitchable
,
Constant Field Valuesstatic final int DISABLED_STATE
HVisible
components.
HVisible
,
Constant Field Valuesstatic final int DISABLED_FOCUSED_STATE
HNavigable
components.
HNavigable
,
Constant Field Valuesstatic final int DISABLED_ACTIONED_STATE
HSwitchable
components.
HSwitchable
,
Constant Field Valuesstatic final int DISABLED_ACTIONED_FOCUSED_STATE
HSwitchable
components.
HSwitchable
,
Constant Field Valuesstatic final int ALL_STATES
Note that the ALL_STATES
constant should only be
used in setting content
HVisible.setTextContent
HVisible.setGraphicContent
HVisible.setAnimateContent
HVisible.setContent
The ALL_STATES
constant should not be used for
retrieving content:
HVisible.getTextContent
HVisible.getGraphicContent
HVisible.getAnimateContent
HVisible.getContent
static final int LAST_STATE
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |