|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteinshader.graphics.typography.TextLabelFactory
public class TextLabelFactory
Uses a GlyphSet to create short text labels to place on segments of a tube or ribbon. The labels will be amino acid abbreviations and sequence numbers (e.g. 'A 123' for alanine as the 123 amino acid in a chain).
| Constructor Summary | |
|---|---|
TextLabelFactory()
Constructs a TextLabelFactory. |
|
| Method Summary | |
|---|---|
TextLabel |
createLabel(String text,
int width,
int height)
Uses Glyph objects to create a TextLabel with a Buffer containing an image based on the text String given as an argument. |
void |
readGlyphSet()
Obtains a set of glyphs by using the default '.conf' configuration file in the fonts directory. |
void |
readGlyphSet(String config)
Reads the config file given as an argument and use the info to create a GlyphSet. |
void |
setDebug(boolean debug)
Setting debug to true will turn on debugging (which prints data to standard out) for the GlyphSetFactory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextLabelFactory()
| Method Detail |
|---|
public void setDebug(boolean debug)
debug - boolean value to turn debugging on or off.
public TextLabel createLabel(String text,
int width,
int height)
text - the string of characters to create an image for.width - the width of the label in pixels.height - the height of the label in pixels.
public void readGlyphSet()
throws GlyphException
GlyphException - if a problem occurs while trying to read
the set of glyphs from a file.
public void readGlyphSet(String config)
throws GlyphException
config - the name of the configuration file to read.
GlyphException - if a problem occurs while trying to read
the set of glyphs from a file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||