|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ast.grf.DefaultGrfFontManager
public class DefaultGrfFontManager
DefaultGrfFontManager is a singleton class for managing the list of known fonts known to the Grf class. Each font can be associated with its position in the list (hence providing the necessary mapping to an integer), but note that as fonts are removed these values change (so a request to map a Font to an integer should be made immediately) before passing to AST integer. A default font that is generally available is provided with index 0.
Field Summary | |
---|---|
protected Font |
defaultFont
The default font (Lucida Sans 14). |
protected ArrayList |
fonts
ArrayList of references to all fonts. |
Method Summary | |
---|---|
int |
add(Font font)
Add a font, returns its index. |
int |
count()
Get the number of fonts. |
Font |
getFont(int index)
Get a font by its index. |
int |
getIndex(Font font)
Get the index of a known font. |
static DefaultGrfFontManager |
getReference()
Return reference to the only allowed instance of this class. |
int |
remove(Font font)
Remove a font by name, returning its index. |
void |
remove(int index)
Remove a font by index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Font defaultFont
protected ArrayList fonts
Method Detail |
---|
public static DefaultGrfFontManager getReference()
public int count()
public int add(Font font)
public int remove(Font font)
public void remove(int index)
public int getIndex(Font font)
public Font getFont(int index)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |