edu.rice.cs.drjava.config
Class ColorOption
java.lang.Object
|
+--edu.rice.cs.drjava.config.OptionParser
|
+--edu.rice.cs.drjava.config.Option
|
+--edu.rice.cs.drjava.config.ColorOption
- All Implemented Interfaces:
- FormatStrategy, ParseStrategy
- public class ColorOption
- extends Option
Class defining all configuration options with values of type Color.
- Version:
- $Id: ColorOption.java,v 1.6 2002/06/20 17:05:51 csreis Exp $
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
ColorOption
public ColorOption(String key,
Color def)
parse
public Color parse(String s)
- Description copied from class:
OptionParser
- the ability to parse a string to an object of type T. All concrete versions of this
class must override this method to provide some sort of parser implementation.
- Overrides:
parse
in class OptionParser
- Following copied from class:
edu.rice.cs.drjava.config.OptionParser
- Parameters:
value
- a String to parse- Returns:
- the statically-typed representation of the string value.
format
public String format(Color c)
notifyListeners
void notifyListeners(Configuration x0,
Object x1)
- Overrides:
notifyListeners
in class Option
format
public String format(Object x0)
- Description copied from class:
Option
- the ability to format a statically typed T value to a String. Since T is an Object,
the default implementation uses the .toString() method.
- Overrides:
format
in class Option
- Following copied from class:
edu.rice.cs.drjava.config.Option
- Parameters:
value
- the statically-typed value to format into a String- Throws:
NullPointerException
- if value is null
remove
Object remove(DefaultOptionMap x0)
- Description copied from class:
OptionParser
- the destructor for a mapping in the magic-typed hashtable.
- Overrides:
remove
in class OptionParser
setOption
Object setOption(DefaultOptionMap x0,
Object x1)
- Description copied from class:
OptionParser
- the mutator for the magic-typed hashtable stunt.
- Overrides:
setOption
in class OptionParser
getOption
Object getOption(DefaultOptionMap x0)
- Description copied from class:
OptionParser
- the accessor for the magic-typed hashtable stunt.
- Overrides:
getOption
in class OptionParser
setString
Object setString(DefaultOptionMap x0,
String x1)
- Description copied from class:
OptionParser
- uses parse() and setOption() so that any changes in parsing will automatically
be applied to setString().
- Overrides:
setString
in class OptionParser
parse
public Color parse(String s)
- Description copied from class:
OptionParser
- the ability to parse a string to an object of type T. All concrete versions of this
class must override this method to provide some sort of parser implementation.
- Overrides:
parse
in class OptionParser
- Following copied from class:
edu.rice.cs.drjava.config.OptionParser
- Parameters:
value
- a String to parse- Returns:
- the statically-typed representation of the string value.
getDefault
public Object getDefault()
- Overrides:
getDefault
in class OptionParser
- Following copied from class:
edu.rice.cs.drjava.config.OptionParser
- Returns:
- the default value