frysk.gui.prefs
Class PreferenceManager

java.lang.Object
  extended by frysk.gui.prefs.PreferenceManager

public class PreferenceManager
extends Object

PreferenceManager keeps track of the different frysk.gui.common.prefs.PreferenceGroup in the system.


Field Summary
private static HashMap preferenceGroups
           
private static Preferences prefs
           
static PreferenceGroup sourceWinGroup
           
static PreferenceGroup syntaxHighlightingGroup
           
 
Constructor Summary
PreferenceManager()
           
 
Method Summary
static void addPreferenceGroup(PreferenceGroup newGroup)
          Add a preference group to the internal list of groups.
static Iterator getPreferenceGroups()
           
static Preferences getPrefs()
           
static void revertAll()
          Reverts the preferences in each of the groups back to the values in the model.
static void saveAll()
          Saves all changes into the preferences model.
static void setPreferenceModel(Preferences newModel)
          Sets the preference model to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

preferenceGroups

private static HashMap preferenceGroups

prefs

private static Preferences prefs

sourceWinGroup

public static PreferenceGroup sourceWinGroup

syntaxHighlightingGroup

public static PreferenceGroup syntaxHighlightingGroup
Constructor Detail

PreferenceManager

public PreferenceManager()
Method Detail

addPreferenceGroup

public static void addPreferenceGroup(PreferenceGroup newGroup)
Add a preference group to the internal list of groups.

Parameters:
newGroup - The new preference group

getPreferenceGroups

public static Iterator getPreferenceGroups()
Returns:
An iterator over all the PreferenceGroups registered with the manager.

setPreferenceModel

public static void setPreferenceModel(Preferences newModel)
Sets the preference model to use. This change is propagated down though all registered preference groups.

Parameters:
newModel - The new preference model to use.

saveAll

public static void saveAll()
Saves all changes into the preferences model. This call is propagated down through all registered PreferenceGroups.


revertAll

public static void revertAll()
Reverts the preferences in each of the groups back to the values in the model.


getPrefs

public static Preferences getPrefs()