| org.jvnet.substance.utils.ComponentState
ComponentState | public enum ComponentState (Code) | | 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.
author: Kirill Grouchnikov |
Inner Class :public static enum ColorSchemeKind | |
Constructor Summary | |
| ComponentState(ColorSchemeKind kind, int count, FadeKind... activeKinds) Simple constructor.
Parameters: kind - The corresponding color scheme kind. Parameters: count - The corresponding cycle count. Parameters: activeKinds - Indicates active fade kinds for this state. |
Method Summary | |
public ColorSchemeKind | getColorSchemeKind() | public int | getCycleCount() Returns the corresponding cycle count. | public static ComponentState | getState(ButtonModel model, JComponent component) Retrieves component state based on the button model (required parameter)
and button itself (optional parameter).
Parameters: model - Button model (required). Parameters: component - Button (optional). | public static ComponentState | getState(ButtonModel model, JComponent component, boolean toIgnoreSelection) Retrieves component state based on the button model (required parameter)
and button itself (optional parameter).
Parameters: model - Button model (required). Parameters: component - Button (optional). Parameters: toIgnoreSelection - If true , the ButtonModel.isSelectedwill not be checked. | public boolean | isKindActive(FadeKind fadeKind) Returns indication whether this component state is
"active" under the specified fade kind. |
ACTIVE | Enum Constant ACTIVE(Code) | | Active. Used for enabled buttons that have been marked as
default .
|
ARMED | Enum Constant ARMED(Code) | | Armed.
|
DEFAULT | Enum Constant DEFAULT(Code) | | Default state.
|
DISABLED_ACTIVE | Enum Constant DISABLED_ACTIVE(Code) | | Disabled active. Used for disabled buttons that have been marked as
default .
|
DISABLED_SELECTED | Enum Constant DISABLED_SELECTED(Code) | | Disabled selected.
|
DISABLED_UNSELECTED | Enum Constant DISABLED_UNSELECTED(Code) | | Disabled and not selected.
|
PRESSED_SELECTED | Enum Constant PRESSED_SELECTED(Code) | | Pressed selected.
|
PRESSED_UNSELECTED | Enum Constant PRESSED_UNSELECTED(Code) | | Pressed and not selected.
|
ROLLOVER_ARMED | Enum Constant ROLLOVER_ARMED(Code) | | Armed and rolled over.
|
ROLLOVER_SELECTED | Enum Constant ROLLOVER_SELECTED(Code) | | Selected and rolled over.
|
ROLLOVER_UNSELECTED | Enum Constant ROLLOVER_UNSELECTED(Code) | | Not selected and rolled over.
|
SELECTED | Enum Constant SELECTED(Code) | | Selected.
|
ComponentState | ComponentState(ColorSchemeKind kind, int count, FadeKind... activeKinds)(Code) | | Simple constructor.
Parameters: kind - The corresponding color scheme kind. Parameters: count - The corresponding cycle count. Parameters: activeKinds - Indicates active fade kinds for this state. For example,ComponentState.ROLLOVER_SELECTED should pass bothFadeKind.ROLLOVER and FadeKind.SELECTION. |
getColorSchemeKind | public ColorSchemeKind getColorSchemeKind()(Code) | | Returns the corresponding color scheme kind
Corresponding color scheme kind |
getCycleCount | public int getCycleCount()(Code) | | Returns the corresponding cycle count.
Corresponding cycle count. |
getState | public static ComponentState getState(ButtonModel model, JComponent component)(Code) | | Retrieves component state based on the button model (required parameter)
and button itself (optional parameter).
Parameters: model - Button model (required). Parameters: component - Button (optional). The matching component state. |
getState | public static ComponentState getState(ButtonModel model, JComponent component, boolean toIgnoreSelection)(Code) | | Retrieves component state based on the button model (required parameter)
and button itself (optional parameter).
Parameters: model - Button model (required). Parameters: component - Button (optional). Parameters: toIgnoreSelection - If true , the ButtonModel.isSelectedwill not be checked. This can be used for tracking transitionson menu items that use armed state instead,when we don't want to use different rollover themes forselected and unselected checkbox and radio button menu items(to preserve consistent visual appearence of highlights). The matching component state. |
isKindActive | public boolean isKindActive(FadeKind fadeKind)(Code) | | Returns indication whether this component state is
"active" under the specified fade kind. For example,
ComponentState.ROLLOVER_SELECTED will return true for both
FadeKind.ROLLOVER and
FadeKind.SELECTION .
Parameters: fadeKind - Fade kind. true if this component state is"active" under the specified fade kind (for example,ComponentState.ROLLOVER_SELECTED will return true forboth FadeKind.ROLLOVER and FadeKind.SELECTION),false otherwise. |
|
|