All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.Text3D

java.lang.Object
   |
   +----java.media.j3d.SceneGraphObject
           |
           +----java.media.j3d.NodeComponent
                   |
                   +----java.media.j3d.Geometry
                           |
                           +----java.media.j3d.Text3D

public class Text3D
extends Geometry
A Text3D object is a text string that has been converted to 3D geometry. The Font3D object determines the appearance of the Text3D NodeComponent object. Each Text3D object has a text position - a point in 3 space where the text should be placed. The 3D text can be placed around this position using different alignments and paths.

See Also:
Font3D

Variable Index

 o ALIGN_CENTER
alignment: the center of the string is placed on the position point.
 o ALIGN_FIRST
alignment: the first character of the string is placed on the position point.
 o ALIGN_LAST
alignment: the last character of the string is placed on the position point.
 o ALLOW_ALIGNMENT_READ
Specifies that this Text3D object allows reading the text alignment value.
 o ALLOW_ALIGNMENT_WRITE
Specifies that this Text3D object allows writing the text alignment value.
 o ALLOW_FONT3D_READ
Specifies that this Text3D object allows reading the Font3D component information.
 o ALLOW_FONT3D_WRITE
Specifies that this Text3D object allows writing the Font3D component information.
 o ALLOW_PATH_READ
Specifies that this Text3D object allows reading the text path value.
 o ALLOW_PATH_WRITE
Specifies that this Text3D object allows writing the text path value.
 o ALLOW_POSITION_READ
Specifies that this Text3D object allows reading the text position value.
 o ALLOW_POSITION_WRITE
Specifies that this Text3D object allows writing the text position value.
 o ALLOW_STRING_READ
Specifies that this Text3D object allows reading the String object.
 o ALLOW_STRING_WRITE
Specifies that this Text3D object allows writing the String object.
 o PATH_DOWN
path: succeeding glyphs are placed below the current glyph.
 o PATH_LEFT
path: succeeding glyphs are placed to the left of the current glyph.
 o PATH_RIGHT
path: succeeding glyphs are placed to the left of the current glyph.
 o PATH_UP
path: succeeding glyphs are placed above the current glyph.

Constructor Index

 o Text3D()
Creates an empty Text3D object.
 o Text3D(Font3D)
Creates a Text3D object with the given Font3D object.
 o Text3D(Font3D, String)
Creates a Text3D object given a Font3D object and a string.
 o Text3D(Font3D, String, Point3f)
Creates a Text3D object given a Font3D object and a string.
 o Text3D(Font3D, String, Point3f, int, int)
Creates a Text3D object given a Font3D object and a string.

Method Index

 o getAlignment()
Retrieves the text alignment policy for this Text3D NodeComponent object.
 o getBoundingBox(BoundingBox)
Retrieves the 3D bounding box that encloses this Text3D object.
 o getCharacterSpacing()
Retrieves the character spacing used to construct the Text3D string.
 o getFont3D()
Returns the Font3D objects used by this Text3D NodeComponent object.
 o getPath()
Retrieves the node's path field.
 o getPosition(Point3f)
Copies the node's position field into the supplied parameter.
 o getString(String)
Copies the character string used in the construction of the Text3D node into the supplied parameter.
 o setAlignment(int)
Sets the text alignment policy for this Text3D NodeComponent object.
 o setCharacterSpacing(int)
Sets the character spacing used hwne constructing the Text3D string.
 o setFont3D(Font3D)
Sets the Font3D object used by this Text3D NodeComponent object.
 o setPath(int)
Sets the node's path field.
 o setPosition(Point3f)
Sets the node's position field to the supplied parameter.
 o setString(String)
Copies the character string from the Text3D node into the supplied parameter.

Variables

 o ALLOW_FONT3D_READ
 public static final int ALLOW_FONT3D_READ
Specifies that this Text3D object allows reading the Font3D component information.

See Also:
Font3D
 o ALLOW_FONT3D_WRITE
 public static final int ALLOW_FONT3D_WRITE
Specifies that this Text3D object allows writing the Font3D component information.

See Also:
Font3D
 o ALLOW_STRING_READ
 public static final int ALLOW_STRING_READ
Specifies that this Text3D object allows reading the String object.

 o ALLOW_STRING_WRITE
 public static final int ALLOW_STRING_WRITE
Specifies that this Text3D object allows writing the String object.

 o ALLOW_POSITION_READ
 public static final int ALLOW_POSITION_READ
Specifies that this Text3D object allows reading the text position value.

 o ALLOW_POSITION_WRITE
 public static final int ALLOW_POSITION_WRITE
Specifies that this Text3D object allows writing the text position value.

 o ALLOW_ALIGNMENT_READ
 public static final int ALLOW_ALIGNMENT_READ
Specifies that this Text3D object allows reading the text alignment value.

 o ALLOW_ALIGNMENT_WRITE
 public static final int ALLOW_ALIGNMENT_WRITE
Specifies that this Text3D object allows writing the text alignment value.

 o ALLOW_PATH_READ
 public static final int ALLOW_PATH_READ
Specifies that this Text3D object allows reading the text path value.

 o ALLOW_PATH_WRITE
 public static final int ALLOW_PATH_WRITE
Specifies that this Text3D object allows writing the text path value.

 o ALIGN_CENTER
 public static final int ALIGN_CENTER
alignment: the center of the string is placed on the position point.

See Also:
getAlignment
 o ALIGN_FIRST
 public static final int ALIGN_FIRST
alignment: the first character of the string is placed on the position point.

See Also:
getAlignment
 o ALIGN_LAST
 public static final int ALIGN_LAST
alignment: the last character of the string is placed on the position point.

See Also:
getAlignment
 o PATH_LEFT
 public static final int PATH_LEFT
path: succeeding glyphs are placed to the left of the current glyph.

See Also:
getPath
 o PATH_RIGHT
 public static final int PATH_RIGHT
path: succeeding glyphs are placed to the left of the current glyph.

See Also:
getPath
 o PATH_UP
 public static final int PATH_UP
path: succeeding glyphs are placed above the current glyph.

See Also:
getPath
 o PATH_DOWN
 public static final int PATH_DOWN
path: succeeding glyphs are placed below the current glyph.

See Also:
getPath

Constructors

 o Text3D
 public Text3D()
Creates an empty Text3D object.

 o Text3D
 public Text3D(Font3D font3D)
Creates a Text3D object with the given Font3D object.

See Also:
Font3D
 o Text3D
 public Text3D(Font3D font3D,
               String string)
Creates a Text3D object given a Font3D object and a string. The string is converted into 3D glyphs. The first glyph from the string is placed at (0.0, 0.0, 0.0) and succeeding glyphs are placed to the right of the initial glyph.

See Also:
Font3D
 o Text3D
 public Text3D(Font3D font3D,
               String string,
               Point3f position)
Creates a Text3D object given a Font3D object and a string. The string is converted into 3D glyphs. The first glyph from the string is placed at position position and succeeding glyphs are placed to the right of the initial glyph.

See Also:
Font3D
 o Text3D
 public Text3D(Font3D font3D,
               String string,
               Point3f position,
               int alignment,
               int path)
Creates a Text3D object given a Font3D object and a string. The string is converted into 3D glyphs. The placement of the glyphs with respect to the position position depends on the alignment parameter and the path parameter.

See Also:
Font3D

Methods

 o getFont3D
 public final Font3D getFont3D()
Returns the Font3D objects used by this Text3D NodeComponent object.

Returns:
the Font3D object of this Text3D node - null if no Font3D has been associated with this node.
See Also:
Font3D
 o setFont3D
 public final void setFont3D(Font3D font3d)
Sets the Font3D object used by this Text3D NodeComponent object.

Parameters:
font3d - the Font3D object to associate with this Text3D node.
See Also:
Font3D
 o getString
 public final void getString(String string)
Copies the character string used in the construction of the Text3D node into the supplied parameter.

Parameters:
string - the String object to copy the node's string to.
 o setString
 public final void setString(String string)
Copies the character string from the Text3D node into the supplied parameter.

Parameters:
string - the String object to recieve the Text3D node's string.
 o getPosition
 public final void getPosition(Point3f position)
Copies the node's position field into the supplied parameter. The position is used to determine the initial placement of the Text3D string. The position, combined with the path and alignment control how the text is displayed.

Parameters:
position - the point to position the text.
See Also:
getAlignment, getPath
 o setPosition
 public final void setPosition(Point3f position)
Sets the node's position field to the supplied parameter. The position is used to determine the initial placement of the Text3D string. The position, combined with the path and alignment control how the text is displayed.

Parameters:
position - the point to position the text.
See Also:
getAlignment, getPath
 o getAlignment
 public final int getAlignment()
Retrieves the text alignment policy for this Text3D NodeComponent object. The alignment is used to specify how glyphs in the string are placed in relation to the position field. Valid values for this field are: The default value of this field is ALIGN_FIRST.

Returns:
the current alingment policy for this node.
See Also:
getPosition
 o setAlignment
 public final void setAlignment(int alignment)
Sets the text alignment policy for this Text3D NodeComponent object. The alignment is used to specify how glyphs in the string are placed in relation to the position field. Valid values for this field are: The default value of this field is ALIGN_FIRST.

Returns:
the current alingment policy for this node.
See Also:
getPosition
 o getPath
 public final int getPath()
Retrieves the node's path field. This field is used to specify how succeeding glyphs in the string are placed in relation to the previous glyph. Valid values for this field are: The default value of this field is PATH_RIGHT.

Returns:
the current alingment policy for this node.
 o setPath
 public final void setPath(int path)
Sets the node's path field. This field is used to specify how succeeding glyphs in the string are placed in relation to the previous glyph. Valid values for this field are: The default value of this field is PATH_RIGHT.

Parameters:
path - the value to set the path to.
Returns:
the current alingment policy for this node.
 o getBoundingBox
 public final void getBoundingBox(BoundingBox bounds)
Retrieves the 3D bounding box that encloses this Text3D object.

Parameters:
bounds - the object to copy the bounding information to.
See Also:
BoundingBox
 o getCharacterSpacing
 public final int getCharacterSpacing()
Retrieves the character spacing used to construct the Text3D string. This spacing is in addition to the regular spacing between glyphs as defined in the Font object. 1.0 in this space is measured as the width of the largest glyph in the 2D Font. The default value is 0.0.

 o setCharacterSpacing
 public final void setCharacterSpacing(int characterSpacing)
Sets the character spacing used hwne constructing the Text3D string. This spacing is in addition to the regular spacing between glyphs as defined in the Font object. 1.0 in this space is measured as the width of the largest glyph in the 2D Font. The default value is 0.0.


All Packages  Class Hierarchy  This Package  Previous  Next  Index