edu.rice.cs.drjava.config
Class FontOption

java.lang.Object
  extended by edu.rice.cs.drjava.config.OptionParser<T>
      extended by edu.rice.cs.drjava.config.Option<Font>
          extended by edu.rice.cs.drjava.config.FontOption
All Implemented Interfaces:
FormatStrategy<Font>, ParseStrategy<Font>

public class FontOption
extends Option<Font>

Class defining all configuration entries of type Font

Version:
$Id: FontOption.java 4314 2008-01-30 00:08:33Z mgricken $

Field Summary
 
Fields inherited from class edu.rice.cs.drjava.config.OptionParser
defaultValue, name
 
Constructor Summary
FontOption(String key, Font def)
           
 
Method Summary
 String format(Font f)
          Create a String representation of the Font object, in the format: fontname-fontstyle-fontsize.
 Font parse(String s)
          The ability to parse a string to an object of type T.
 
Methods inherited from class edu.rice.cs.drjava.config.Option
getDefaultString
 
Methods inherited from class edu.rice.cs.drjava.config.OptionParser
getDefault, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FontOption

public FontOption(String key,
                  Font def)
Method Detail

parse

public Font 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.

Specified by:
parse in interface ParseStrategy<Font>
Specified by:
parse in class OptionParser<Font>
Parameters:
s - a String to parse
Returns:
the statically-typed representation of the string value.

format

public String format(Font f)
Create a String representation of the Font object, in the format: fontname-fontstyle-fontsize.

Specified by:
format in interface FormatStrategy<Font>
Overrides:
format in class Option<Font>
Parameters:
f - the statically-typed value to format into a String