org.xith3d.ui.text2d
Class Line2D

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.Node
          extended by org.xith3d.scenegraph.GroupNode
              extended by org.xith3d.scenegraph.Group
                  extended by org.xith3d.scenegraph.TransformGroup
                      extended by org.xith3d.ui.text2d.Line2D
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode, Transformable

public class Line2D
extends TransformGroup

Represents a line of text in 3D space. This class is part of the DynamicText toolkit for Xith3D.

See Also:
org.xith3d.text.DText2D

Field Summary
 
Fields inherited from class org.xith3d.scenegraph.GroupNode
children, hostGroup, numChildren, totalNumChildren, totalNumShapes
 
Fields inherited from class org.xith3d.scenegraph.Node
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, transformGroup, untransformedBounds
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
  Line2D(java.lang.String string, org.openmali.vecmath2.Colorf color, java.awt.Font font, TextAlignment align)
          Constructs a new Line2D with all parameters
protected Line2D(java.lang.String string, org.openmali.vecmath2.Colorf color, java.lang.String charId, TextAlignment align)
          Constructs a new Line2D with all parameters
  Line2D(java.lang.String string, float r, float g, float b, java.awt.Font font, TextAlignment align)
          Constructs a new Line2D with all parameters
protected Line2D(java.lang.String string, float r, float g, float b, java.lang.String charId, TextAlignment align)
          Constructs a new Line2D with all parameters
 
Method Summary
 Character2D char2DAt(int index)
           
 TextAlignment getAlign()
           
 java.util.List<Character2D> getCharacters()
           
protected  java.lang.String getCharId()
           
 org.openmali.vecmath2.Colorf getColor()
           
 java.awt.Font getFont()
           
 org.openmali.vecmath2.Tuple2f getSize()
           
 java.lang.String getText()
           
 float getTransparency()
           
 void setColor(org.openmali.vecmath2.Colorf color)
          changes the color of this text fast
 void setColor(float r, float g, float b)
          Sets the color of this text fast
 void setText(java.lang.String newText)
          replaces the text of this line fast
 void setTransparency(float transparency)
           
protected  void setTransparency(TransparencyAttributes ta)
           
 java.lang.String toString()
          
 
Methods inherited from class org.xith3d.scenegraph.TransformGroup
getLocalTransform, getLocalTransform, getPosition, getPosition, getTransform, getTransform, getWorldTransform, newInstance, onTransformChanged, setLocalTransform, setPosition, setPosition, setTransform, traverse, updateTransform
 
Methods inherited from class org.xith3d.scenegraph.Group
moveTo
 
Methods inherited from class org.xith3d.scenegraph.GroupNode
absorbDetails, addChild, addChild, checkChild, dump, dump, ensureCapacity, expandBounds, findAll, findAll, findFirst, findFirst, freeOpenGLResources, getChild, getChildren, getChildren, getClipper, getPickHost, getScissorRect, getTotalNumChildren, getTotalNumShapes, indexOf, isPickHost, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, numChildren, removeAllChildren, removeChild, removeChild, setBoundsDirty, setBoundsDirtyUpward, setChild, setClipper, setLive, setPickHost, setPickHost, setScissorRect, setShowBounds, sharedCopy, sharedCopy, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateBounds, updateBoundsCheap
 
Methods inherited from class org.xith3d.scenegraph.Node
cloneNode, detach, duplicateNode, freeOpenGLResources, getBounds, getBoundsAutoCompute, getBoundsType, getBoundsTypeHint, getDefaultPickable, getIndentString, getInheritedNodeAttributes, getModListener, getOrderedChild, getOrderedState, getParent, getRoot, getShadowAttachment, getShowBounds, getTransformGroup, getTreeCell, getWorldBounds, getWorldTransform, isBillboard, isIgnoreBounds, isOccluder, isPickable, isRenderable, isUpdatableNode, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBounds, setBoundsAutoCompute, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setModListener, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, updateOrderedChild, updateTransformGroup, updateWorldTransform
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xith3d.scenegraph.Transformable
getName, setName
 

Constructor Detail

Line2D

protected Line2D(java.lang.String string,
                 float r,
                 float g,
                 float b,
                 java.lang.String charId,
                 TextAlignment align)
Constructs a new Line2D with all parameters

Parameters:
string - the string to set
r -
g -
b -
charId -
align -

Line2D

protected Line2D(java.lang.String string,
                 org.openmali.vecmath2.Colorf color,
                 java.lang.String charId,
                 TextAlignment align)
Constructs a new Line2D with all parameters

Parameters:
string - the string to set
color -
charId -
align -

Line2D

public Line2D(java.lang.String string,
              float r,
              float g,
              float b,
              java.awt.Font font,
              TextAlignment align)
Constructs a new Line2D with all parameters

Parameters:
string - the string to set
r -
g -
b -
font -
align -

Line2D

public Line2D(java.lang.String string,
              org.openmali.vecmath2.Colorf color,
              java.awt.Font font,
              TextAlignment align)
Constructs a new Line2D with all parameters

Parameters:
string - the string to set
font -
color -
align -
Method Detail

getCharacters

public java.util.List<Character2D> getCharacters()
Returns:
an unmodifiable List of all contained Characters

setText

public void setText(java.lang.String newText)
replaces the text of this line fast

Parameters:
newText - new text

getText

public java.lang.String getText()

char2DAt

public Character2D char2DAt(int index)

getSize

public org.openmali.vecmath2.Tuple2f getSize()

getFont

public java.awt.Font getFont()

getCharId

protected java.lang.String getCharId()

getAlign

public TextAlignment getAlign()

setColor

public void setColor(float r,
                     float g,
                     float b)
Sets the color of this text fast

Parameters:
r - new Color
g - new Color
b - new Color

setColor

public void setColor(org.openmali.vecmath2.Colorf color)
changes the color of this text fast

Parameters:
color - new Color

getColor

public org.openmali.vecmath2.Colorf getColor()
Returns:
the Line's color (actually the color of the first character).

setTransparency

protected void setTransparency(TransparencyAttributes ta)

setTransparency

public void setTransparency(float transparency)

getTransparency

public float getTransparency()

toString

public java.lang.String toString()

Overrides:
toString in class SceneGraphObject