|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evanmclean.evlib.prefs.Prefs
public final class Prefs
Quick utilities for preferences (java.util.prefs.Preferences).
Method Summary | |
---|---|
static File |
getFolder(Preferences pref,
String key,
File def)
Gets an existing folder from the specified preference. |
static boolean |
putFolder(Preferences pref,
String key,
File file)
Save the part of the specified file path that represents an existing folder. |
static boolean |
sync(Preferences pref)
Performs the synchronisation and catches any backing store exceptions. |
static Preferences |
systemNodeForClass(Class<?> cls)
Returns a system node specific to the class, rather then at the package level. |
static Preferences |
userNodeForClass(Class<?> cls)
Returns a user node specific to the class, rather then at the package level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static File getFolder(Preferences pref, String key, File def)
pref
- The preference object.key
- Key for the preference.def
- Default to return if existing folder could not be found (null is
okay).
public static boolean putFolder(Preferences pref, String key, File file)
pref
- The preference object.key
- Key for the preference.file
- The path (or part there of) to save.
public static boolean sync(Preferences pref)
pref
- The preference to sync.
public static Preferences systemNodeForClass(Class<?> cls)
cls
- The class to get a node for.
public static Preferences userNodeForClass(Class<?> cls)
cls
- The class to get a node for.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |