com.supermap.data
Class TextPart3D
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.data.TextPart3D
-
public class TextPart3D extends InternalHandleDisposable
The TextPart3D class.This class represents the part of the 3D text object, and mainly used to store the information of the text, rotation angle and anchor point etc. of the part of the GeoText.
The ObjectDisposedException exception will be thrown while invoking the member of this class after being released by thedispose()
method.
-
-
Constructor Summary
Constructors Constructor and Description TextPart3D()
Initializes the object.TextPart3D(java.lang.String text, double x, double y, double z)
Initializes a new instance with the parameters specified.TextPart3D(java.lang.String text, Point3D anchorPoint)
Creates a new TextPart object according to the specified arguments.TextPart3D(TextPart3D part)
Constructs a new object identical to the given TextPart object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description TextPart3D
clone()
Returns a copy of the current object.void
dispose()
Recycle this objectPoint3D
getAnchorPoint()
Returns the anchor point of the TextPart instance.java.lang.String
getText()
Returns the text of the specified TextPart instance.double
getX()
Sets the X coordinate of the child text object anchor object.double
getY()
Sets the Y coordinate of the child text object anchor object.double
getZ()
Gets the Z coordinate of the anchor point of the TextPart3D object.void
offset(double dx, double dy, double dz)
Adjust the anchor point of the TextPart with a specified value.void
setAnchorPoint(Point3D anchorPoint)
Sets the anchor point of the TextPart instance.void
setText(java.lang.String text)
Sets the text of the specified TextPart instance.void
setX(double x)
Sets the X coordinate of the TextPart instance anchor object.void
setY(double y)
Sets the Y coordinate of the TextPart instance anchor object.void
setZ(double z)
Sets the Z coordinate of the anchor point of the TextPart3D object.
-
-
-
Constructor Detail
-
TextPart3D
public TextPart3D()
Initializes the object. Rotation is 0.0, Text is String.Empty, Location is Point2D.Empty(X,Y is 0.0)
-
TextPart3D
public TextPart3D(TextPart3D part)
Constructs a new object identical to the given TextPart object.- Parameters:
part
- The specified TextPart object.
-
TextPart3D
public TextPart3D(java.lang.String text, Point3D anchorPoint)
Creates a new TextPart object according to the specified arguments.- Parameters:
text
- the text of the specified TextPart instance.anchorPoint
- the anchor point of the TextPart instance.
-
TextPart3D
public TextPart3D(java.lang.String text, double x, double y, double z)
Initializes a new instance with the parameters specified.- Parameters:
text
- String Specifies the text content of the instance of this objectx
- Double Specifies the X of the anchor point of this object instancey
- Double Specifies the Y of the anchor point of this object instancez
- Double Specifies the angle of rotation of the text, in degrees, and the positive direction is anticlockwise.
-
-
Method Detail
-
dispose
public void dispose()
Recycle this object
-
getText
public java.lang.String getText()
Returns the text of the specified TextPart instance.- Returns:
- The text content of the TextPart instance
-
setText
public void setText(java.lang.String text)
Sets the text of the specified TextPart instance.- Parameters:
text
- The text content of the TextPart instance
-
getAnchorPoint
public Point3D getAnchorPoint()
Returns the anchor point of the TextPart instance.- Returns:
- The anchor point position of the TextPart instance.
-
setAnchorPoint
public void setAnchorPoint(Point3D anchorPoint)
Sets the anchor point of the TextPart instance.- Parameters:
anchorPoint
- the anchor position of the instance
-
getX
public double getX()
Sets the X coordinate of the child text object anchor object. The unit is meter.- Returns:
- the x-coordinate of the anchor point of the TextPart object.
- Default:
- The default value is 0.
-
getY
public double getY()
Sets the Y coordinate of the child text object anchor object. The unit is meter.- Returns:
- The Y coordinate of the child text object anchor object. The unit is meter.
- Default:
- The default value is 0.
-
setX
public void setX(double x)
Sets the X coordinate of the TextPart instance anchor object. The unit is meter.- Parameters:
x
- The X coordinate of the TextPart instance anchor object.
-
setY
public void setY(double y)
Sets the Y coordinate of the TextPart instance anchor object. The unit is meter.- Parameters:
y
- The Y coordinate of the TextPart instance anchor object.
-
getZ
public double getZ()
Gets the Z coordinate of the anchor point of the TextPart3D object. The unit is meters.- Returns:
- the z-coordinate of the TextPart3D object anchor point.
-
setZ
public void setZ(double z)
Sets the Z coordinate of the anchor point of the TextPart3D object. The unit is meters.- Parameters:
z
- the z-coordinate of the TextPart3D object anchor point.
-
offset
public void offset(double dx, double dy, double dz)
Adjust the anchor point of the TextPart with a specified value.- Parameters:
dx
- Value in x direction.dy
- Value in y direction.dz
- Value in z direction.
-
clone
public TextPart3D clone()
Returns a copy of the current object.- Overrides:
clone
in classjava.lang.Object
- Returns:
- A copy of the current object.
-
-