org.xnap.gui.theme
Class ThemeManager

java.lang.Object
  extended by org.xnap.gui.theme.ThemeManager

public class ThemeManager
extends java.lang.Object

This class manages the available themes and installs additional Look & Feels if available.


Nested Class Summary
static class ThemeManager.ThemeComparator
          Compares Theme objects by name.
 
Method Summary
static void addTheme(Theme theme)
           
static java.lang.Object[] getDefaults()
          Returns the ui defaults that were saved when the ThemeManager was instanciated, meaning before any other theme was loaded.
static javax.swing.UIManager.LookAndFeelInfo[] getInstalledLookAndFeels()
          Returns an array of all installed and supported look and feels.
static java.lang.Object[] getSavedDefaults()
          Returns the defaults that were saved when this class was instanciated.
static Theme[] getThemes()
          Returns a sorted array of all available themes.
static void initialize()
          Makes the default themes available.
static boolean isInstalled(java.lang.String className)
          Returns true, if a plugin with className is installed.
static void removeTheme(Theme theme)
           
static void setDefaults(java.lang.Object[] defaults)
           
static boolean setTheme(java.lang.String className)
          Looks up the by className and sets the current theme, if found.
static void setTheme(Theme theme)
          Sets the current theme to theme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addTheme

public static void addTheme(Theme theme)

initialize

public static void initialize()
Makes the default themes available.


isInstalled

public static boolean isInstalled(java.lang.String className)
Returns true, if a plugin with className is installed.


getDefaults

public static java.lang.Object[] getDefaults()
Returns the ui defaults that were saved when the ThemeManager was instanciated, meaning before any other theme was loaded.


getInstalledLookAndFeels

public static javax.swing.UIManager.LookAndFeelInfo[] getInstalledLookAndFeels()
Returns an array of all installed and supported look and feels.


getThemes

public static Theme[] getThemes()
Returns a sorted array of all available themes.


getSavedDefaults

public static java.lang.Object[] getSavedDefaults()
Returns the defaults that were saved when this class was instanciated.


removeTheme

public static void removeTheme(Theme theme)

setDefaults

public static void setDefaults(java.lang.Object[] defaults)

setTheme

public static boolean setTheme(java.lang.String className)
Looks up the by className and sets the current theme, if found.

Returns:
true, if theme was set; false, otherwise

setTheme

public static void setTheme(Theme theme)
Sets the current theme to theme.



Copyright © 2001-2005 XNap Team. All Rights Reserved.