org.fife.ui
Class SubstanceUtils

java.lang.Object
  extended by org.fife.ui.SubstanceUtils

public class SubstanceUtils
extends java.lang.Object

Utility methods for interfacing with Substance 7.2.1 (Insubstantial) in applications that only require Java 1.4 or later (Substance 6 requires Java 6).

Version:
1.0
Author:
Robert Futrell

Field Summary
static java.lang.String BACKGROUND_FILL_COLOR
           
static java.lang.String DARK_COLOR
           
static java.lang.String EXTRA_LIGHT_COLOR
           
static java.lang.String FOCUS_RING_COLOR
           
static java.lang.String FOREGROUND_COLOR
           
static java.lang.String LIGHT_COLOR
           
static java.lang.String LINE_COLOR
           
static java.lang.String MID_COLOR
           
static java.lang.String SELECTION_BG_COLOR
           
static java.lang.String SELECTION_FG_COLOR
           
static java.lang.String TEXT_BG_FILL_COLOR
           
static java.lang.String ULTRA_DARK_COLOR
           
static java.lang.String ULTRA_LIGHT_COLOR
           
 
Constructor Summary
SubstanceUtils()
           
 
Method Summary
static long getAnimationSpeed()
          Returns the length of time GUI animations take, in milliseconds.
static java.awt.Color getSubstanceColor(java.lang.String name)
          Returns a color from the currently active Substance skin.
static boolean isASubstanceLookAndFeel(javax.swing.LookAndFeel laf)
          Returns whether a given LookAndFeel is a Substance LookAndFeel.
static boolean isASubstanceLookAndFeel(java.lang.String lafName)
          Returns whether a given LookAndFeel is a Substance LookAndFeel.
static boolean isSubstanceInstalled()
          Returns whether the currently installed LookAndFeel is Substance.
static void setAnimationSpeed(long millis)
          Configures the length of GUI animations, in milliseconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FOREGROUND_COLOR

public static final java.lang.String FOREGROUND_COLOR
See Also:
Constant Field Values

ULTRA_LIGHT_COLOR

public static final java.lang.String ULTRA_LIGHT_COLOR
See Also:
Constant Field Values

EXTRA_LIGHT_COLOR

public static final java.lang.String EXTRA_LIGHT_COLOR
See Also:
Constant Field Values

LIGHT_COLOR

public static final java.lang.String LIGHT_COLOR
See Also:
Constant Field Values

MID_COLOR

public static final java.lang.String MID_COLOR
See Also:
Constant Field Values

DARK_COLOR

public static final java.lang.String DARK_COLOR
See Also:
Constant Field Values

ULTRA_DARK_COLOR

public static final java.lang.String ULTRA_DARK_COLOR
See Also:
Constant Field Values

LINE_COLOR

public static final java.lang.String LINE_COLOR
See Also:
Constant Field Values

SELECTION_BG_COLOR

public static final java.lang.String SELECTION_BG_COLOR
See Also:
Constant Field Values

SELECTION_FG_COLOR

public static final java.lang.String SELECTION_FG_COLOR
See Also:
Constant Field Values

BACKGROUND_FILL_COLOR

public static final java.lang.String BACKGROUND_FILL_COLOR
See Also:
Constant Field Values

TEXT_BG_FILL_COLOR

public static final java.lang.String TEXT_BG_FILL_COLOR
See Also:
Constant Field Values

FOCUS_RING_COLOR

public static final java.lang.String FOCUS_RING_COLOR
See Also:
Constant Field Values
Constructor Detail

SubstanceUtils

public SubstanceUtils()
Method Detail

getAnimationSpeed

public static long getAnimationSpeed()
                              throws java.lang.Exception
Returns the length of time GUI animations take, in milliseconds.

Returns:
The length of time, in milliseconds.
Throws:
java.lang.Exception - If an error occurs.
See Also:
setAnimationSpeed(long)

getSubstanceColor

public static java.awt.Color getSubstanceColor(java.lang.String name)
                                        throws java.lang.Exception
Returns a color from the currently active Substance skin.

Parameters:
name - The name of a Color, for example LIGHT_COLOR.
Returns:
The color, or null if no color by that name is defined.
Throws:
java.lang.Exception - If an error occurs.

isSubstanceInstalled

public static boolean isSubstanceInstalled()
Returns whether the currently installed LookAndFeel is Substance.

Returns:
Whether the currently installed LookAndFeel is Substance.

isASubstanceLookAndFeel

public static boolean isASubstanceLookAndFeel(javax.swing.LookAndFeel laf)
Returns whether a given LookAndFeel is a Substance LookAndFeel.

Parameters:
laf - The LookAndFeel.
Returns:
Whether it is a Substance LookAndFeel.
See Also:
isASubstanceLookAndFeel(String), isSubstanceInstalled()

isASubstanceLookAndFeel

public static boolean isASubstanceLookAndFeel(java.lang.String lafName)
Returns whether a given LookAndFeel is a Substance LookAndFeel.

Parameters:
lafName - The LookAndFeel's class name.
Returns:
Whether it is a Substance LookAndFeel.
See Also:
isASubstanceLookAndFeel(LookAndFeel), isSubstanceInstalled()

setAnimationSpeed

public static void setAnimationSpeed(long millis)
                              throws java.lang.Exception
Configures the length of GUI animations, in milliseconds.

Parameters:
millis - The amount of time animations should take.
Throws:
java.lang.Exception - If an error occurs.
See Also:
getAnimationSpeed()