public class FontFormatter extends Object
Font
Modifier and Type | Field and Description |
---|---|
private static int[] |
styleCodes |
private static String[] |
styleNames |
Modifier | Constructor and Description |
---|---|
private |
FontFormatter() |
Modifier and Type | Method and Description |
---|---|
static String |
format(Font font)
Format a
Font as a string. |
private static String |
nameForStyle(int style) |
static Font |
parse(String font)
Parse a font representation, returning an appropriate
Font
object. |
private static int |
styleForName(String style) |
private static final int[] styleCodes
private static final String[] styleNames
private FontFormatter()
private static String nameForStyle(int style)
private static int styleForName(String style)
public static String format(Font font)
Font
as a string. The format is "Name,Style,Size"
where Style is one of Plain, Bold, Italic, or
BoldItalic.font
- The Font
to format.parse(java.lang.String)
public static Font parse(String font) throws ParsingException
Font
object.font
- The string representation of the font.Font
object.ParsingException
- If font
is an
invalid font representation.format(java.awt.Font)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses