org.jvnet.substance
Class SubstanceLookAndFeel

java.lang.Object
  extended by javax.swing.LookAndFeel
      extended by javax.swing.plaf.basic.BasicLookAndFeel
          extended by javax.swing.plaf.metal.MetalLookAndFeel
              extended by org.jvnet.substance.SubstanceLookAndFeel
All Implemented Interfaces:
Serializable

public class SubstanceLookAndFeel
extends MetalLookAndFeel

Main class for Substance look and feel.

Author:
Kirill Grouchnikov
See Also:
Serialized Form

Constructor Summary
SubstanceLookAndFeel()
          Simple constructor.
 
Method Summary
protected  void createDefaultTheme()
           
static Map<String,String> enumerateThemes()
          Returns all available color schemes.
static ColorSchemeEnum getColorScheme()
          Returns the current color scheme.
static String getCurrentThemeName()
          Returns the current color scheme name.
 String getDescription()
           
 Icon getDisabledIcon(JComponent component, Icon icon)
           
 Icon getDisabledSelectedIcon(JComponent component, Icon icon)
           
 String getID()
           
 String getName()
           
protected  void initClassDefaults(UIDefaults table)
           
protected  void initComponentDefaults(UIDefaults table)
           
 boolean isNativeLookAndFeel()
           
 boolean isSupportedLookAndFeel()
           
static boolean setCurrentTheme(String themeClassName)
          Sets new theme.
static boolean setCurrentTheme(SubstanceTheme theme)
          Sets new theme.
 
Methods inherited from class javax.swing.plaf.metal.MetalLookAndFeel
getAcceleratorForeground, getAcceleratorSelectedForeground, getBlack, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getControlTextFont, getCurrentTheme, getDefaults, getDesktopColor, getFocusColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getMenuTextFont, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSubTextFont, getSupportsWindowDecorations, getSystemTextColor, getSystemTextFont, getTextHighlightColor, getUserTextColor, getUserTextFont, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleFont, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground, initSystemColorDefaults, provideErrorFeedback, setCurrentTheme
 
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, initialize, loadSystemColors, playSound, uninitialize
 
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, toString, uninstallBorder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubstanceLookAndFeel

public SubstanceLookAndFeel()
Simple constructor.

Method Detail

getColorScheme

public static ColorSchemeEnum getColorScheme()
Returns the current color scheme.

Returns:
Current color scheme.

setCurrentTheme

public static boolean setCurrentTheme(String themeClassName)
Sets new theme.

Parameters:
themeClassName - Theme class name (full qualified).
Returns:
The status of the theme change.

setCurrentTheme

public static boolean setCurrentTheme(SubstanceTheme theme)
Sets new theme.

Parameters:
theme - Theme object.
Returns:
The status of the theme change.

getCurrentThemeName

public static String getCurrentThemeName()
Returns the current color scheme name.

Returns:
Current color scheme name.

enumerateThemes

public static Map<String,String> enumerateThemes()
Returns all available color schemes.

Returns:
All available color schemes. Key - scheme name, value - scheme class name.

getDescription

public String getDescription()
Overrides:
getDescription in class MetalLookAndFeel

getID

public String getID()
Overrides:
getID in class MetalLookAndFeel

getName

public String getName()
Overrides:
getName in class MetalLookAndFeel

isNativeLookAndFeel

public boolean isNativeLookAndFeel()
Overrides:
isNativeLookAndFeel in class MetalLookAndFeel

isSupportedLookAndFeel

public boolean isSupportedLookAndFeel()
Overrides:
isSupportedLookAndFeel in class MetalLookAndFeel

initClassDefaults

protected void initClassDefaults(UIDefaults table)
Overrides:
initClassDefaults in class MetalLookAndFeel

initComponentDefaults

protected void initComponentDefaults(UIDefaults table)
Overrides:
initComponentDefaults in class MetalLookAndFeel

getDisabledIcon

public Icon getDisabledIcon(JComponent component,
                            Icon icon)
Overrides:
getDisabledIcon in class MetalLookAndFeel

getDisabledSelectedIcon

public Icon getDisabledSelectedIcon(JComponent component,
                                    Icon icon)
Overrides:
getDisabledSelectedIcon in class MetalLookAndFeel

createDefaultTheme

protected void createDefaultTheme()
Overrides:
createDefaultTheme in class MetalLookAndFeel