com.jmex.bui.text
Class BTextFactory

java.lang.Object
  extended by com.jmex.bui.text.BTextFactory
All Implemented Interfaces:
BConstants
Direct Known Subclasses:
AWTTextFactory, JMEBitmapTextFactory

public abstract class BTextFactory
extends Object
implements BConstants

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


Field Summary
 
Fields inherited from interface com.jmex.bui.BConstants
BOTTOM, CENTER, DEFAULT_SIZE, DEFAULT_SPACING, GLOW, HORIZONTAL, LEFT, NORMAL, OUTLINE, OVERLAPPING, PLAIN, RIGHT, SHADOW, TOP, VERTICAL
 
Constructor Summary
BTextFactory()
           
 
Method Summary
 BText createText(String text, ColorRGBA color)
          Creates a text instance using our the font configuration associated with this text factory and the foreground color specified.
abstract  BText createText(String text, ColorRGBA color, int effect, int effectSize, ColorRGBA 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  BText[] wrapText(String text, ColorRGBA color, int effect, int effectSize, ColorRGBA 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BTextFactory

public BTextFactory()
Method Detail

getHeight

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


createText

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


createText

public abstract BText createText(String text,
                                 ColorRGBA color,
                                 int effect,
                                 int effectSize,
                                 ColorRGBA 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 BText[] wrapText(String text,
                                 ColorRGBA color,
                                 int effect,
                                 int effectSize,
                                 ColorRGBA effectColor,
                                 int maxWidth)
Wraps a string into a set of text objects that do not exceed the specified width.



Copyright © 2008 Michael Bayne. All Rights Reserved.