public class TLcdNVG15Text extends TLcdNVG15Base implements ILcd2DEditablePoint, ILcdOrientationSettable, ILcdCache
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
LABEL_PROPERTY
Data property that maps to the
label attribute. |
static TLcdDataProperty |
ROT_ANGLE_PROPERTY
Data property that maps to the
rotation attribute. |
static TLcdDataProperty |
STYLE_PROPERTY
Data property that maps to the
style attribute. |
static TLcdDataProperty |
TEXT_STRING_PROPERTY
Data property that maps to the
content element. |
static TLcdDataProperty |
URI_PROPERTY
Data property that maps to the
uri attribute. |
static TLcdDataProperty |
X_PROPERTY
Data property that maps to the
x attribute. |
static TLcdDataProperty |
Y_PROPERTY
Data property that maps to the
y attribute. |
Constructor and Description |
---|
TLcdNVG15Text() |
TLcdNVG15Text(TLcdDataType aDataType)
Constructs a new instance of TLcdNVG15Text with the given data type.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the cache.
|
TLcdNVG15Text |
clone()
Returns a deep clone of this object.
|
TLcdNVG15Text |
clone(Map aObjectDictionary)
Returns a deep clone of this object.
|
ILcd2DEditablePoint |
cloneAs2DEditablePoint()
Returns a copy of this
ILcdPoint that is also an ILcd2DEditablePoint . |
ILcd3DEditablePoint |
cloneAs3DEditablePoint()
Returns a copy of this
ILcdPoint that is also an ILcd3DEditablePoint . |
boolean |
contains2D(double aX,
double aY)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains2D(ILcdPoint aILcdPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 2D space. |
boolean |
contains3D(double aX,
double aY,
double aZ)
Checks whether this
ILcdShape contains the given point in
the 3D space. |
boolean |
contains3D(ILcdPoint aILcdPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 3D space. |
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
Object |
getCachedObject(Object aKey)
Looks up and returns the cached Object corresponding to the given key.
|
double |
getCosX()
Returns cos(
getX() * DEG2RAD ). |
double |
getCosY()
Returns cos(
getY() * DEG2RAD ). |
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
String |
getLabel()
Returns the value of the property that maps to the
label attribute. |
double |
getOrientation()
Returns the orientation of this object in degrees.
|
double |
getRotAngle()
Returns the value of the property that maps to the
rotation attribute. |
double |
getSinX()
Returns sin(
getX() * DEG2RAD ). |
double |
getSinY()
Returns sin(
getY() * DEG2RAD ). |
TLcdNVGStyle |
getStyle()
Returns the value of the property that maps to the
style attribute. |
double |
getTanX()
Returns tan(
getX() * DEG2RAD ). |
double |
getTanY()
Returns tan(
getY() * DEG2RAD ). |
String |
getTextString()
Returns the value of the property that maps to the
content element. |
URI |
getUri()
Returns the value of the property that maps to the
uri attribute. |
double |
getX()
Returns the value of the property that maps to the
x attribute. |
double |
getY()
Returns the value of the property that maps to the
y attribute. |
double |
getZ()
Returns the z coordinate of this
ILcdPoint . |
void |
insertIntoCache(Object aKey,
Object aObject)
Inserts a cache Object corresponding to the given key Object.
|
void |
move2D(double aX,
double aY)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
move2D(ILcdPoint aILcdPoint)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
Object |
removeCachedObject(Object aKey)
Looks up and removes the cached Object corresponding to the given key.
|
void |
setLabel(String aValue)
Sets the value of the property that maps to the
label attribute. |
void |
setOrientation(double aOrientation)
Sets the orientation on this object.
|
void |
setRotAngle(double aValue)
Sets the value of the property that maps to the
rotation attribute. |
void |
setStyle(TLcdNVGStyle aValue)
Sets the value of the property that maps to the
style attribute. |
void |
setTextString(String aValue)
Sets the value of the property that maps to the
content element. |
void |
setUri(URI aValue)
Sets the value of the property that maps to the
uri attribute. |
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
void |
setX(double aValue)
Sets the value of the property that maps to the
x attribute. |
void |
setY(double aValue)
Sets the value of the property that maps to the
y attribute. |
void |
translate2D(double aDeltaX,
double aDeltaY)
Translates this
ILcd2DEditableShape from its current position over the given translation
vector in the 2D space. |
getParent, setParent
getDataType, getValue, getValue, hasValue, hasValue, setValue, toString
public static final TLcdDataProperty ROT_ANGLE_PROPERTY
rotation
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty X_PROPERTY
x
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty Y_PROPERTY
y
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty TEXT_STRING_PROPERTY
content
element.
The possible values for this property are instances of String
.public static final TLcdDataProperty LABEL_PROPERTY
label
attribute.
The possible values for this property are instances of String
.public static final TLcdDataProperty STYLE_PROPERTY
style
attribute.
The possible values for this property are instances of TLcdNVGStyle
.public static final TLcdDataProperty URI_PROPERTY
uri
attribute.
The possible values for this property are instances of URI
.public TLcdNVG15Text()
public TLcdNVG15Text(TLcdDataType aDataType)
aDataType
- The data type of the textpublic TLcdNVG15Text clone()
TLcdDataObject.clone(Map)
.clone
in interface ILcdCloneable
clone
in class TLcdDataObject
Object.clone()
public TLcdNVG15Text clone(Map aObjectDictionary)
TLcdDataObject
ILcdDataObject
, the value is cloned by first creating a new instance via
the value.getDataType().newInstance()
method, and then cloning its properties one by one.ILcdDeepCloneable
or
ILcdCloneable
then this interface is used to clone the value.clone
in interface ILcdDeepCloneable
clone
in class TLcdDataObject
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made,
and their corresponding clone Object.public void insertIntoCache(Object aKey, Object aObject)
insertIntoCache
in interface ILcdCache
aKey
- the key Object that will be used to identify the Object.
The key must therefore be a unique identifier, typically the caller
itself: insertIntoCache(this, ...)
.aObject
- the Object to be cached.public Object getCachedObject(Object aKey)
getCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public Object removeCachedObject(Object aKey)
removeCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public void clearCache()
clearCache
in interface ILcdCache
public double getZ()
ILcdPoint
.public double getCosX()
getX()
* DEG2RAD ).public double getCosY()
getY()
* DEG2RAD ).public double getSinX()
getX()
* DEG2RAD ).public double getSinY()
getY()
* DEG2RAD ).public double getTanX()
getX()
* DEG2RAD ).public double getTanY()
getY()
* DEG2RAD ).public ILcd2DEditablePoint cloneAs2DEditablePoint()
ILcdPoint
that is also an ILcd2DEditablePoint
.
This makes sure that the first two dimensions of the copy are writable,cloneAs2DEditablePoint
in interface ILcdPoint
ILcdPoint
that is also an ILcd2DEditablePoint
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdPoint
object may be read-only.ILcd2DEditablePoint
public ILcd3DEditablePoint cloneAs3DEditablePoint()
ILcdPoint
that is also an ILcd3DEditablePoint
.
This makes sure that all three dimensions of the copy are writable,cloneAs3DEditablePoint
in interface ILcdPoint
ILcdPoint
that is also an ILcd3DEditablePoint
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdPoint
object may be read-only.ILcd3DEditablePoint
public ILcdPoint getFocusPoint()
ILcdShape
.getFocusPoint
in interface ILcdShape
ILcdShape
.public boolean contains2D(ILcdPoint aILcdPoint)
ILcdShape
contains the given ILcdPoint
in the 2D space.
Only the first two dimensions of the ILcdShape
and the ILcdPoint
are considered.contains2D
in interface ILcdShape
aILcdPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public boolean contains2D(double aX, double aY)
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public boolean contains3D(ILcdPoint aILcdPoint)
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
aILcdPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public boolean contains3D(double aX, double aY, double aZ)
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.public ILcdBounds getBounds()
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public void move2D(ILcdPoint aILcdPoint)
ILcd2DEditableShape
to the given point in the 2D space. The focus point
is used as the handle by which the shape is moved. Only the first
two dimensions of the ILcdShape
and the ILcdPoint
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
aILcdPoint
- the ILcdPoint
to move to.ILcd2DEditableShape.move2D(double, double)
public void move2D(double aX, double aY)
ILcd2DEditableShape
to the given point in the 2D space. The focus point
is used as the handle by which the shape is moved. Only the first
two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public void translate2D(double aDeltaX, double aDeltaY)
ILcd2DEditableShape
from its current position over the given translation
vector in the 2D space. Only the first two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.translate2D
in interface ILcd2DEditableShape
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.public double getOrientation()
ILcdOriented
If there is no rotation known for this object, return Double.NaN
.
getOrientation
in interface ILcdOriented
NaN
if undefined.public void setOrientation(double aOrientation)
ILcdOrientationSettable
setOrientation
in interface ILcdOrientationSettable
aOrientation
- the orientation specified in degrees with 0 located at 12 o'clock and increasing clockwise.ILcdOriented.getOrientation()
public void setValue(TLcdDataProperty aProperty, Object aValue)
ILcdDataObject
Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's type
or in one of its super types. In
other words, getDataType().getProperties().contains( aProperty ) should always be true.
Otherwise, the implementation should throw an IllegalArgumentException
.setValue
in interface ILcdDataObject
setValue
in class TLcdDataObject
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public double getRotAngle()
rotation
attribute.ROT_ANGLE_PROPERTY
property.public void setRotAngle(double aValue)
rotation
attribute.aValue
- the value to set for the ROT_ANGLE_PROPERTY
property.public double getX()
x
attribute.X_PROPERTY
property.public void setX(double aValue)
x
attribute.aValue
- the value to set for the X_PROPERTY
property.public double getY()
y
attribute.Y_PROPERTY
property.public void setY(double aValue)
y
attribute.aValue
- the value to set for the Y_PROPERTY
property.public String getTextString()
content
element.TEXT_STRING_PROPERTY
property.public void setTextString(String aValue)
content
element.aValue
- the value to set for the TEXT_STRING_PROPERTY
property.public String getLabel()
label
attribute.
A textual representation of this element.
LABEL_PROPERTY
property.public void setLabel(String aValue)
label
attribute.
A textual representation of this element.
aValue
- the value to set for the LABEL_PROPERTY
property.public TLcdNVGStyle getStyle()
style
attribute.
CSS based style description which indicates how this element should be rendered graphically.
STYLE_PROPERTY
property.public void setStyle(TLcdNVGStyle aValue)
style
attribute.
CSS based style description which indicates how this element should be rendered graphically.
aValue
- the value to set for the STYLE_PROPERTY
property.public URI getUri()
uri
attribute.
URI schema that uniquely identifies the object. See the URI Scheme for more details.
URI_PROPERTY
property.public void setUri(URI aValue)
uri
attribute.
URI schema that uniquely identifies the object. See the URI Scheme for more details.
aValue
- the value to set for the URI_PROPERTY
property.