public final class ModelNote extends GenModelNote implements javolution.lang.ValueType
Modified by: Joseph A. Huwaldt
DEFAULT_FONT
RESOURCES
Modifier and Type | Method and Description |
---|---|
ModelNote |
changeFont(java.awt.Font font)
Return a new note object identical to this one, but with the specified font.
|
ModelNote |
changeHeight(Parameter<Length> height)
Return a new note object identical to this one, but with the specified height in
model space.
|
ModelNote |
changeLocation(GeomPoint location)
Return a new note object identical to this one, but with the specified location in
model space.
|
ModelNote |
copy()
Returns a copy of this ModelNote instance
allocated by the calling thread
(possibly on the stack). |
ModelNote |
copyToReal()
Return a copy of this object with any transformations or subranges removed
(applied).
|
boolean |
equals(java.lang.Object obj)
Compares this ModelNote against the specified object for strict equality (same
values and same units).
|
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 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.
|
Unit<Length> |
getUnit()
Returns the unit in which the note height and location are stored.
|
Vector<Dimensionless> |
getXHat()
Return the vector indicating the horizontal axis direction for the text.
|
Vector<Dimensionless> |
getYHat()
Return the vector indicating the vertical axis direction (or ascent direction) for
the text.
|
int |
hashCode()
Returns the hash code for this ModelNote object.
|
ModelNote |
immutable()
Return an immutable version of this note.
|
boolean |
isValid()
Return
true if this ModelNote contains valid and finite numerical
components. |
ModelNote |
to(Unit<Length> unit)
Returns the equivalent to this note but with the location stated in the specified
unit.
|
ModelNote |
toDimension(int newDim)
Return the equivalent of this note converted to the specified number of physical
dimensions.
|
static ModelNote |
valueOf(java.lang.CharSequence text,
GeomPoint location,
Parameter<Length> height)
Construct and return a new instance of a ModelNote that uses the specified text
string, the default display font at the specified size, and is located parallel to
the the XY plane with the xhat in the X-axis direction, yhat in the Y-axis
direction.
|
static ModelNote |
valueOf(java.lang.CharSequence text,
GeomVector<Dimensionless> xhat,
GeomVector<Dimensionless> yhat,
GeomPoint location,
java.awt.Font font,
Parameter<Length> height)
Construct and return a new instance of a ModelNote that uses the specified text
string, the specified display font, is located at the location and orientation in
space specified by the input vectors, and has the specified height in model units.
|
static ModelNote |
valueOf(java.lang.CharSequence text,
GeomVector<Dimensionless> xhat,
GeomVector<Dimensionless> yhat,
GeomPoint location,
Parameter<Length> height)
Construct and return a new instance of a ModelNote that uses the specified text
string, the default display font at the specified size, and is located at the
location and orientation in space specified by the input plane.
|
static ModelNote |
valueOf(java.lang.CharSequence text,
Rotation orientation,
GeomPoint location,
Parameter<Length> height)
Construct and return a new instance of a ModelNote that uses the specified text
string, the default display font at the specified size, and is located at the
specified location with the text plane oriented using the specified orientation
rotation.
|
static ModelNote |
valueOf(ModelNote note)
Returns a new ModelNote instance that is identical to the specified ModelNote.
|
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
addChangeListener, getAllUserData, getID, getName, getParDimension, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName
public static ModelNote valueOf(java.lang.CharSequence text, GeomVector<Dimensionless> xhat, GeomVector<Dimensionless> yhat, GeomPoint location, java.awt.Font font, Parameter<Length> height)
text
- The text to be displayed in this geometry object. May not be null.xhat
- The vector indicating the direction that left-to-right text flows
in space. May not be null.yhat
- The vector, orthogonal to xhat, indicating the vertical direction
(or ascent) of the text. May not be null.location
- The location of this geometry object in model space. May not be null.font
- The font used to display this note. May not be null.height
- The height of the text box in model units. May not be null.public static ModelNote valueOf(java.lang.CharSequence text, GeomVector<Dimensionless> xhat, GeomVector<Dimensionless> yhat, GeomPoint location, Parameter<Length> height)
text
- The text to be displayed in this geometry object. May not be null.xhat
- The vector indicating the direction that left-to-right text flows
in space. May not be null.yhat
- The vector, orthogonal to xhat, indicating the vertical direction
(or ascent) of the text. May not be null.location
- The location of this geometry object in model space. May not be null.height
- The height of the text box in model units. May not be null.public static ModelNote valueOf(java.lang.CharSequence text, GeomPoint location, Parameter<Length> height)
text
- The text to be displayed in this geometry object. May not be null.location
- The location of this geometry object in model space. May not be null.height
- The height of the text box in model units. May not be null.public static ModelNote valueOf(java.lang.CharSequence text, Rotation orientation, GeomPoint location, Parameter<Length> height)
text
- The text to be displayed in this geometry object. May not be
null.orientation
- The orientation of the text relative to X,Y & Z 3D space axes.
May not be null.location
- The location of this geometry object in model space. The
physical dimension must be ≤ 3. If it is less than 3, it will
be increased to 3. If > 3, an exception is thrown. May not be
null.height
- The height of the text box in model units. May not be null.java.lang.IllegalArgumentException
- if the physical dimension of the input location
point is greater than 3.public static ModelNote valueOf(ModelNote note)
note
- the ModelNote to be copied into a new ModelNote. May not be null.public java.lang.String getNote()
getNote
in class AbstractNote<GenModelNote>
public Vector<Dimensionless> getXHat()
getXHat
in class GenModelNote
public Vector<Dimensionless> getYHat()
getYHat
in class GenModelNote
public Point getLocation()
getLocation
in class AbstractNote<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 ModelNote changeFont(java.awt.Font font)
changeFont
in class AbstractNote<GenModelNote>
font
- The font for the new copy of this note. May not be null.public ModelNote changeLocation(GeomPoint location)
changeLocation
in class AbstractNote<GenModelNote>
location
- The location for the new copy of this note. May note be null.public ModelNote changeHeight(Parameter<Length> height)
changeHeight
in class GenModelNote
height
- The height of the new copy of this note. May note be null.public int getPhyDimension()
getPhyDimension
in interface GeomElement<GenModelNote>
public boolean isValid()
true
if this ModelNote contains valid and finite numerical
components. A value of false
will be returned if any of the location
coordinate values are NaN or Inf.isValid
in interface GeomElement<GenModelNote>
public ModelNote copy()
allocated
by the calling thread
(possibly on the stack).copy
in interface GeomElement<GenModelNote>
copy
in interface javolution.lang.ValueType
public ModelNote copyToReal()
copyToReal
in interface GeomElement<GenModelNote>
public final Unit<Length> getUnit()
getUnit
in interface GeomElement<GenModelNote>
public ModelNote 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 ModelNote toDimension(int newDim)
toDimension
in interface GeomElement<GenModelNote>
newDim
- The dimension of the note to return.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>