Package com.ardor3d.extension.ui.text
Class RenderedText
java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Node
com.ardor3d.extension.ui.text.RenderedText
- All Implemented Interfaces:
Hintable
,Renderable
,Savable
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected float
protected String
protected boolean
protected float
protected final RenderedText.RenderedTextData
Fields inherited from class com.ardor3d.scenegraph.Spatial
_controllers, _delegateMap, _dirtyMark, _frustumIntersects, _listener, _localTransform, _name, _parent, _queueDistance, _renderStateList, _sceneHints, _userData, _worldBound, _worldTransform, ON_DIRTY_ATTACHED, ON_DIRTY_BOUNDING, ON_DIRTY_RENDERSTATE, ON_DIRTY_TRANSFORM, ON_DIRTY_TRANSFORM_ONLY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
attachChild
(Spatial child) attachChild
attaches a child to this node.int
attachChildAt
(Spatial child, int index) attachChildAt
attaches a child to this node at an index.void
draw
calls the onDraw method for each child maintained by this node.int
findCaretPosition
(int x, int y) findCaretTranslation
(int caretPosition, Vector2 store) getData()
float
int
getLineHeight
(int caretPosition) getText()
float
getWidth()
boolean
isStyled()
void
Render the object using the supplied renderer instance.void
setHeight
(float height) void
setParsedStyleSpans
(Collection<StyleSpan> spans) void
setPlainText
(String text) void
setStyled
(boolean styled) void
setWidth
(float width) void
setWorldTransform
(ReadOnlyTransform transform) Sets the world transform.void
updateWorldBound
(boolean recurse) updateWorldBound
merges the bounds of all the children maintained by this node.Methods inherited from class com.ardor3d.scenegraph.Node
acceptVisitor, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getClassTag, getNumberOfChildren, hasChild, makeCopy, makeInstanced, propagateDirtyDown, read, sortLights, swapChildren, updateChildren, updateWorldRenderStates, updateWorldTransform, write
Methods inherited from class com.ardor3d.scenegraph.Spatial
addController, addTranslation, addTranslation, applyWorldRenderStates, clearControllers, clearDirty, clearDirty, clearRenderState, getController, getControllerCount, getControllers, getCurrentRenderDelegate, getLastFrustumIntersection, getListener, getLocalLastFrustumIntersection, getLocalRenderState, getLocalRenderStates, getName, getParent, getParentHintable, getRenderDelegate, getRotation, getScale, getSceneHints, getTransform, getTranslation, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, isDirty, localToWorld, markDirty, markDirty, onDraw, propagateBoundToRoot, propagateDirtyUp, propagateStatesFromRoot, propageEventUp, removeController, removeController, removeFromParent, setLastFrustumIntersection, setListener, setName, setParent, setRenderDelegate, setRenderState, setRotation, setRotation, setScale, setScale, setScale, setTransform, setTranslation, setTranslation, setUserData, setWorldRotation, setWorldRotation, setWorldScale, setWorldScale, setWorldScale, setWorldTranslation, setWorldTranslation, toString, updateControllers, updateGeometricState, updateGeometricState, updateWorldRenderStates, worldToLocal
-
Field Details
-
_plainText
-
_parsedStyles
-
_width
protected float _width -
_height
protected float _height -
data
-
_styled
protected boolean _styled
-
-
Constructor Details
-
RenderedText
public RenderedText()
-
-
Method Details
-
getText
-
setPlainText
-
getPlainText
-
setHeight
public void setHeight(float height) -
getHeight
public float getHeight() -
setWidth
public void setWidth(float width) -
getWidth
public float getWidth() -
getParsedStyleSpans
-
setParsedStyleSpans
-
attachChild
Description copied from class:Node
attachChild
attaches a child to this node. This node becomes the child's parent. The current number of children maintained is returned.
If the child already had a parent it is detached from that former parent.- Overrides:
attachChild
in classNode
- Parameters:
child
- the child to attach to this node.- Returns:
- the number of children maintained by this node.
-
attachChildAt
Description copied from class:Node
attachChildAt
attaches a child to this node at an index. This node becomes the child's parent. The current number of children maintained is returned.
If the child already had a parent it is detached from that former parent.- Overrides:
attachChildAt
in classNode
- Parameters:
child
- the child to attach to this node.index
- the index of the child to be attached.- Returns:
- the number of children maintained by this node.
-
draw
Description copied from class:Node
draw
calls the onDraw method for each child maintained by this node. -
updateWorldBound
public void updateWorldBound(boolean recurse) Description copied from class:Node
updateWorldBound
merges the bounds of all the children maintained by this node. This will allow for faster culling operations.- Overrides:
updateWorldBound
in classNode
- Parameters:
recurse
- true to recurse down the scenegraph tree- See Also:
-
render
Description copied from interface:Renderable
Render the object using the supplied renderer instance.- Specified by:
render
in interfaceRenderable
- Parameters:
renderer
- the renderer
-
setWorldTransform
Description copied from class:Spatial
Sets the world transform.- Overrides:
setWorldTransform
in classSpatial
- Parameters:
transform
- the new world transform
-
getData
-
findCaretTranslation
-
findCaretPosition
public int findCaretPosition(int x, int y) -
getLineHeight
public int getLineHeight(int caretPosition) -
setStyled
public void setStyled(boolean styled) -
isStyled
public boolean isStyled()
-