com.jmex.bui.text
Class JMEBitmapTextFactory
java.lang.Object
com.jmex.bui.text.BTextFactory
com.jmex.bui.text.JMEBitmapTextFactory
- All Implemented Interfaces:
- BConstants
public class JMEBitmapTextFactory
- extends BTextFactory
Creates instances of BText for text rendering.
| 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 |
JMEBitmapTextFactory(URL font,
int width,
int height)
Creates a bitmap text factory with the specified font URL and the
supplied per-character width and height. |
|
Method Summary |
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. |
int |
getHeight()
Returns the height of our text. |
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 |
_width
protected int _width
_height
protected int _height
_tstate
protected TextureState _tstate
_astate
protected AlphaState _astate
JMEBitmapTextFactory
public JMEBitmapTextFactory(URL font,
int width,
int height)
- Creates a bitmap text factory with the specified font URL and the
supplied per-character width and height.
getHeight
public int getHeight()
- Description copied from class:
BTextFactory
- Returns the height of our text.
- Specified by:
getHeight in class BTextFactory
createText
public BText createText(String text,
ColorRGBA color,
int effect,
int effectSize,
ColorRGBA effectColor,
boolean useAdvance)
- Description copied from class:
BTextFactory
- 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.
- Specified by:
createText in class BTextFactory
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 BText[] wrapText(String text,
ColorRGBA color,
int effect,
int effectSize,
ColorRGBA effectColor,
int maxWidth)
- Description copied from class:
BTextFactory
- Wraps a string into a set of text objects that do not exceed the specified width.
- Specified by:
wrapText in class BTextFactory
Copyright © 2008 Michael Bayne.
All Rights Reserved.