org.pushingpixels.substance.api
Class ComponentStateFacet

java.lang.Object
  extended by org.pushingpixels.substance.api.ComponentStateFacet

public final class ComponentStateFacet
extends java.lang.Object

Defies a single facet of core and custom ComponentStates. See Javadocs of the ComponentState class for more information on state facets.

This class is experimental API and is likely to change in the next few releases.


Field Summary
static ComponentStateFacet ARM
          Facet that describes the arm bit.
static ComponentStateFacet DEFAULT
          Facet that describes the default bit.
static ComponentStateFacet DETERMINATE
          Facet that describes the determinate bit.
static ComponentStateFacet EDITABLE
          Facet that describes the editable bit.
static ComponentStateFacet ENABLE
          Facet that describes the enabled bit.
static ComponentStateFacet PRESS
          Facet that describes the press bit.
static ComponentStateFacet ROLLOVER
          Facet that describes the rollover bit.
static ComponentStateFacet SELECTION
          Facet that describes the selection bit.
 
Constructor Summary
ComponentStateFacet(java.lang.String name, int value)
          Creates a new facet.
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENABLE

public static final ComponentStateFacet ENABLE
Facet that describes the enabled bit.


ROLLOVER

public static final ComponentStateFacet ROLLOVER
Facet that describes the rollover bit.


SELECTION

public static final ComponentStateFacet SELECTION
Facet that describes the selection bit.


PRESS

public static final ComponentStateFacet PRESS
Facet that describes the press bit.


ARM

public static final ComponentStateFacet ARM
Facet that describes the arm bit. This is relevant for menu items.


DEFAULT

public static final ComponentStateFacet DEFAULT
Facet that describes the default bit. This is relevant for buttons which can be set as default with the JRootPane.setDefaultButton(javax.swing.JButton) API.


DETERMINATE

public static final ComponentStateFacet DETERMINATE
Facet that describes the determinate bit. This is relevant for JProgressBar control and its JProgressBar.setIndeterminate(boolean) API.


EDITABLE

public static final ComponentStateFacet EDITABLE
Facet that describes the editable bit. This is relevant for JTextComponent derived controls and its JTextComponent.setEditable(boolean) API.

Constructor Detail

ComponentStateFacet

public ComponentStateFacet(java.lang.String name,
                           int value)
Creates a new facet.

Parameters:
name - Facet name.
value - Facet value. This is used in the matching algorithm described in the javadocs of ComponentState. The larger the value, the more importance is given to the specific facet.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object