| java.lang.Object edu.rice.cs.drjava.config.Configuration
All known Subclasses: edu.rice.cs.drjava.config.SavableConfiguration,
Configuration | public class Configuration (Code) | | Class to store and retrieve all configurable options.
version: $Id: Configuration.java 4255 2007-08-28 19:17:37Z mgricken $ |
Field Summary | |
protected Exception | _startupException Any exception that is caught when initializing this Configuration object. | protected OptionMap | map OptionMap used to store all option settings. |
Constructor Summary | |
public | Configuration(OptionMap om) Initializes this Configuration object with the given OptionMap. |
_startupException | protected Exception _startupException(Code) | | Any exception that is caught when initializing this Configuration object.
Used later by the UI to display a useful message to the user.
|
map | protected OptionMap map(Code) | | OptionMap used to store all option settings.
|
Configuration | public Configuration(OptionMap om)(Code) | | Initializes this Configuration object with the given OptionMap.
Parameters: om - An empty OptionMap. |
addOptionListener | public void addOptionListener(Option<T> op, OptionListener<T> l)(Code) | | Adds an OptionListener to the given Option, to be notified each time the option changes.
Parameters: op - Option to listen for changes on Parameters: l - OptionListener wishing to listen |
getSetting | public T getSetting(Option<T> op)(Code) | | Gets the current value of the given Option.
|
getStartupException | public Exception getStartupException()(Code) | | Returns the exception caught during startUp, or null if none were caught.
|
hadStartupException | public boolean hadStartupException()(Code) | | Returns whether there were any exceptions when starting.
|
removeOptionListener | public void removeOptionListener(Option<T> op, OptionListener<T> l)(Code) | | Removes an OptionListener from an Option to which it was listening.
|
resetToDefaults | public void resetToDefaults()(Code) | | Resets to the default values, overwriting any existing values.
|
setSetting | public T setSetting(Option<T> op, T value)(Code) | | Sets the given option to the given value and notifies all listeners of that option of the change.
Parameters: op - Option to set Parameters: value - New value for the option |
storeStartupException | public void storeStartupException(Exception e)(Code) | | Stores exception caught during creation of this Configuration object, so it can be displayed later by the UI.
Parameters: e - Exception caught during startUp |
toString | public String toString()(Code) | | Returns a string representation of the contents of the OptionMap.
|
|
|