public class ComponentState extends Object
The component state can be COMPONENT_STATE_FOCUSED, COMPONENT_STATE_SELECTED,
COMPONENT_STATE_WINDOW_FOCUSED, COMPONENT_STATE_DISABLED, COMPONENT_STATE_CHECKED,
COMPONENT_STATE_DRAG_ENTERED, COMPONENT_STATE_DRAG_RESPONDED, COMPONENT_STATE_PRESSED
or COMPONENT_STATE_HOVERED.
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
COMPONENT_STATE_CHECKED |
Indicates a checked state.
|
static int |
COMPONENT_STATE_DISABLED |
Indicates a disabled state.
|
static int |
COMPONENT_STATE_DRAG_ENTERED |
Indicates a state that component is hovered by another component in drag process.
|
static int |
COMPONENT_STATE_DRAG_RESPONDED |
Indicates a state that can response to drag event.
|
static int |
COMPONENT_STATE_EMPTY |
Indicates a state that is empty.
|
static int |
COMPONENT_STATE_FOCUSED |
Indicates the focused state.
|
static int |
COMPONENT_STATE_HOVERED |
Indicates the hovered state.
|
static int |
COMPONENT_STATE_PRESSED |
Indicates the pressed state.
|
static int |
COMPONENT_STATE_SELECTED |
Indicates the selected state.
|
static int |
COMPONENT_STATE_WINDOW_FOCUSED |
Indicates a state that the window of the component gets focus.
|
| 构造器 | 说明 |
|---|---|
ComponentState() |
public static final int COMPONENT_STATE_CHECKED
public static final int COMPONENT_STATE_DISABLED
public static final int COMPONENT_STATE_DRAG_ENTERED
public static final int COMPONENT_STATE_DRAG_RESPONDED
public static final int COMPONENT_STATE_EMPTY
public static final int COMPONENT_STATE_FOCUSED
public static final int COMPONENT_STATE_HOVERED
public static final int COMPONENT_STATE_PRESSED
public static final int COMPONENT_STATE_SELECTED
public static final int COMPONENT_STATE_WINDOW_FOCUSED
public static boolean isStateMatched(int stateFlag,
int stateMask)
stateFlag - Indicates the state to check.stateMask - Indicates the given state.true if the state matches the given state; returns false otherwise.