Package geomss.geom

Class AbstractNote<T extends AbstractNote>

  • Type Parameters:
    T - The sub-type of this AbstractNote.
    All Implemented Interfaces:
    GeomElement<T>, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, javolution.lang.Reusable, javolution.xml.XMLSerializable
    Direct Known Subclasses:
    GenModelNote, GenScreenNote

    public abstract class AbstractNote<T extends AbstractNote>
    extends AbstractGeomElement<T>
    Partial implementation of a textual note located at a point in nD space.

    Modified by: Joseph A. Huwaldt

    Version:
    January 30, 2017
    Author:
    Joseph A. Huwaldt, Date: February 5, 2014
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_FONT

        public static final java.awt.Font DEFAULT_FONT
        The default font used for displaying note objects.
    • Method Detail

      • getNote

        public abstract java.lang.String getNote()
        Return the text string associated with this note object.
        Returns:
        The text string associated with this note.
      • getLocation

        public abstract Point getLocation()
        Return the geometric location of this note in space.
        Returns:
        The geometric location of this note in space.
      • getFont

        public abstract java.awt.Font getFont()
        Return the font used to display this note.
        Returns:
        The font used to display this note.
      • changeFont

        public abstract T changeFont​(java.awt.Font font)
        Return a new note object identical to this one, but with the specified font.
        Parameters:
        font - The new font to change this note to display in. May not be null.
        Returns:
        A new note, identical tot his one, but using the specified font.
      • changeLocation

        public abstract T changeLocation​(GeomPoint location)
        Return a new note object identical to this one, but with the specified location in model space.
        Parameters:
        location - The new location of this note. May not be null.
        Returns:
        A new note, identical tot his one, but using the specified location.
      • length

        public int length()
        Return the length of the text string associated with this geometry object.
        Returns:
        The length, in characters, of the text string associated with this note.
      • getParDimension

        public int getParDimension()
        Returns the number of parametric dimensions of the geometry element. This implementation always returns 0 as a GeneralNote is not parametric.
        Returns:
        Always returns 0.
      • toText

        public javolution.text.Text toText()
        Returns the text representation of this geometry element that consists of the text string followed by the coordinate position. For example:
           {aNote = {"A text string.",{10 ft, -3 ft, 4.56 ft}}}
         
        If there is no name, then the output looks like this:
           {"A text string.",{10 ft, -3 ft, 4.56 ft}}
         
        Specified by:
        toText in interface GeomElement<T extends AbstractNote>
        Overrides:
        toText in class AbstractGeomElement<T extends AbstractNote>
        Returns:
        the text representation of this geometry element.