Package geomss.geom

Class ModelNoteTrans

    • Method Detail

      • getTotalTransform

        public GTransform getTotalTransform()
        Returns the total transformation represented by an entire chain of GeomTransform objects below this one.
        Specified by:
        getTotalTransform in interface GeomTransform<GenModelNote>
        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:
        setTransform in interface GeomTransform<GenModelNote>
        Parameters:
        transform - The transform to set this transform element to (may not be null).
      • getNote

        public java.lang.String getNote()
        Return the text string associated with this note object.
        Specified by:
        getNote in class AbstractNote<GenModelNote>
        Returns:
        The text string associated with this note object.
      • getXHat

        public GeomVector<javax.measure.quantity.Dimensionless> getXHat()
        Return the vector indicating the horizontal axis direction for the text.
        Specified by:
        getXHat in class GenModelNote
        Returns:
        The vector indicating the horizontal axis direction for the text.
      • getYHat

        public GeomVector<javax.measure.quantity.Dimensionless> getYHat()
        Return the vector indicating the vertical axis direction (or ascent direction) for the text.
        Specified by:
        getYHat in class GenModelNote
        Returns:
        The vector indicating the vertical axis direction (or ascent direction) for the text.
      • getHeight

        public Parameter<javax.measure.quantity.Length> getHeight()
        Return the height of the text box in model units.
        Specified by:
        getHeight in class GenModelNote
        Returns:
        The height of the text box in model units.
      • getFont

        public java.awt.Font getFont()
        Return the font used to display this note.
        Specified by:
        getFont in class AbstractNote<GenModelNote>
        Returns:
        The font used to display this note.
      • changeFont

        public ModelNoteTrans changeFont​(java.awt.Font font)
        Return a new note object identical to this one, but with the specified font.
        Specified by:
        changeFont in class AbstractNote<GenModelNote>
        Parameters:
        font - The font for the copy of this note to use. May not be null.
        Returns:
        A new note object identical to this one, but with the specified font.
      • changeLocation

        public ModelNoteTrans changeLocation​(GeomPoint location)
        Return a new note object identical to this one, but with the specified location in model space.
        Specified by:
        changeLocation in class AbstractNote<GenModelNote>
        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.
      • changeHeight

        public ModelNoteTrans changeHeight​(Parameter<javax.measure.quantity.Length> height)
        Return a new note object identical to this one, but with the specified height in model space.
        Specified by:
        changeHeight in class GenModelNote
        Parameters:
        height - The height for the copy of this note. May not be null.
        Returns:
        A new note object identical to this one, but with the specified height in model space.
      • getPhyDimension

        public int getPhyDimension()
        Returns the number of physical dimensions of the geometry element. This implementation always returns 3.
        Specified by:
        getPhyDimension in interface GeomElement<GenModelNote>
        Returns:
        The number of physical dimensions of this geometry element.
      • isValid

        public boolean isValid()
        Return 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.
        Specified by:
        isValid in interface GeomElement<GenModelNote>
        Returns:
        true if this geometry element contains valid and finite data.
      • copy

        public ModelNoteTrans copy()
        Returns a copy of this ModelNoteTrans instance allocated by the calling thread (possibly on the stack).
        Specified by:
        copy in interface GeomElement<GenModelNote>
        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:
        getUnit in interface GeomElement<GenModelNote>
        Returns:
        The unit in which the geometry in this element are stated.
      • to

        public ModelNoteTrans 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:
        to in interface GeomElement<GenModelNote>
        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 ModelNoteTrans 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:
        toDimension in interface GeomElement<GenModelNote>
        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 ModelNoteTrans against the specified object for strict equality (same values and same units).
        Overrides:
        equals in class AbstractGeomElement<GenModelNote>
        Parameters:
        obj - the object to compare with.
        Returns:
        true if this note is identical to that note; false otherwise.