org.jvnet.substance.api
Class ColorSchemeAssociationKind

java.lang.Object
  extended by org.jvnet.substance.api.ColorSchemeAssociationKind

public class ColorSchemeAssociationKind
extends java.lang.Object

Allows associating different color schemes to different visual parts of UI components. For example, the JCheckBox has three different visual areas:

Applications can create custom instances of this class to further refine the control over the painting. In this case, the custom UI delegates must be created to use these new association kinds.

Since:
version 5.1
Author:
Kirill Grouchnikov

Field Summary
static ColorSchemeAssociationKind BORDER
          Border visual area of non-tab controls.
static ColorSchemeAssociationKind FILL
          The default visual area that is used for the inner part of most controls.
static ColorSchemeAssociationKind HIGHLIGHT
          Highlight visual areas for lists, tables, trees and menus.
static ColorSchemeAssociationKind HIGHLIGHT_BORDER
          Border visual areas for highlighted regions of lists, tables, trees and menus.
static ColorSchemeAssociationKind MARK
          Visual area of marks.
static ColorSchemeAssociationKind SEPARATOR
          Visual area of separators.
static ColorSchemeAssociationKind TAB
          Fill visual area of the tabs.
static ColorSchemeAssociationKind TAB_BORDER
          Border visual area of the tabs.
static ColorSchemeAssociationKind TEXT_HIGHLIGHT
          Highlight visual areas for text components.
 
Constructor Summary
ColorSchemeAssociationKind(java.lang.String name, ColorSchemeAssociationKind fallback)
          Creates a new association kind.
 
Method Summary
 ColorSchemeAssociationKind getFallback()
          Returns the fallback for this association kind.
 java.lang.String toString()
           
static java.util.Set<ColorSchemeAssociationKind> values()
          Returns all available association kinds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FILL

public static final ColorSchemeAssociationKind FILL
The default visual area that is used for the inner part of most controls.


HIGHLIGHT

public static final ColorSchemeAssociationKind HIGHLIGHT
Highlight visual areas for lists, tables, trees and menus.


TEXT_HIGHLIGHT

public static final ColorSchemeAssociationKind TEXT_HIGHLIGHT
Highlight visual areas for text components.


SEPARATOR

public static final ColorSchemeAssociationKind SEPARATOR
Visual area of separators.


TAB

public static final ColorSchemeAssociationKind TAB
Fill visual area of the tabs.


BORDER

public static final ColorSchemeAssociationKind BORDER
Border visual area of non-tab controls.


MARK

public static final ColorSchemeAssociationKind MARK
Visual area of marks. Used for painting check marks of checkboxes and radio buttons, as well as arrow icons of combo boxes, spinners and more.


TAB_BORDER

public static final ColorSchemeAssociationKind TAB_BORDER
Border visual area of the tabs.


HIGHLIGHT_BORDER

public static final ColorSchemeAssociationKind HIGHLIGHT_BORDER
Border visual areas for highlighted regions of lists, tables, trees and menus.

Constructor Detail

ColorSchemeAssociationKind

public ColorSchemeAssociationKind(java.lang.String name,
                                  ColorSchemeAssociationKind fallback)
Creates a new association kind.

Parameters:
name - Association kind name.
fallback - Fallback association kind. This is used when no color scheme is associated with this kind. For example, TAB_BORDER specifies that its fallback is BORDER. When the JTabbedPane UI delegate is painting the tabs, it will try to use the color scheme associated with TAB_BORDER. If none was registered, it will fall back to use the color scheme associated with BORDER, and if that is not registered as well, will use the color scheme associated with FILL.
Method Detail

toString

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

values

public static java.util.Set<ColorSchemeAssociationKind> values()
Returns all available association kinds.

Returns:
All available association kinds.

getFallback

public ColorSchemeAssociationKind getFallback()
Returns the fallback for this association kind.

Returns:
The fallback for this association kind.