view
Class MyFont

java.lang.Object
  extended by java.awt.Font
      extended by view.MyFont
All Implemented Interfaces:
Serializable

public class MyFont
extends Font

A class to allow construction of a font with a single string using a coma-separated list.

See Also:
Serialized Form

Nested Class Summary
static class MyFont.All
          Prints out all fonts.
static class MyFont.Test
          Test font creation.
 
Field Summary
 
Fields inherited from class java.awt.Font
BOLD, CENTER_BASELINE, DIALOG, DIALOG_INPUT, HANGING_BASELINE, ITALIC, LAYOUT_LEFT_TO_RIGHT, LAYOUT_NO_LIMIT_CONTEXT, LAYOUT_NO_START_CONTEXT, LAYOUT_RIGHT_TO_LEFT, MONOSPACED, name, PLAIN, pointSize, ROMAN_BASELINE, SANS_SERIF, SERIF, size, style, TRUETYPE_FONT, TYPE1_FONT
 
Constructor Summary
MyFont(String coma)
          The string consists of the family, the font style and the size, all separated by a StringTool.COMMA.
 
Method Summary
 String toString()
          Returns a string that can be used in the constructor.
static String toString(Font f)
          Returns a string that can be used in the constructor.
 
Methods inherited from class java.awt.Font
canDisplay, canDisplay, canDisplayUpTo, canDisplayUpTo, canDisplayUpTo, createFont, createFont, createGlyphVector, createGlyphVector, createGlyphVector, createGlyphVector, decode, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, equals, finalize, getAttributes, getAvailableAttributes, getBaselineFor, getFamily, getFamily, getFont, getFont, getFont, getFontName, getFontName, getItalicAngle, getLineMetrics, getLineMetrics, getLineMetrics, getLineMetrics, getMaxCharBounds, getMissingGlyphCode, getName, getNumGlyphs, getPeer, getPSName, getSize, getSize2D, getStringBounds, getStringBounds, getStringBounds, getStringBounds, getStyle, getTransform, hashCode, hasLayoutAttributes, hasUniformLineMetrics, isBold, isItalic, isPlain, isTransformed, layoutGlyphVector
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MyFont

public MyFont(String coma)
The string consists of the family, the font style and the size, all separated by a StringTool.COMMA. The size and style must be integers.

Method Detail

toString

public String toString()
Returns a string that can be used in the constructor.

Overrides:
toString in class Font

toString

public static String toString(Font f)
Returns a string that can be used in the constructor.