public class Text3D extends Geometry
position
point.position
point.position
point.
Font3D
Modifier and Type | Field and Description |
---|---|
static int |
ALIGN_CENTER
alignment : the center of the string is placed on the
position point. |
static int |
ALIGN_FIRST
alignment : the first character of the string is placed
on the position point. |
static int |
ALIGN_LAST
alignment : the last character of the string is placed
on the position point. |
static int |
ALLOW_ALIGNMENT_READ
Specifies that this Text3D object allows
reading the text alignment value.
|
static int |
ALLOW_ALIGNMENT_WRITE
Specifies that this Text3D object allows
writing the text alignment value.
|
static int |
ALLOW_BOUNDING_BOX_READ
Specifies that this Text3D object allows
reading the text string bounding box value
|
static int |
ALLOW_CHARACTER_SPACING_READ
Specifies that this Text3D object allows
reading the text character spacing value.
|
static int |
ALLOW_CHARACTER_SPACING_WRITE
Specifies that this Text3D object allows
writing the text character spacing value.
|
static int |
ALLOW_FONT3D_READ
Specifies that this Text3D object allows
reading the Font3D component information.
|
static int |
ALLOW_FONT3D_WRITE
Specifies that this Text3D object allows
writing the Font3D component information.
|
static int |
ALLOW_PATH_READ
Specifies that this Text3D object allows
reading the text path value.
|
static int |
ALLOW_PATH_WRITE
Specifies that this Text3D object allows
writing the text path value.
|
static int |
ALLOW_POSITION_READ
Specifies that this Text3D object allows
reading the text position value.
|
static int |
ALLOW_POSITION_WRITE
Specifies that this Text3D object allows
writing the text position value.
|
static int |
ALLOW_STRING_READ
Specifies that this Text3D object allows
reading the String object.
|
static int |
ALLOW_STRING_WRITE
Specifies that this Text3D object allows
writing the String object.
|
static int |
PATH_DOWN
path : succeeding glyphs are placed below the
current glyph. |
static int |
PATH_LEFT
path : succeeding glyphs are placed to the left of
the current glyph. |
static int |
PATH_RIGHT
path : succeeding glyphs are placed to the left of
the current glyph. |
static int |
PATH_UP
path : succeeding glyphs are placed above the
current glyph. |
ALLOW_INTERSECT
Constructor and Description |
---|
Text3D()
Constructs a Text3D object with default parameters.
|
Text3D(Font3D font3D)
Creates a Text3D object with the given Font3D object.
|
Text3D(Font3D font3D,
String string)
Creates a Text3D object given a Font3D object and a string.
|
Text3D(Font3D font3D,
String string,
Point3f position)
Creates a Text3D object given a Font3D, a string and position.
|
Text3D(Font3D font3D,
String string,
Point3f position,
int alignment,
int path)
Creates a Text3D object given a Font3D, string, position, alignment
and path along which string is to be placed.
|
Modifier and Type | Method and Description |
---|---|
NodeComponent |
cloneNodeComponent()
Deprecated.
replaced with cloneNodeComponent(boolean forceDuplicate)
|
int |
getAlignment()
Retrieves the text alignment policy for this Text3D NodeComponent
object.
|
void |
getBoundingBox(BoundingBox bounds)
Retrieves the 3D bounding box that encloses this Text3D object.
|
float |
getCharacterSpacing()
Retrieves the character spacing used to construct the Text3D string.
|
Font3D |
getFont3D()
Returns the Font3D objects used by this Text3D NodeComponent object.
|
int |
getPath()
Retrieves the node's
path field. |
void |
getPosition(Point3f position)
Copies the node's
position field into the supplied
parameter. |
String |
getString()
Copies the character string used in the construction of the
Text3D node into the supplied parameter.
|
void |
setAlignment(int alignment)
Sets the text alignment policy for this Text3D NodeComponent
object.
|
void |
setCharacterSpacing(float characterSpacing)
Sets the character spacing used when constructing the Text3D string.
|
void |
setFont3D(Font3D font3d)
Sets the Font3D object used by this Text3D NodeComponent object.
|
void |
setPath(int path)
Sets the node's
path field. |
void |
setPosition(Point3f position)
Sets the node's
position field to the supplied
parameter. |
void |
setString(String string)
Copies the character string from the supplied parameter into the
Text3D node.
|
cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
public static final int ALLOW_FONT3D_READ
Font3D
,
Constant Field Valuespublic static final int ALLOW_FONT3D_WRITE
Font3D
,
Constant Field Valuespublic static final int ALLOW_STRING_READ
public static final int ALLOW_STRING_WRITE
public static final int ALLOW_POSITION_READ
public static final int ALLOW_POSITION_WRITE
public static final int ALLOW_ALIGNMENT_READ
public static final int ALLOW_ALIGNMENT_WRITE
public static final int ALLOW_PATH_READ
public static final int ALLOW_PATH_WRITE
public static final int ALLOW_CHARACTER_SPACING_READ
public static final int ALLOW_CHARACTER_SPACING_WRITE
public static final int ALLOW_BOUNDING_BOX_READ
public static final int ALIGN_CENTER
alignment
: the center of the string is placed on the
position
point.getAlignment()
,
Constant Field Valuespublic static final int ALIGN_FIRST
alignment
: the first character of the string is placed
on the position
point.getAlignment()
,
Constant Field Valuespublic static final int ALIGN_LAST
alignment
: the last character of the string is placed
on the position
point.getAlignment()
,
Constant Field Valuespublic static final int PATH_LEFT
path
: succeeding glyphs are placed to the left of
the current glyph.getPath()
,
Constant Field Valuespublic static final int PATH_RIGHT
path
: succeeding glyphs are placed to the left of
the current glyph.getPath()
,
Constant Field Valuespublic static final int PATH_UP
path
: succeeding glyphs are placed above the
current glyph.getPath()
,
Constant Field Valuespublic static final int PATH_DOWN
path
: succeeding glyphs are placed below the
current glyph.getPath()
,
Constant Field Valuespublic Text3D()
public Text3D(Font3D font3D)
Font3D
public Text3D(Font3D font3D, String string)
Font3D
public Text3D(Font3D font3D, String string, Point3f position)
position
and succeeding
glyphs are placed to the right of the initial glyph.Font3D
public Text3D(Font3D font3D, String string, Point3f position, int alignment, int path)
position
position depends on
the alignment parameter and the path parameter.Font3D
public Font3D getFont3D()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setFont3D(Font3D font3d)
font3d
- the Font3D object to associate with this Text3D node.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic String getString()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setString(String string)
string
- the String object to recieve the Text3D node's string.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void getPosition(Point3f position)
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.position
- the point to position the text.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphgetAlignment()
,
getPath()
public void setPosition(Point3f position)
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.position
- the point to position the text.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphgetAlignment()
,
getPath()
public int getAlignment()
alignment
is used to specify how
glyphs in the string are placed in relation to the
position
field. Valid values for this field
are:
position
point.
position
point.
position
point.
ALIGN_FIRST
.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphgetPosition(org.scijava.vecmath.Point3f)
public void setAlignment(int alignment)
alignment
is used to specify how
glyphs in the string are placed in relation to the
position
field. Valid values for this field
are:
position
point.
position
point.
position
point.
ALIGN_FIRST
.alignment
- specifies how glyphs in the string are placed
in relation to the position fieldCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphgetPosition(org.scijava.vecmath.Point3f)
public int getPath()
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:
PATH_RIGHT
.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setPath(int path)
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:
PATH_RIGHT
.path
- the value to set the path toCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void getBoundingBox(BoundingBox bounds)
bounds
- the object to copy the bounding information to.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphBoundingBox
public float getCharacterSpacing()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setCharacterSpacing(float characterSpacing)
characterSpacing
- the new character spacing valueCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic NodeComponent cloneNodeComponent()
cloneNodeComponent
in class NodeComponent
Copyright © 2016–2022 SciJava. All rights reserved.