com.limegroup.gnutella.settings
Class ThemeSettings

java.lang.Object
  extended bycom.limegroup.gnutella.settings.AbstractSettings
      extended bycom.limegroup.gnutella.settings.LimeProps
          extended bycom.limegroup.gnutella.settings.ThemeSettings

public final class ThemeSettings
extends LimeProps

Class for handling all LimeWire settings that are stored to disk. To add a new setting, simply add a new public static member to the list of settings. Construct settings using the FACTORY instance from the AbstractSettings superclass. Each setting factory constructor takes the name of the key and the default value, and all settings are typed. Choose the correct Setting factory constructor for your setting type. It is also important to choose a unique string key for your setting name -- otherwise there will be conflicts, and a runtime exception will be thrown.


Field Summary
static java.lang.String DEFAULT_OSX_THEME_NAME
          The default name of the theme file name for OS X.
static java.lang.String DEFAULT_THEME_NAME
          The default name of the theme file for all operating systems other than OS X.
static java.lang.String EXTENSION
          The extension for theme packs to allow people to search for them -- stands for "LimeWire Theme Pack".
static FileSetting THEME_DEFAULT
          Setting for the default theme file to use for LimeWire display.
static FileSetting THEME_DEFAULT_DIR
          Setting for the default theme directory to use in LimeWire display.
static FileSetting THEME_DIR
          Setting for the file name of the theme directory.
static java.io.File THEME_DIR_FILE
           
static FileSetting THEME_FILE
          Setting for the file name of the theme file.
static java.lang.String WINDOWS_LAF_THEME_NAME
          The default name of the windows laf theme file name.
 
Fields inherited from class com.limegroup.gnutella.settings.LimeProps
FACTORY
 
Method Summary
static java.lang.String formatName(java.lang.String name)
          Formats a theme name, removing the underscore characters, capitalizing the first letter of each word, and removing the 'lwtp'.
static boolean isDefaultTheme()
          Determines whether or not the current theme file is the default theme file.
static boolean isWindowsTheme()
          Determines whether or not the current theme is the windows theme, designed to be used for the windows laf.
 
Methods inherited from class com.limegroup.gnutella.settings.LimeProps
instance
 
Methods inherited from class com.limegroup.gnutella.settings.AbstractSettings
getFactory, getProperties, getPropertiesFile, getShouldSave, reload, revertToDefault, save, setShouldSave
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTENSION

public static final java.lang.String EXTENSION
The extension for theme packs to allow people to search for them -- stands for "LimeWire Theme Pack".

See Also:
Constant Field Values

THEME_DIR_FILE

public static final java.io.File THEME_DIR_FILE

DEFAULT_THEME_NAME

public static final java.lang.String DEFAULT_THEME_NAME
The default name of the theme file for all operating systems other than OS X.

See Also:
Constant Field Values

DEFAULT_OSX_THEME_NAME

public static final java.lang.String DEFAULT_OSX_THEME_NAME
The default name of the theme file name for OS X.

See Also:
Constant Field Values

WINDOWS_LAF_THEME_NAME

public static final java.lang.String WINDOWS_LAF_THEME_NAME
The default name of the windows laf theme file name.

See Also:
Constant Field Values

THEME_DEFAULT

public static final FileSetting THEME_DEFAULT
Setting for the default theme file to use for LimeWire display.


THEME_DEFAULT_DIR

public static final FileSetting THEME_DEFAULT_DIR
Setting for the default theme directory to use in LimeWire display.


THEME_FILE

public static final FileSetting THEME_FILE
Setting for the file name of the theme file.


THEME_DIR

public static final FileSetting THEME_DIR
Setting for the file name of the theme directory.

Method Detail

isDefaultTheme

public static boolean isDefaultTheme()
Determines whether or not the current theme file is the default theme file.

Returns:
true if the current theme file is the default, otherwise false

isWindowsTheme

public static boolean isWindowsTheme()
Determines whether or not the current theme is the windows theme, designed to be used for the windows laf.

Returns:
true if the current theme is the windows theme, otherwise false

formatName

public static java.lang.String formatName(java.lang.String name)
Formats a theme name, removing the underscore characters, capitalizing the first letter of each word, and removing the 'lwtp'.