|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vlsolutions.swing.toolbars.ToolBarPersistence
public class ToolBarPersistence
This class contains methods to keep a set of toolbars persistent.
The class uses the preferences framework of the java runtime, and installs a shutdown hook to save the toolbars state on application exit.
Warning : this class cannot be run from a sandboxed (untrusted) environment (unsigned applet/ java web start) as it uses classes requiring a SecurityManager (Preferences API and Runtime shutdown hook).
Call loadToolBarLayout() upon application startup, after registering all ToolBars.
ToolBarIO| Constructor Summary | |
|---|---|
ToolBarPersistence(java.lang.Object mainClass,
ToolBarContainer container)
Construct a new set of persistent toolbars. |
|
| Method Summary | |
|---|---|
protected void |
handleUnloadedToolBar(VLToolBar toolbar)
|
void |
loadToolBarLayout()
Load the toolbar configuration. |
void |
run()
Save the toolbar configuration. |
void |
saveToolBarLayout()
Save the toolbar configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ToolBarPersistence(java.lang.Object mainClass,
ToolBarContainer container)
mainClass - the main class of the application. Will be used to
generate a reasonable name for the preferences to store toolbar
configurationcontainer - the toolbarcontainer to keep persistent
java.lang.SecurityException - if this class is invoked from an untrusted environment| Method Detail |
|---|
protected void handleUnloadedToolBar(VLToolBar toolbar)
public void loadToolBarLayout()
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXExceptionpublic void run()
Masks all errors.
don't call this method directly : it is used by the shudown hook.
run in interface java.lang.RunnableRunnable.run()
public void saveToolBarLayout()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||