Package geomss.geom

Class NoteTrans

    • Method Detail

      • newInstance

        public static NoteTrans newInstance​(GenScreenNote child,
                                            GTransform transform)
        Returns a 3D NoteTrans instance holding the specified GenScreenNote and GTransform.
        Parameters:
        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).
        Returns:
        the transform element having the specified values.
        Throws:
        DimensionException - if the input element is not 3D.
      • getNote

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

        public NoteTrans 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<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:
        changeLocation in class AbstractNote<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.
      • 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<GenScreenNote>
        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<GenScreenNote>
        Returns:
        true if this geometry element contains valid and finite data.
      • copy

        public NoteTrans copy()
        Returns a copy of this NoteTrans instance allocated by the calling thread (possibly on the stack).
        Specified by:
        copy in interface GeomElement<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:
        getUnit in interface GeomElement<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:
        to in interface GeomElement<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:
        toDimension in interface GeomElement<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:
        equals in class AbstractGeomElement<GenScreenNote>
        Parameters:
        obj - the object to compare with.
        Returns:
        true if this note is identical to that note; false otherwise.