gov.noaa.pmel.sgt.dm
Class Annote.Text

java.lang.Object
  extended by gov.noaa.pmel.sgt.dm.Annote
      extended by gov.noaa.pmel.sgt.dm.Annote.Text
All Implemented Interfaces:
SGTData, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener
Enclosing class:
Annote

public static class Annote.Text
extends Annote

Class for text annotations.

Since:
3.0
Version:
$Revision$
Author:
Donald Denbo
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.noaa.pmel.sgt.dm.Annote
Annote.Line, Annote.Oval, Annote.Point, Annote.Rect, Annote.Text
 
Field Summary
 
Fields inherited from class gov.noaa.pmel.sgt.dm.Annote
changes_, id_
 
Constructor Summary
Annote.Text(java.lang.String id, SoTPoint location, SGLabel text)
           
 
Method Summary
 SGTData copy()
          Create a shallow copy.
 java.awt.Rectangle getBounds(Graph graph)
           
 SoTDomain getDomain()
           
 java.lang.String getId()
          Get the unique identifier.
 SGLabel getKeyTitle()
          Get a title formatted for a Key.
 SoTPoint getLocation()
           
 SGLabel getText()
           
 java.lang.String getTitle()
          Get the title.
 SGTMetaData getXMetaData()
          Returns the X SGTMetaData.
 SoTRange getXRange()
          Returns the range of the X coordinates.
 SGTMetaData getYMetaData()
          Returns the Y SGTMetaData.
 SoTRange getYRange()
          Returns the range of the Y coordinates.
 void init()
          Init method used to setup serialized object.
 boolean isXTime()
          Returns true if the X coordinate is Time.
 boolean isYTime()
          Returns true if the Y coordinate is Time.
 void moveBy(SoTPoint point)
           
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 
Methods inherited from class gov.noaa.pmel.sgt.dm.Annote
addPropertyChangeListener, computeBounds, getAnnoteId, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Annote.Text

public Annote.Text(java.lang.String id,
                   SoTPoint location,
                   SGLabel text)
Method Detail

init

public void init()
Description copied from class: Annote
Init method used to setup serialized object.

Specified by:
init in class Annote

getLocation

public SoTPoint getLocation()

getText

public SGLabel getText()

getDomain

public SoTDomain getDomain()
Specified by:
getDomain in class Annote

getBounds

public java.awt.Rectangle getBounds(Graph graph)
Specified by:
getBounds in class Annote

moveBy

public void moveBy(SoTPoint point)
Specified by:
moveBy in class Annote

propertyChange

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

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;
 }
 

Returns:
shallow copy
See Also:
Object

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.

Returns:
unique identifier
See Also:
Pane, Layer

getKeyTitle

public SGLabel getKeyTitle()
Description copied from interface: SGTData
Get a title formatted for a Key. JPlotLayout will use this if an explicit Key title is not given in the addData method.

See Also:
SGLabel, ColorKey, LineKey, PointCollectionKey, VectorKey

getTitle

public java.lang.String getTitle()
Description copied from interface: SGTData
Get the title.


getXMetaData

public SGTMetaData getXMetaData()
Description copied from interface: SGTData
Returns the X SGTMetaData.


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.

See Also:
GeoDate.isMissing()

getYMetaData

public SGTMetaData getYMetaData()
Description copied from interface: SGTData
Returns the Y SGTMetaData.


getYRange

public SoTRange getYRange()
Description copied from interface: SGTData
Returns the range of the Y coordinates.

See Also:
SGTData.getXRange()

isXTime

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


isYTime

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