|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<ComponentState>
org.jvnet.substance.utils.ComponentState
public enum ComponentState
This enum is used in order to provide uniform transition effects on mouse
events. The effects include different visual appearance of the corresponding
control when the mouse hovers over it (rollover), when it's pressed or
selected, disabled etc.
Each enum value represents a single state and contains information that is
used by the UI delegates in order to correctly paint the corresponding
controls.
This class is for internal use only.
Nested Class Summary | |
---|---|
static class |
ComponentState.ColorSchemeKind
Enum for color scheme kind. |
Enum Constant Summary | |
---|---|
ACTIVE
Active. |
|
ARMED
Armed. |
|
DEFAULT
Default state. |
|
DISABLED_ACTIVE
Disabled active. |
|
DISABLED_SELECTED
Disabled selected. |
|
DISABLED_UNSELECTED
Disabled and not selected. |
|
PRESSED_SELECTED
Pressed selected. |
|
PRESSED_UNSELECTED
Pressed and not selected. |
|
ROLLOVER_ARMED
Armed and rolled over. |
|
ROLLOVER_SELECTED
Selected and rolled over. |
|
ROLLOVER_UNSELECTED
Not selected and rolled over. |
|
SELECTED
Selected. |
Method Summary | |
---|---|
ComponentState.ColorSchemeKind |
getColorSchemeKind()
Returns the corresponding color scheme kind |
int |
getCycleCount()
Returns the corresponding cycle count. |
static ComponentState |
getState(javax.swing.ButtonModel model,
javax.swing.JComponent component)
Retrieves component state based on the button model (required parameter) and button itself (optional parameter). |
static ComponentState |
getState(javax.swing.ButtonModel model,
javax.swing.JComponent component,
boolean toIgnoreSelection)
Retrieves component state based on the button model (required parameter) and button itself (optional parameter). |
boolean |
isKindActive(org.jvnet.lafwidget.animation.FadeKind fadeKind)
Returns indication whether this component state is
"active" under the specified fade kind. |
static ComponentState |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static ComponentState[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final ComponentState DISABLED_ACTIVE
default
.
public static final ComponentState ACTIVE
default
.
public static final ComponentState DISABLED_SELECTED
public static final ComponentState DISABLED_UNSELECTED
public static final ComponentState PRESSED_SELECTED
public static final ComponentState PRESSED_UNSELECTED
public static final ComponentState SELECTED
public static final ComponentState ROLLOVER_SELECTED
public static final ComponentState ARMED
public static final ComponentState ROLLOVER_ARMED
public static final ComponentState ROLLOVER_UNSELECTED
public static final ComponentState DEFAULT
Method Detail |
---|
public static ComponentState[] values()
for (ComponentState c : ComponentState.values()) System.out.println(c);
public static ComponentState valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic ComponentState.ColorSchemeKind getColorSchemeKind()
public int getCycleCount()
public boolean isKindActive(org.jvnet.lafwidget.animation.FadeKind fadeKind)
this
component state is
"active" under the specified fade kind. For example,
ROLLOVER_SELECTED
will return true
for both
FadeKind.ROLLOVER
and FadeKind.SELECTION
.
fadeKind
- Fade kind.
true
if this
component state is
"active" under the specified fade kind (for example,
ROLLOVER_SELECTED
will return true
for
both FadeKind.ROLLOVER
and FadeKind.SELECTION
),
false
otherwise.public static ComponentState getState(javax.swing.ButtonModel model, javax.swing.JComponent component)
model
- Button model (required).component
- Button (optional).
public static ComponentState getState(javax.swing.ButtonModel model, javax.swing.JComponent component, boolean toIgnoreSelection)
model
- Button model (required).component
- Button (optional).toIgnoreSelection
- If true
, the ButtonModel.isSelected()
will not be checked. This can be used for tracking transitions
on menu items that use armed
state instead,
when we don't want to use different rollover themes for
selected and unselected checkbox and radio button menu items
(to preserve consistent visual appearence of highlights).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |