|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.wordhoard.swing.text.FontManager
public class FontManager
Font manager.
For each character set, three font family categories are used:
Windows should acquire a font manager in their constructor and use it to get all needed font and font information. Each new font manager gets a copy of the current user font family preferences. If the user changes these preferences, the changes only affect new windows, not windows that are already open.
| Field Summary | |
|---|---|
static int |
MONOSPACED
Monospaced font category. |
static int |
NUM_CATEGORIES
Number of font categories. |
static int |
OTHER
Other font category. |
static int |
WORK
Work font category. |
| Constructor Summary | |
|---|---|
FontManager()
Creates a new font manager. |
|
| Method Summary | |
|---|---|
java.awt.Font |
getFont(byte charset,
int size)
Gets a plain "other" font. |
java.awt.Font |
getFont(byte charset,
int style,
int size)
Gets an "other" font. |
java.awt.Font |
getFont(int size)
Gets a plain Roman "other" font. |
FontInfo |
getFontInfo(byte charset,
int size)
Gets plain "other" font info. |
FontInfo |
getFontInfo(byte charset,
int style,
int size)
Gets "other" font info. |
FontInfo |
getFontInfo(int size)
Gets plain Roman "other" font info. |
java.awt.Font |
getMonospacedFont(int size)
Gets a plain monospaced font. |
java.awt.Font |
getMonospacedFont(int style,
int size)
Gets a monospaced font. |
FontInfo |
getMonospacedFontInfo(int size)
Gets plain monospaced font info. |
FontInfo |
getMonospacedFontInfo(int style,
int size)
Gets monospaced font info. |
int |
getNominalLineHeight(byte charset)
Gets the nominal line height. |
java.awt.Font |
getWorkFont(byte charset,
int size)
Gets a plain "work" font. |
java.awt.Font |
getWorkFont(byte charset,
int style,
int size)
Gets a "work" font. |
FontInfo |
getWorkFontInfo(byte charset,
int size)
Gets plain "work" font info. |
FontInfo |
getWorkFontInfo(byte charset,
int style,
int size)
Gets "work" font info. |
void |
initText(Text text)
Initializes font information for text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int WORK
public static final int OTHER
public static final int MONOSPACED
public static final int NUM_CATEGORIES
| Constructor Detail |
|---|
public FontManager()
| Method Detail |
|---|
public FontInfo getWorkFontInfo(byte charset,
int style,
int size)
charset - Character set.style - Style.size - Size.
public FontInfo getWorkFontInfo(byte charset,
int size)
charset - Character set.size - Size.
public FontInfo getFontInfo(byte charset,
int style,
int size)
charset - Character set.style - Style.size - Size.
public FontInfo getFontInfo(byte charset,
int size)
charset - Character set.size - Size.
public FontInfo getFontInfo(int size)
size - Size.
public FontInfo getMonospacedFontInfo(int style,
int size)
style - Style.size - Size.
public FontInfo getMonospacedFontInfo(int size)
size - Size.
public java.awt.Font getWorkFont(byte charset,
int style,
int size)
charset - Character set.style - Style.size - Size.
public java.awt.Font getWorkFont(byte charset,
int size)
charset - Character set.size - Size.
public java.awt.Font getFont(byte charset,
int style,
int size)
charset - Character set.style - Style.size - Size.
public java.awt.Font getFont(byte charset,
int size)
charset - Character set.size - Size.
public java.awt.Font getFont(int size)
size - Size.
public java.awt.Font getMonospacedFont(int style,
int size)
style - Style.size - Size.
public java.awt.Font getMonospacedFont(int size)
size - Size.
public void initText(Text text)
The font information is set for all the runs and widths are set for all the lines in the text.
text - Text. public int getNominalLineHeight(byte charset)
charset - Character set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||