public final class TextBatchPrimitiveOptionalParameters extends Object implements IDisposable
TextBatchPrimitive
.
To use optional parameters, create an instance of TextBatchPrimitiveOptionalParameters
,
then call the desired methods or properties to define per-string and per-batch parameters,
and finally pass the object to the text batch's Set
or SetPartial
method.TextBatchPrimitive
Constructor and Description |
---|
TextBatchPrimitiveOptionalParameters()
Initializes default text batch primitive optional parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting
unmanaged resources.
|
protected void |
dispose(boolean disposing) |
protected void |
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
Cartesian |
getEyeOffset()
Gets the per-batch eye offset, which is applied to each string in the text batch.
|
int |
getMaximumStringLength()
Gets the maximum length of each string in the text batch.
|
Origin |
getOrigin()
Gets the per-batch origin, which is applied to each string in the text batch.
|
PointF |
getPixelOffset()
Gets the per-batch pixel offset, which is applied to each string in the text batch.
|
boolean |
getScreenSpaceRendering()
Gets a flag that informs the CTextBatchPrimitive to use rendering
optimized for screen space text.
|
void |
setColors(Iterable<Color> colors)
Defines a collection of colors, one for each string in the batch.
|
void |
setDisplays(Iterable<Boolean> displays)
Defines a collection of boolean display flags,
one for each string in the batch.
|
void |
setEyeOffset(Cartesian value)
Sets the per-batch eye offset, which is applied to each string in the text batch.
|
void |
setEyeOffsets(Iterable<Cartesian> eyeOffsets)
Defines a collection of eye offsets, one for each string in the batch.
|
void |
setMaximumStringLength(int value)
Sets the maximum length of each string in the text batch.
|
void |
setOrigin(Origin value)
Sets the per-batch origin, which is applied to each string in the text batch.
|
void |
setOrigins(Iterable<Origin> origins)
Defines a collection of origins, one for each string in the batch.
|
void |
setPixelOffset(PointF value)
Sets the per-batch pixel offset, which is applied to each string in the text batch.
|
void |
setPixelOffsets(Iterable<PointF> pixelOffsets)
Defines a collection of pixel offsets, one for each string in the batch.
|
void |
setScreenSpaceRendering(boolean value)
Sets a flag that informs the CTextBatchPrimitive to use rendering
optimized for screen space text.
|
void |
setTimeIntervalDisplayConditions(Iterable<TimeIntervalDisplayCondition> timeIntervals)
Defines a collection of
TimeIntervalDisplayConditions ,
one for each string in the batch. |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public TextBatchPrimitiveOptionalParameters()
All per-string parameters are initially empty.
The per-batch properties are initialized to the following values:
EyeOffset
: Cartesian.Zero
Origin
: BottomLeft
PixelOffset
: [0, 0]
MaximumStringLength
: 0
protected void finalize() throws Throwable
java.lang.Object
finalize
method to dispose of
system resources or to perform other cleanup.
The general contract of finalize
is that it is invoked
if and when the Java™ virtual
machine has determined that there is no longer any
means by which this object can be accessed by any thread that has
not yet died, except as a result of an action taken by the
finalization of some other object or class which is ready to be
finalized. The finalize
method may take any action, including
making this object available again to other threads; the usual purpose
of finalize
, however, is to perform cleanup actions before
the object is irrevocably discarded. For example, the finalize method
for an object that represents an input/output connection might perform
explicit I/O transactions to break the connection before the object is
permanently discarded.
The finalize
method of class Object
performs no
special action; it simply returns normally. Subclasses of
Object
may override this definition.
The Java programming language does not guarantee which thread will
invoke the finalize
method for any given object. It is
guaranteed, however, that the thread that invokes finalize will not
be holding any user-visible synchronization locks when finalize is
invoked. If an uncaught exception is thrown by the finalize method,
the exception is ignored and finalization of that object terminates.
After the finalize
method has been invoked for an object, no
further action is taken until the Java virtual machine has again
determined that there is no longer any means by which this object can
be accessed by any thread that has not yet died, including possible
actions by other objects or classes which are ready to be finalized,
at which point the object may be discarded.
The finalize
method is never invoked more than once by a Java
virtual machine for any given object.
Any exception thrown by the finalize
method causes
the finalization of this object to be halted, but is otherwise
ignored.
finalize
in class Object
Throwable
- the Exception
raised by this methodWeakReference
,
PhantomReference
public final void dispose()
IDisposable
dispose
in interface IDisposable
protected void dispose(boolean disposing)
public final Origin getOrigin()
The origin defines where the string is placed relative to its position.
If per-string origins were specified with
SetOrigins
the per-batch origin is ignored.
SetOrigins
public final void setOrigin(Origin value)
The origin defines where the string is placed relative to its position.
If per-string origins were specified with
SetOrigins
the per-batch origin is ignored.
SetOrigins
public final Cartesian getEyeOffset()
Eye offsets define an eye-space translation in meters. In eye-space, the
x
axis points to the right, the y
axis points up, and the
z
axis points into the screen. Eye offsets are commonly used when more
than one primitive is located at the same position. For example, if a
string in a text batch is located at the same position as a model
primitive, an eye offset in the positive y
direction can be applied
to the string so it appears a specified number of meters above the model.
If per-string eye offsets were specified with
SetEyeOffsets
the per-batch eye offset is ignored.
SetEyeOffsets
public final void setEyeOffset(Cartesian value)
Eye offsets define an eye-space translation in meters. In eye-space, the
x
axis points to the right, the y
axis points up, and the
z
axis points into the screen. Eye offsets are commonly used when more
than one primitive is located at the same position. For example, if a
string in a text batch is located at the same position as a model
primitive, an eye offset in the positive y
direction can be applied
to the string so it appears a specified number of meters above the model.
If per-string eye offsets were specified with
SetEyeOffsets
the per-batch eye offset is ignored.
SetEyeOffsets
public final PointF getPixelOffset()
The pixel offset defines a screen-space translation for a string from its
position. Positive x
values translate to the right and positive y
values translate up.
This is commonly used when more than one primitive is located
at the same position. For example, if a string in a text batch and a
point in a point batch have the same position, the string may have a
pixel offset applied to it so it doesn't overlap the point.
If per-string pixel offsets were specified with
SetPixelOffsets
the per-batch pixel offset is ignored.
SetPixelOffsets
public final void setPixelOffset(PointF value)
The pixel offset defines a screen-space translation for a string from its
position. Positive x
values translate to the right and positive y
values translate up.
This is commonly used when more than one primitive is located
at the same position. For example, if a string in a text batch and a
point in a point batch have the same position, the string may have a
pixel offset applied to it so it doesn't overlap the point.
If per-string pixel offsets were specified with
SetPixelOffsets
the per-batch pixel offset is ignored.
SetPixelOffsets
public final int getMaximumStringLength()
This property is only used when a text batch is updated with SetPartial
.
The length of a string updated with SetPartial
must be less than or
equal to the length of the string it is replacing or this value.
public final void setMaximumStringLength(int value)
This property is only used when a text batch is updated with SetPartial
.
The length of a string updated with SetPartial
must be less than or
equal to the length of the string it is replacing or this value.
public final boolean getScreenSpaceRendering()
public final void setScreenSpaceRendering(boolean value)
public final void setOrigins(Iterable<Origin> origins)
The origin defines where the string is placed relative to its position.
Per-string origins override the per-batch origin. Therefore, when
per-string origins are defined with this method,
Origin
is ignored.
origins
- The origins for each string in the batch. There must be one origin for
each string passed to the
TextBatchPrimitive
's
Set
or SetPartial
method.Origin
public final void setEyeOffsets(Iterable<Cartesian> eyeOffsets)
Eye offsets define an eye-space translation in meters. In eye-space, the
x
axis points to the right, the y
axis points up, and the
z
axis points into the screen. Eye offsets are commonly used when more
than one primitive is located at the same position. For example, if a
string in a text batch is located at the same position as a model
primitive, an eye offset in the positive y
direction can be applied
to the string so it appears a specified number of meters above the model.
Per-string eye offsets override the per-batch eye offset. Therefore, when
per-string eye offsets are defined with this method,
EyeOffset
is ignored.
eyeOffsets
- The eye offsets for each string in the batch. There must be one eye offset for
each string passed to the
TextBatchPrimitive
's
Set
or SetPartial
method.EyeOffset
public final void setPixelOffsets(Iterable<PointF> pixelOffsets)
The pixel offset defines a screen-space translation for a string from its
position. Positive x
values translate to the right and positive y
values translate up.
This is commonly used when more than one primitive is located
at the same position. For example, if a string in a text batch and a
point in a point batch have the same position, the string may have a
pixel offset applied to it so it doesn't overlap the point.
Per-string pixel offsets override the per-batch pixel offset. Therefore, when
per-string pixel offsets are defined with this method,
PixelOffset
is ignored.
pixelOffsets
- The pixel offsets for each string in the batch. There must be one pixel offset for
each string passed to the
TextBatchPrimitive
's
Set
or SetPartial
method.PixelOffset
public final void setColors(Iterable<Color> colors)
Per-string colors override the per-batch color. Therefore, when
per-string colors are defined with this method, the text batch's
Color
(get
)
property is ignored.
colors
- The colors for each string in the batch. There must be one color for
each string passed to the
TextBatchPrimitive
's
Set
or SetPartial
method.public final void setTimeIntervalDisplayConditions(Iterable<TimeIntervalDisplayCondition> timeIntervals)
TimeIntervalDisplayConditions
,
one for each string in the batch.timeIntervals
- The TimeIntervalDisplayConditions
for each string in the batch.
There must be one condition for each string passed to the
primitive's Set
method.public final void setDisplays(Iterable<Boolean> displays)
displays
- The display flags for each string in the batch.
There must be one flag for each string passed to the
TextBatchPrimitive
's
Set
method.