|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.scene.Spatial
com.jme3.scene.Node
com.jme3.font.BitmapText
public class BitmapText
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme3.scene.Spatial |
---|
Spatial.BatchHint, Spatial.CullHint |
Field Summary |
---|
Fields inherited from class com.jme3.scene.Node |
---|
children |
Fields inherited from class com.jme3.scene.Spatial |
---|
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_LIGHTLIST, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldTransform |
Constructor Summary | |
---|---|
BitmapText(BitmapFont font)
|
|
BitmapText(BitmapFont font,
boolean rightToLeft)
|
|
BitmapText(BitmapFont font,
boolean rightToLeft,
boolean arrayBased)
|
Method Summary | |
---|---|
BitmapText |
clone()
Creates a clone of the asset. |
BitmapFont.Align |
getAlignment()
|
ColorRGBA |
getColor()
|
BitmapFont |
getFont()
|
float |
getHeight()
|
int |
getLineCount()
|
float |
getLineHeight()
|
float |
getLineWidth()
|
LineWrapMode |
getLineWrapMode()
|
java.lang.String |
getText()
|
BitmapFont.VAlign |
getVerticalAlignment()
|
void |
render(RenderManager rm)
|
void |
setAlignment(BitmapFont.Align align)
Set horizontal alignment. |
void |
setBox(Rectangle rect)
Define area where bitmaptext will be rendered |
void |
setColor(ColorRGBA color)
changes text color. |
void |
setColor(int start,
int end,
ColorRGBA color)
Set the color of substring. |
void |
setColor(java.lang.String regexp,
ColorRGBA color)
Set the color of substring. |
void |
setEllipsisChar(char c)
for setLineWrapType(LineWrapType.NoWrap), set the last character when the text exceeds the bound. |
void |
setLineWrapMode(LineWrapMode wrap)
Available only when bounding is set. |
void |
setSize(float size)
Changes text size |
void |
setStyle(int start,
int end,
int style)
Set the font style of substring. |
void |
setStyle(java.lang.String regexp,
int style)
Set the font style of substring. |
void |
setTabPosition(float... tabs)
|
void |
setTabWidth(float width)
used for the tabs over the last tab position. |
void |
setText(java.lang.CharSequence text)
|
void |
setText(java.lang.String text)
|
void |
setVerticalAlignment(BitmapFont.VAlign align)
Set vertical alignment. |
void |
updateLogicalState(float tpf)
updateLogicalState calls the update() method
for all controls attached to this Spatial. |
Methods inherited from class com.jme3.scene.Node |
---|
attachChild, attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, read, setLightListRefresh, setLodLevel, setMaterial, setModelBound, setTransformRefresh, swapChildren, updateGeometricState, updateModelBound, updateWorldBound, write |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BitmapText(BitmapFont font)
public BitmapText(BitmapFont font, boolean rightToLeft)
public BitmapText(BitmapFont font, boolean rightToLeft, boolean arrayBased)
Method Detail |
---|
public BitmapText clone()
CloneableSmartAsset
Object.clone()
for more info on how this method
should be implemented.
clone
in interface CloneableSmartAsset
clone
in class Spatial
Mesh.cloneForAnim()
public BitmapFont getFont()
public void setSize(float size)
size
- text sizepublic void setText(java.lang.CharSequence text)
text
- charsequence to change text topublic void setText(java.lang.String text)
text
- String to change text topublic java.lang.String getText()
public ColorRGBA getColor()
public void setColor(ColorRGBA color)
color
- new color of textpublic void setBox(Rectangle rect)
rect
- position and size box where text is renderedpublic float getLineHeight()
public float getHeight()
public float getLineWidth()
public int getLineCount()
public LineWrapMode getLineWrapMode()
public void setAlignment(BitmapFont.Align align)
align
- public void setVerticalAlignment(BitmapFont.VAlign align)
align
- public BitmapFont.Align getAlignment()
public BitmapFont.VAlign getVerticalAlignment()
public void setStyle(int start, int end, int style)
start
- start index to set style. inclusive.end
- end index to set style. EXCLUSIVE.style
- public void setStyle(java.lang.String regexp, int style)
regexp
- regular expressionstyle
- public void setColor(int start, int end, ColorRGBA color)
start
- start index to set style. inclusive.end
- end index to set style. EXCLUSIVE.color
- public void setColor(java.lang.String regexp, ColorRGBA color)
regexp
- regular expressioncolor
- public void setTabPosition(float... tabs)
tabs
- tab positionspublic void setTabWidth(float width)
width
- tab sizepublic void setEllipsisChar(char c)
c
- public void setLineWrapMode(LineWrapMode wrap)
setBox()
method call is needed in advance.
true when
wrap
- NoWrap : Letters over the text bound is not shown. the last character is set to '...'(0x2026)
Character: Character is split at the end of the line.
Word : Word is split at the end of the line.public void updateLogicalState(float tpf)
Spatial
updateLogicalState
calls the update()
method
for all controls attached to this Spatial.
updateLogicalState
in class Node
tpf
- Time per frame.Spatial.addControl(com.jme3.scene.control.Control)
public void render(RenderManager rm)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |