org.jvnet.substance.utils
Class SubstanceColorSchemeUtilities

java.lang.Object
  extended by org.jvnet.substance.utils.SubstanceColorSchemeUtilities

public class SubstanceColorSchemeUtilities
extends java.lang.Object

Utilities related to color schemes. This class is for internal use only.

Author:
Kirill Grouchnikov

Field Summary
static SubstanceColorScheme GREEN
          Used as reference to the green color scheme.
static SubstanceSkin METALLIC_SKIN
          Metallic skin.
static SubstanceColorScheme ORANGE
          Used as reference in attention-drawing animations.
static SubstanceColorScheme YELLOW
          Used as reference in attention-drawing animations.
 
Constructor Summary
SubstanceColorSchemeUtilities()
           
 
Method Summary
static float getAlpha(java.awt.Component component, ComponentState componentState)
          Returns the alpha channel of the color scheme of the component.
static SchemeBaseColors getBaseColorScheme(java.io.InputStream is)
           
static SubstanceColorScheme getColorScheme(java.awt.Component component, ColorSchemeAssociationKind associationKind, ComponentState componentState)
          Returns the color scheme of the component.
static SubstanceColorScheme getColorScheme(java.awt.Component component, ComponentState componentState)
          Returns the color scheme of the specified component.
static SubstanceColorScheme getColorScheme(javax.swing.JTabbedPane jtp, int tabIndex, ColorSchemeAssociationKind associationKind, ComponentState componentState)
          Returns the color scheme of the specified tabbed pane tab.
static SubstanceColorScheme getColorScheme(java.net.URL url)
           
static SubstanceSkin.ColorSchemes getColorSchemes(java.net.URL url)
           
static SubstanceColorScheme getDarkColorScheme(java.lang.String name, java.awt.Color[] colors)
           
static float getHighlightAlpha(java.awt.Component component, ComponentState componentState)
          Returns the alpha channel of the highlight color scheme of the component.
static SubstanceColorScheme getLightColorScheme(java.lang.String name, java.awt.Color[] colors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METALLIC_SKIN

public static final SubstanceSkin METALLIC_SKIN
Metallic skin.


YELLOW

public static final SubstanceColorScheme YELLOW
Used as reference in attention-drawing animations. This field is for internal use only.


ORANGE

public static final SubstanceColorScheme ORANGE
Used as reference in attention-drawing animations. This field is for internal use only.


GREEN

public static final SubstanceColorScheme GREEN
Used as reference to the green color scheme. This field is for internal use only.

Constructor Detail

SubstanceColorSchemeUtilities

public SubstanceColorSchemeUtilities()
Method Detail

getColorScheme

public static SubstanceColorScheme getColorScheme(javax.swing.JTabbedPane jtp,
                                                  int tabIndex,
                                                  ColorSchemeAssociationKind associationKind,
                                                  ComponentState componentState)
Returns the color scheme of the specified tabbed pane tab.

Parameters:
jtp - Tabbed pane.
tabIndex - Tab index.
componentState - Tab component state.
Returns:
The color scheme of the specified tabbed pane tab.

getColorScheme

public static SubstanceColorScheme getColorScheme(java.awt.Component component,
                                                  ComponentState componentState)
Returns the color scheme of the specified component.

Parameters:
component - Component.
componentState - Component state.
Returns:
Component color scheme.

getColorScheme

public static SubstanceColorScheme getColorScheme(java.awt.Component component,
                                                  ColorSchemeAssociationKind associationKind,
                                                  ComponentState componentState)
Returns the color scheme of the component.

Parameters:
component - Component.
componentState - Component state.
Returns:
Component border color scheme.

getHighlightAlpha

public static float getHighlightAlpha(java.awt.Component component,
                                      ComponentState componentState)
Returns the alpha channel of the highlight color scheme of the component.

Parameters:
component - Component.
componentState - Component state.
Returns:
Highlight color scheme alpha channel.

getAlpha

public static float getAlpha(java.awt.Component component,
                             ComponentState componentState)
Returns the alpha channel of the color scheme of the component.

Parameters:
component - Component.
componentState - Component state.
Returns:
Color scheme alpha channel.

getColorScheme

public static SubstanceColorScheme getColorScheme(java.net.URL url)

getBaseColorScheme

public static SchemeBaseColors getBaseColorScheme(java.io.InputStream is)

getLightColorScheme

public static SubstanceColorScheme getLightColorScheme(java.lang.String name,
                                                       java.awt.Color[] colors)

getDarkColorScheme

public static SubstanceColorScheme getDarkColorScheme(java.lang.String name,
                                                      java.awt.Color[] colors)

getColorSchemes

public static SubstanceSkin.ColorSchemes getColorSchemes(java.net.URL url)