Package geomss.geom
Class NoteTrans
- java.lang.Object
 - 
- geomss.geom.AbstractGeomElement<T>
 - 
- geomss.geom.AbstractNote<GenScreenNote>
 - 
- geomss.geom.GenScreenNote
 - 
- geomss.geom.NoteTrans
 
 
 
 
 
- 
- All Implemented Interfaces:
 GeomElement<GenScreenNote>,GeomTransform<GenScreenNote>,Transformable<GenScreenNote>,java.io.Serializable,java.lang.Cloneable,java.lang.Comparable,javolution.lang.Reusable,javolution.xml.XMLSerializable
public final class NoteTrans extends GenScreenNote implements GeomTransform<GenScreenNote>
AGeomTransformelement that refers to aGenScreenNoteobject and masquerades as a GenScreenNote object itself.Modified by: Joseph A. Huwaldt
- Version:
 - April 10, 2018
 - Author:
 - Joseph A. Huwaldt, Date: February 6, 2014
 - See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
- 
Fields inherited from class geomss.geom.AbstractNote
DEFAULT_FONT 
- 
Fields inherited from class geomss.geom.AbstractGeomElement
RESOURCES 
 - 
 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NoteTranschangeFont(java.awt.Font font)Return a new note object identical to this one, but with the specified font.NoteTranschangeLocation(GeomPoint location)Return a new note object identical to this one, but with the specified location in model space.NoteTranscopy()Returns a copy of this NoteTrans instanceallocatedby the calling thread (possibly on the stack).NotecopyToReal()Return a copy of the child object transformed by this transformation.booleanequals(java.lang.Object obj)Compares this NoteTrans against the specified object for strict equality (same values and same units).GenScreenNotegetChild()Returns the child object transformed by this transform element.java.awt.FontgetFont()Return the font used to display this note.PointgetLocation()Return the location of this note in model space.java.lang.StringgetNote()Return the text string associated with this note object.intgetPhyDimension()Returns the number of physical dimensions of the geometry element.GTransformgetTotalTransform()Returns the total transformation represented by an entire chain of GeomTransform objects below this one.GTransformgetTransform()Returns the transformation represented by this transformation element.javax.measure.unit.Unit<javax.measure.quantity.Length>getUnit()Returns the unit in which the note location Point is stored.inthashCode()Returns the hash code for this parameter.Noteimmutable()Return an immutable version of this note.booleanisValid()Returntrueif this Note contains valid and finite numerical components.static NoteTransnewInstance(GenScreenNote child, GTransform transform)voidsetTransform(GTransform transform)Sets the transformation represented by this transformation element.NoteTransto(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)Returns the equivalent to this note but with the location stated in the specified unit.NoteTranstoDimension(int newDim)Return the equivalent of this note converted to the specified number of physical dimensions.- 
Methods inherited from class geomss.geom.GenScreenNote
getBoundsMax, getBoundsMin, getLimitPoint, getTransformed, size, toText 
- 
Methods inherited from class geomss.geom.AbstractNote
getParDimension, length 
- 
Methods inherited from class geomss.geom.AbstractGeomElement
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, reset, setName, toString 
- 
Methods inherited from interface geomss.geom.GeomElement
addChangeListener, getAllUserData, getBoundsMax, getBoundsMin, getID, getLimitPoint, getName, getParDimension, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, size, toText 
- 
Methods inherited from interface geomss.geom.Transformable
getTransformed 
 - 
 
 - 
 
- 
- 
Method Detail
- 
newInstance
public static NoteTrans newInstance(GenScreenNote child, GTransform transform)
- Parameters:
 child- The note that is the child of this transform element (may not benull).transform- The transform held by this transform element (may not benull).- Returns:
 - the transform element having the specified values.
 - Throws:
 DimensionException- if the input element is not 3D.
 
- 
getTransform
public GTransform getTransform()
Returns the transformation represented by this transformation element.- Specified by:
 getTransformin interfaceGeomTransform<GenScreenNote>- Returns:
 - The transformation represented by this transformation element.
 
 
- 
getTotalTransform
public GTransform getTotalTransform()
Returns the total transformation represented by an entire chain of GeomTransform objects below this one.- Specified by:
 getTotalTransformin interfaceGeomTransform<GenScreenNote>- Returns:
 - The total transformation represented by an entire chain of GeomTransform objects below this one.
 
 
- 
setTransform
public void setTransform(GTransform transform)
Sets the transformation represented by this transformation element.- Specified by:
 setTransformin interfaceGeomTransform<GenScreenNote>- Parameters:
 transform- The transform to set this transform element to (may not benull).
 
- 
getChild
public GenScreenNote getChild()
Returns the child object transformed by this transform element.- Specified by:
 getChildin interfaceGeomTransform<GenScreenNote>- Returns:
 - The child object transformed by this transform element.
 
 
- 
getNote
public java.lang.String getNote()
Return the text string associated with this note object.- Specified by:
 getNotein classAbstractNote<GenScreenNote>- Returns:
 - The text string associated with this note object.
 
 
- 
getLocation
public Point getLocation()
Return the location of this note in model space.- Specified by:
 getLocationin classAbstractNote<GenScreenNote>- Returns:
 - The location of this note in model space.
 
 
- 
getFont
public java.awt.Font getFont()
Return the font used to display this note.- Specified by:
 getFontin classAbstractNote<GenScreenNote>- Returns:
 - The font used to display this note.
 
 
- 
immutable
public Note immutable()
Return an immutable version of this note.- Specified by:
 immutablein classGenScreenNote- Returns:
 - An immutable version of this note.
 
 
- 
changeFont
public NoteTrans changeFont(java.awt.Font font)
Return a new note object identical to this one, but with the specified font.- Specified by:
 changeFontin classAbstractNote<GenScreenNote>- Parameters:
 font- The font for the copy of this note. May not be null.- Returns:
 - A new note object identical to this one, but with the specified font.
 
 
- 
changeLocation
public NoteTrans changeLocation(GeomPoint location)
Return a new note object identical to this one, but with the specified location in model space.- Specified by:
 changeLocationin classAbstractNote<GenScreenNote>- Parameters:
 location- The location for the copy of this note. May not be null.- Returns:
 - A new note object identical to this one, but with the specified location in model space.
 
 
- 
copyToReal
public Note copyToReal()
Return a copy of the child object transformed by this transformation.- Specified by:
 copyToRealin interfaceGeomElement<GenScreenNote>- Specified by:
 copyToRealin interfaceGeomTransform<GenScreenNote>- Returns:
 - A copy of the child object transformed by this transformation.
 
 
- 
getPhyDimension
public int getPhyDimension()
Returns the number of physical dimensions of the geometry element. This implementation always returns 3.- Specified by:
 getPhyDimensionin interfaceGeomElement<GenScreenNote>- Returns:
 - The number of physical dimensions of this geometry element.
 
 
- 
isValid
public boolean isValid()
Returntrueif this Note contains valid and finite numerical components. A value offalsewill be returned if any of the coordinate values are NaN or Inf.- Specified by:
 isValidin interfaceGeomElement<GenScreenNote>- Returns:
 - true if this geometry element contains valid and finite data.
 
 
- 
copy
public NoteTrans copy()
Returns a copy of this NoteTrans instanceallocatedby the calling thread (possibly on the stack).- Specified by:
 copyin interfaceGeomElement<GenScreenNote>- Returns:
 - an identical and independent copy of this note.
 
 
- 
getUnit
public final javax.measure.unit.Unit<javax.measure.quantity.Length> getUnit()
Returns the unit in which the note location Point is stored.- Specified by:
 getUnitin interfaceGeomElement<GenScreenNote>- Returns:
 - The unit in which the geometry in this element are stated.
 
 
- 
to
public NoteTrans to(javax.measure.unit.Unit<javax.measure.quantity.Length> unit) throws javax.measure.converter.ConversionException
Returns the equivalent to this note but with the location stated in the specified unit.- Specified by:
 toin interfaceGeomElement<GenScreenNote>- Parameters:
 unit- the length unit of the note to be returned. May not be null.- Returns:
 - an equivalent of this note but with location stated in the specified unit.
 - Throws:
 javax.measure.converter.ConversionException- if the the input unit is not a length unit.
 
- 
toDimension
public NoteTrans toDimension(int newDim)
Return the equivalent of this note converted to the specified number of physical dimensions. This implementation will throw an exception if the specified dimension is anything other than 3.- Specified by:
 toDimensionin interfaceGeomElement<GenScreenNote>- Parameters:
 newDim- The dimension of the point to return. MUST equal 3.- Returns:
 - The equivalent of this note converted to the new dimensions.
 - Throws:
 java.lang.IllegalArgumentException- if the new dimension is anything other than 3.
 
- 
equals
public boolean equals(java.lang.Object obj)
Compares this NoteTrans against the specified object for strict equality (same values and same units).- Overrides:
 equalsin classAbstractGeomElement<GenScreenNote>- Parameters:
 obj- the object to compare with.- Returns:
 trueif this note is identical to that note;falseotherwise.
 
- 
hashCode
public int hashCode()
Returns the hash code for this parameter.- Overrides:
 hashCodein classAbstractGeomElement<GenScreenNote>- Returns:
 - the hash code value.
 
 
 - 
 
 -