com.threerings.opengl.gui.text
Class TextFactory

java.lang.Object
  extended by com.threerings.opengl.gui.text.TextFactory
All Implemented Interfaces:
UIConstants
Direct Known Subclasses:
CharacterTextFactory, StringTextFactory

public abstract class TextFactory
extends Object
implements UIConstants

Creates instances of Text using a particular technology and a particular font configuration.


Field Summary
 
Fields inherited from interface com.threerings.opengl.gui.UIConstants
BOTTOM, CENTER, DEFAULT_SIZE, DEFAULT_SPACING, GLOW, HORIZONTAL, LEFT, NORMAL, OUTLINE, OVERLAPPING, PLAIN, RIGHT, SHADOW, TOP, VERTICAL
 
Constructor Summary
TextFactory()
           
 
Method Summary
 Text createText(String text, Color4f color)
          Creates a text instance using our the font configuration associated with this text factory and the foreground color specified.
abstract  Text createText(String text, Color4f color, int effect, int effectSize, Color4f effectColor, boolean useAdvance)
          Creates a text instance using our the font configuration associated with this text factory and the foreground color, text effect and text effect color specified.
abstract  int getHeight()
          Returns the height of our text.
abstract  Text[] wrapText(String text, Color4f color, int effect, int effectSize, Color4f effectColor, int maxWidth)
          Wraps a string into a set of text objects that do not exceed the specified width.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFactory

public TextFactory()
Method Detail

getHeight

public abstract int getHeight()
Returns the height of our text.


createText

public Text createText(String text,
                       Color4f color)
Creates a text instance using our the font configuration associated with this text factory and the foreground color specified.


createText

public abstract Text createText(String text,
                                Color4f color,
                                int effect,
                                int effectSize,
                                Color4f effectColor,
                                boolean useAdvance)
Creates a text instance using our the font configuration associated with this text factory and the foreground color, text effect and text effect color specified.

Parameters:
useAdvance - if true, the advance to the next insertion point will be included in the bounds of the created text (this is needed by editable text displays).

wrapText

public abstract Text[] wrapText(String text,
                                Color4f color,
                                int effect,
                                int effectSize,
                                Color4f effectColor,
                                int maxWidth)
Wraps a string into a set of text objects that do not exceed the specified width.



Copyright © 2011. All Rights Reserved.