com.virtuosotechnologies.lib.util
Class PrefsUtils

java.lang.Object
  extended bycom.virtuosotechnologies.lib.util.PrefsUtils

public final class PrefsUtils
extends Object

Various utilities for Java preferences.


Method Summary
static Font getFontPref(Preferences prefs, String key, Font defaultVal)
          Get a preference formatted as a Font
static String[] getStringArrayPref(Preferences prefs, String key, String[] defaultVal)
          Get a preference formatted as a string array
static void putFontPref(Preferences prefs, String key, Font value)
          Set a preference formatted as a Font
static void putStringArrayPref(Preferences prefs, String key, String[] value)
          Set a preference formatted as a string array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStringArrayPref

public static String[] getStringArrayPref(Preferences prefs,
                                          String key,
                                          String[] defaultVal)
Get a preference formatted as a string array

Parameters:
prefs - Preferences node
key - key
defaultVal - default value
Returns:
String[] preference value

putStringArrayPref

public static void putStringArrayPref(Preferences prefs,
                                      String key,
                                      String[] value)
Set a preference formatted as a string array

Parameters:
prefs - Preferences node
key - key
value - value

getFontPref

public static Font getFontPref(Preferences prefs,
                               String key,
                               Font defaultVal)
Get a preference formatted as a Font

Parameters:
prefs - Preferences node
key - key
defaultVal - default value
Returns:
Font preference value

putFontPref

public static void putFontPref(Preferences prefs,
                               String key,
                               Font value)
Set a preference formatted as a Font

Parameters:
prefs - Preferences node
key - key
value - value