public class ColorStringParser extends StringParser
StringParser
for parsing java.awt.Color objects. Color information can be
specified in a variety
of formats:
StringParser
,
Color
Constructor and Description |
---|
ColorStringParser()
Deprecated.
Use
getParser() or, even better, JSAP.COLOR_PARSER . |
Modifier and Type | Method and Description |
---|---|
static ColorStringParser |
getParser()
Returns a
ColorStringParser . |
java.lang.Object |
parse(java.lang.String arg)
Parses java.awt.Color objects from Strings.
|
setUp, tearDown
public static ColorStringParser getParser()
ColorStringParser
.
Convenient access to the only instance returned by
this method is available through
JSAP.COLOR_PARSER
.
ColorStringParser
.public java.lang.Object parse(java.lang.String arg) throws ParseException
parse
in class StringParser
arg
- the String to convert to a Color object.ParseException
- if arg cannot be interpreted as a Color as
described above.Copyright © 2002-2006, Martian Software, Inc.. All Rights Reserved.
For the latest version and documentation, please visit http://www.martiansoftware.com/jsap