Documentation of 'sgtplot.dm.Annotation' Java class
Annotation
sgtplot.dm

Class Annotation

  • All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.util.EventListener, SGTData


    public class Annotation
    extends java.lang.Object
    implements SGTData, java.beans.PropertyChangeListener
    A container to hold Annote objects.
    Since:
    3.0
    • Constructor Detail

      • Annotation

        public Annotation()
      • Annotation

        public Annotation(java.lang.String title)
      • Annotation

        public Annotation(java.lang.String title,
                          boolean xTime,
                          boolean yTime)
    • Method Detail

      • remove

        public boolean remove(java.lang.String id)
      • remove

        public boolean remove(Annote ann)
      • getLineIterator

        public java.util.Iterator getLineIterator()
      • hasLine

        public boolean hasLine()
      • getPointIterator

        public java.util.Iterator getPointIterator()
      • hasPoint

        public boolean hasPoint()
      • getTextIterator

        public java.util.Iterator getTextIterator()
      • hasText

        public boolean hasText()
      • addOval

        public Annote addOval(java.lang.String id,
                              SoTPoint pt1,
                              SoTPoint pt2,
                              LineAttribute attr,
                              java.awt.Color color)
                       throws SGException
        Add an oval to the Annotation. If attr is non-null an oval outline will be drawn, if color is non-null it will be filled.
        Throws:
        SGException
      • getOvalIterator

        public java.util.Iterator getOvalIterator()
      • hasOval

        public boolean hasOval()
      • addRect

        public Annote addRect(java.lang.String id,
                              SoTPoint pt1,
                              SoTPoint pt2,
                              LineAttribute attr,
                              java.awt.Color color)
                       throws SGException
        Add an rectangle to the Annotation. If attr is non-null an rectangle outline will be drawn, if color is non-null it will be filled.
        Throws:
        SGException
      • getRectIterator

        public java.util.Iterator getRectIterator()
      • hasRect

        public boolean hasRect()
      • findAnnote

        public Annote findAnnote(java.lang.String id)
      • setTitle

        public void setTitle(java.lang.String title)
      • getTitle

        public java.lang.String getTitle()
        Description copied from interface: SGTData
        Get the title.
        Specified by:
        getTitle in interface SGTData
      • setId

        public void setId(java.lang.String id)
      • getId

        public java.lang.String getId()
        Description copied from interface: SGTData
        Get the unique identifier. The presence of the identifier is optional, but if it is present it should be unique. This field is used to search for the layer that contains the data.
        Specified by:
        getId in interface SGTData
        Returns:
        unique identifier
        See Also:
        Pane, Layer
      • copy

        public SGTData copy()
        Description copied from interface: SGTData
        Create a shallow copy. User should implement using the clone() method, which requires the Cloneable interface be inherited. If clone() is used, then references to objects are copied NOT the object itself.

        For example,

         public SGTData copy() {
           SGTData newData;
           try {
             newData = (SGTData)clone();
           } catch (CloneNotSupportedException e) {
             newData = null;
           }
           return newData;
         }
         
        Specified by:
        copy in interface SGTData
        Returns:
        shallow copy
        See Also:
        Object
      • isXTime

        public boolean isXTime()
        Description copied from interface: SGTData
        Returns true if the X coordinate is Time.
        Specified by:
        isXTime in interface SGTData
      • isYTime

        public boolean isYTime()
        Description copied from interface: SGTData
        Returns true if the Y coordinate is Time.
        Specified by:
        isYTime in interface SGTData
      • setXMetaData

        public void setXMetaData(SGTMetaData meta)
      • setYMetaData

        public void setYMetaData(SGTMetaData meta)
      • getXRange

        public SoTRange getXRange()
        Description copied from interface: SGTData
        Returns the range of the X coordinates. If all the data in the array is missing, this method will return Double.NaN as the start and end values for data of type double and return GeoDate(Long.MIN_VALUE) for data of type GeoDate.
        Specified by:
        getXRange in interface SGTData
        See Also:
        GeoDate.isMissing()
      • addPropertyChangeListener

        public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
        Description copied from interface: SGTData
        Add a PropertyChangeListener to the listener list.
        Specified by:
        addPropertyChangeListener in interface SGTData
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
        Description copied from interface: SGTData
        Remove a PropertyChangeListener from the listener list.
        Specified by:
        removePropertyChangeListener in interface SGTData
      • propertyChange

        public void propertyChange(java.beans.PropertyChangeEvent evt)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.