edu.rice.cs.drjava.config
Class FontOption
java.lang.Object
edu.rice.cs.drjava.config.OptionParser<T>
edu.rice.cs.drjava.config.Option<Font>
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 $
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. |
FontOption
public FontOption(String key,
Font def)
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