|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.fife.ui.app.GUIApplicationPreferences
public abstract class GUIApplicationPreferences
Preferences for a GUIApplication
. This class currently
explicitly remembers the accelerators for all actions of the GUI
application in a hash map. The keys in the map are the action keys in
the application.
GUIApplication
,
AbstractGUIApplication
Field Summary | |
---|---|
java.util.HashMap<java.lang.String,javax.swing.KeyStroke> |
accelerators
Accelerators for all actions in the GUIApplication 's
action map. |
java.lang.String |
language
The language for this application, in a Locale-friendly string. |
java.awt.Point |
location
The location on-screen of this GUI application. |
java.lang.String |
lookAndFeel
The user's preferred look and feel for the application. |
java.awt.Dimension |
size
The size of this GUI application's main window. |
boolean |
statusBarVisible
Whether this application's status bar is visible. |
boolean |
toolbarVisible
Whether this application's toolbar is visible. |
Fields inherited from interface org.fife.ui.app.GUIApplicationConstants |
---|
OS_LINUX, OS_MAC_OSX, OS_OTHER, OS_WINDOWS |
Fields inherited from interface org.fife.ui.dockablewindows.DockableWindowConstants |
---|
BOTTOM, FLOATING, LEFT, RIGHT, TOP |
Constructor Summary | |
---|---|
GUIApplicationPreferences()
|
Method Summary | |
---|---|
static GUIApplicationPreferences |
generatePreferences(java.lang.Object obj)
Creates a properties object with all fields initialized to the values that the specified application instance is currently running with. |
javax.swing.KeyStroke |
getAccelerator(java.lang.String actionName)
Returns the accelerator for the specified action name. |
protected static void |
loadCommonPreferences(GUIApplicationPreferences prefs,
java.util.prefs.Preferences p)
Loads the preferences specified in this class into the specified GUIApplicationPreferences object. |
static GUIApplicationPreferences |
loadPreferences()
Initializes this preferences instance with data saved previously via the Java Preferences API. |
protected void |
saveCommonPreferences(java.util.prefs.Preferences prefs)
Saves the common preferences specified in this class. |
abstract void |
savePreferences(java.lang.Object object)
Saves this preferences instance via the Java Preferences API. |
protected abstract void |
setDefaults()
Sets this preferences instance to contain all default values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.HashMap<java.lang.String,javax.swing.KeyStroke> accelerators
GUIApplication
's
action map.
getAccelerator(String)
public java.awt.Point location
public java.awt.Dimension size
public boolean toolbarVisible
public boolean statusBarVisible
public java.lang.String lookAndFeel
public java.lang.String language
Constructor Detail |
---|
public GUIApplicationPreferences()
Method Detail |
---|
public static GUIApplicationPreferences generatePreferences(java.lang.Object obj)
The default implementation returns null
. This method
should be overridden to return properties for the specified object.
obj
- The object for which to generate preferences.
GUIApplicaitonPrefences
object initialized to
contain the properties the specified object is running with.public javax.swing.KeyStroke getAccelerator(java.lang.String actionName)
protected static void loadCommonPreferences(GUIApplicationPreferences prefs, java.util.prefs.Preferences p)
GUIApplicationPreferences
object. This method
can be called by any subclass's loadPreferences
so they don't have to worry about doing it all themselves.
prefs
- The preferences into which to load. If any of the
preferences aren't found in the backing store, the value
of those preferences saved in this instance are not
are not changed (i.e., the defaults are the current values).p
- The preferences backing store from which to
retrieve preferences.public static GUIApplicationPreferences loadPreferences()
The default implementation returns null
. This method
should be overridden to return properties for the specified object.
protected void saveCommonPreferences(java.util.prefs.Preferences prefs)
savePreferences
so they don't have to worry about doing it all themselves.
prefs
- The preferences backing store into which to
save preferences.public abstract void savePreferences(java.lang.Object object)
object
- Can be anything needed by an implementation of
GUIApplicationPreferences
. For example, it can be
the application instance for which you are saving preferences.
This parameter may not be needed by your implementation.protected abstract void setDefaults()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |