|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.ui.options.factory.OptionsHandler
public final class OptionsHandler
This class handles the persistence of the dynamic UI com
| Nested Class Summary | |
|---|---|
static class |
OptionsHandler.OptionNode
A graph of the persistent options. |
| Constructor Summary | |
|---|---|
OptionsHandler()
|
|
| Method Summary | |
|---|---|
static OptionElement |
addPage(OptionElement page)
Add a page to the list of pages managed by this handler. |
static OptionElement |
addPageFromURL(String xmlPath,
String baseName)
Add a page built from an xml document. |
static OptionElement |
addPageFromXml(String xmlPath)
Add a page built from an xml document. |
static OptionsHandler.OptionNode |
buildPersistenceGraph(OptionElement elt)
Build a graph of the persistent elements. |
static OptionsPageBuilder |
getBuilder()
Get the page builder used to instantiate pages from XML descriptors. |
static JFrame |
getMainWindow()
Get the main window of the application. |
static OptionElement |
getPage(String name)
Retrieve a page from its name. |
static List<OptionElement> |
getPageList()
Get the list of option pages managed by this handler. |
static Preferences |
getPreferences()
Get the root of the preferences subtree in which the chart configurations are saved. |
static void |
loadFrameAttributes(Frame frame,
Preferences pref)
Load the specified frame state from the preferences store. |
static void |
loadMainWindowAttributes(Preferences pref)
Load the application's main window state from the preferences store. |
static OptionElement |
loadPageFromURL(String xmlPath,
String baseName)
Load a page built from an xml document. |
static OptionElement |
loadPageFromXml(String xmlPath)
Load a page built from an xml document. |
static void |
loadPreferences()
Load the value of all persistent options in the preferences store. |
static void |
loadPreferences(OptionsHandler.OptionNode node,
Preferences prefs)
Save the value of all persistent options in the preferences store. |
static void |
removePage(OptionsPage page)
Remove a page from the list of pages managed by this handler. |
static void |
saveFrameAttributes(Frame frame,
Preferences pref)
Save the specified frame state to the preferences store. |
static void |
saveMainWindowAttributes(Preferences pref)
Save the application's main window state to the preferences store. |
static void |
savePreferences()
Save the value of all persistent options in the preferences store. |
static void |
savePreferences(OptionsHandler.OptionNode node,
Preferences prefs)
Save the value of all persistent options in the preferences store. |
static void |
setMainWindow(JFrame mainWindow)
Set the main window of the application. |
static void |
setPreferences(Preferences preferences)
Set the root of the preferences subtree in which the chart configurations are saved. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OptionsHandler()
| Method Detail |
|---|
public static List<OptionElement> getPageList()
OptionsPage instances.public static OptionElement getPage(String name)
name - the name of the page to retrieve.
OptionsPage instance.public static OptionElement addPage(OptionElement page)
page - an OptionsPage instance.
public static void removePage(OptionsPage page)
page - an OptionsPage instance.public static OptionElement loadPageFromXml(String xmlPath)
xmlPath - the path to the xml document.
public static OptionElement addPageFromXml(String xmlPath)
xmlPath - the path to the xml document.
public static OptionElement loadPageFromURL(String xmlPath,
String baseName)
xmlPath - the path to the xml document.baseName - base name for resource bundle lookup.
public static OptionElement addPageFromURL(String xmlPath,
String baseName)
xmlPath - the path to the xml document.baseName - base name for resource bundle lookup.
public static void savePreferences()
public static void savePreferences(OptionsHandler.OptionNode node,
Preferences prefs)
node - the root of the options subtree to save.prefs - the preferences node in which to save the vaues.public static void loadPreferences()
public static void loadPreferences(OptionsHandler.OptionNode node,
Preferences prefs)
node - the root of the options subtree to save.prefs - the preferences node in which to save the vaues.public static OptionsPageBuilder getBuilder()
OptionsPageBuilder instance.public static OptionsHandler.OptionNode buildPersistenceGraph(OptionElement elt)
elt - the root of the current subgraph.
OptionNode instance.public static Preferences getPreferences()
Preferences instance.public static void setPreferences(Preferences preferences)
preferences - a Preferences instance.public static void loadMainWindowAttributes(Preferences pref)
pref - the preferences node from where the attributes are loaded.public static void saveMainWindowAttributes(Preferences pref)
pref - the preferences node where the attributes are saved.
public static void loadFrameAttributes(Frame frame,
Preferences pref)
frame - the frame for which the attributes are retieved.pref - the preferences node from where the attributes are loaded.
public static void saveFrameAttributes(Frame frame,
Preferences pref)
frame - the frame for which the attributes are saved.pref - the preferences node where the attributes are saved.public static JFrame getMainWindow()
JFrame instance.public static void setMainWindow(JFrame mainWindow)
mainWindow - a JFrame instance.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||