public final class ModelNoteTrans extends GenModelNote implements GeomTransform<GenModelNote>
GeomTransform
element that refers to a GenModelNote
object and
masquerades as a GenModelNote object itself.
Modified by: Joseph A. Huwaldt
DEFAULT_FONT
RESOURCES
Modifier and Type | Method and Description |
---|---|
ModelNoteTrans |
changeFont(java.awt.Font font)
Return a new note object identical to this one, but with the specified font.
|
ModelNoteTrans |
changeHeight(Parameter<Length> height)
Return a new note object identical to this one, but with the specified height in
model space.
|
ModelNoteTrans |
changeLocation(GeomPoint location)
Return a new note object identical to this one, but with the specified location in
model space.
|
ModelNoteTrans |
copy()
Returns a copy of this ModelNoteTrans instance
allocated by the calling thread
(possibly on the stack). |
ModelNote |
copyToReal()
Return a copy of the child object transformed by this transformation.
|
boolean |
equals(java.lang.Object obj)
Compares this ModelNoteTrans against the specified object for strict equality (same
values and same units).
|
GenModelNote |
getChild()
Returns the child object transformed by this transform element.
|
java.awt.Font |
getFont()
Return the font used to display this note.
|
Parameter<Length> |
getHeight()
Return the height of the text box in model units.
|
Point |
getLocation()
Return the location of this note in model space.
|
java.lang.String |
getNote()
Return the text string associated with this note object.
|
int |
getPhyDimension()
Returns the number of physical dimensions of the geometry element.
|
GTransform |
getTotalTransform()
Returns the total transformation represented by an entire chain of GeomTransform
objects below this one.
|
GTransform |
getTransform()
Returns the transformation represented by this transformation element.
|
Unit<Length> |
getUnit()
Returns the unit in which the note location Point is stored.
|
GeomVector<Dimensionless> |
getXHat()
Return the vector indicating the horizontal axis direction for the text.
|
GeomVector<Dimensionless> |
getYHat()
Return the vector indicating the vertical axis direction (or ascent direction) for
the text.
|
int |
hashCode()
Returns the hash code for this parameter.
|
ModelNote |
immutable()
Return an immutable version of this note.
|
boolean |
isValid()
Return
true if this Note contains valid and finite numerical
components. |
static ModelNoteTrans |
newInstance(GenModelNote child,
GTransform transform)
|
void |
setTransform(GTransform transform)
Sets the transformation represented by this transformation element.
|
ModelNoteTrans |
to(Unit<Length> unit)
Returns the equivalent to this note but with the location stated in the specified
unit.
|
ModelNoteTrans |
toDimension(int newDim)
Return the equivalent of this note converted to the specified number of physical
dimensions.
|
getBoundsMax, getBoundsMin, getLimitPoint, getNormal, getOrientation, getTransformed, getWidth, size, toText
getParDimension, length
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, reset, setName, toString
getTransformed
addChangeListener, getAllUserData, getBoundsMax, getBoundsMin, getID, getLimitPoint, getName, getParDimension, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, size, toText
public static ModelNoteTrans newInstance(GenModelNote child, GTransform transform)
child
- The note that is the child of this transform element (may not be
null
).transform
- The transform held by this transform element (may not be
null
).DimensionException
- if the input element is not 3D.public GTransform getTransform()
getTransform
in interface GeomTransform<GenModelNote>
public GTransform getTotalTransform()
getTotalTransform
in interface GeomTransform<GenModelNote>
public void setTransform(GTransform transform)
setTransform
in interface GeomTransform<GenModelNote>
transform
- The transform to set this transform element to (may not be
null
).public GenModelNote getChild()
getChild
in interface GeomTransform<GenModelNote>
public java.lang.String getNote()
getNote
in class AbstractNote<GenModelNote>
public Point getLocation()
getLocation
in class AbstractNote<GenModelNote>
public GeomVector<Dimensionless> getXHat()
getXHat
in class GenModelNote
public GeomVector<Dimensionless> getYHat()
getYHat
in class GenModelNote
public Parameter<Length> getHeight()
getHeight
in class GenModelNote
public java.awt.Font getFont()
getFont
in class AbstractNote<GenModelNote>
public ModelNote immutable()
immutable
in class GenModelNote
public ModelNoteTrans changeFont(java.awt.Font font)
changeFont
in class AbstractNote<GenModelNote>
font
- The font for the copy of this note to use. May not be null.public ModelNoteTrans changeLocation(GeomPoint location)
changeLocation
in class AbstractNote<GenModelNote>
location
- The location for the copy of this note. May not be null.public ModelNoteTrans changeHeight(Parameter<Length> height)
changeHeight
in class GenModelNote
height
- The height for the copy of this note. May not be null.public ModelNote copyToReal()
copyToReal
in interface GeomElement<GenModelNote>
copyToReal
in interface GeomTransform<GenModelNote>
public int getPhyDimension()
getPhyDimension
in interface GeomElement<GenModelNote>
public boolean isValid()
true
if this Note contains valid and finite numerical
components. A value of false
will be returned if any of the coordinate
values are NaN or Inf.isValid
in interface GeomElement<GenModelNote>
public ModelNoteTrans copy()
allocated
by the calling thread
(possibly on the stack).copy
in interface GeomElement<GenModelNote>
public final Unit<Length> getUnit()
getUnit
in interface GeomElement<GenModelNote>
public ModelNoteTrans to(Unit<Length> unit) throws ConversionException
to
in interface GeomElement<GenModelNote>
unit
- the length unit of the note to be returned. May not be null.ConversionException
- if the the input unit is not a length unit.public ModelNoteTrans toDimension(int newDim)
toDimension
in interface GeomElement<GenModelNote>
newDim
- The dimension of the point to return. MUST equal 3.java.lang.IllegalArgumentException
- if the new dimension is anything other than 3.public boolean equals(java.lang.Object obj)
equals
in class AbstractGeomElement<GenModelNote>
obj
- the object to compare with.true
if this note is identical to that note;
false
otherwise.public int hashCode()
hashCode
in class AbstractGeomElement<GenModelNote>