|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.rice.cs.drjava.config.Configuration
Class to store and retrieve all configurable options.
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 | |
Configuration(OptionMap om)
Initializes this Configuration object with the given OptionMap. |
Method Summary | |
void |
addOptionListener(Option op,
OptionListener l)
Adds an OptionListener to the given Option, to be notified each time the option changes. |
Object |
getSetting(Option op)
Gets the current value of the given Option. |
Exception |
getStartupException()
Returns the exception caught during startup, or null if none were caught. |
boolean |
hadStartupException()
Returns whether there were any exceptions when starting. |
void |
removeOptionListener(Option op,
OptionListener l)
Removes an OptionListener from an Option to which it was listening. |
void |
resetToDefaults()
Resets to the default values, overwriting any existing values. |
Object |
setSetting(Option op,
Object value)
Sets the given option to the given value and notifies all listeners of that option of the change. |
void |
storeStartupException(Exception e)
Stores any exception caught during the creation of this Configuration object, so it can be displayed later by the UI. |
String |
toString()
Returns a string representation of the contents of the OptionMap. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected OptionMap map
protected Exception _startupException
Constructor Detail |
public Configuration(OptionMap om)
om
- An empty OptionMap.Method Detail |
public Object setSetting(Option op, Object value)
op
- Option to setvalue
- New value for the optionpublic Object getSetting(Option op)
public void addOptionListener(Option op, OptionListener l)
op
- Option to listen for changes onl
- OptionListener wishing to listenpublic void removeOptionListener(Option op, OptionListener l)
public void resetToDefaults()
public boolean hadStartupException()
public Exception getStartupException()
public void storeStartupException(Exception e)
e
- Exception caught during startuppublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |