gov.noaa.pmel.sgt.dm
Class SGTVector

java.lang.Object
  |
  +--gov.noaa.pmel.sgt.dm.SGTVector
All Implemented Interfaces:
java.lang.Cloneable, SGTData

public class SGTVector
extends java.lang.Object
implements SGTData, java.lang.Cloneable

Defines a data object to be a Vector. Interpretation of U and V is determined by the CoordinateSystem. For Cartesian, U and V are the Cartesian vector components. For Polar , U and V are R (radius) and Theta (angle) vector components, respectively.

Since:
1.0
Version:
$Revision: 1.10 $, $Date: 2001/12/13 19:07:05 $
Author:
Donald Denbo
See Also:
SGTData, CoordinateSystem

Constructor Summary
SGTVector()
          Default constructor.
SGTVector(SGTGrid uComp, SGTGrid vComp)
          Construct a SGTVector from two components.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Add a PropertyChangeListener to the listener list.
 SGTData copy()
          Create a copy.
 java.lang.String getId()
          Get the unique identifier.
 SGLabel getKeyTitle()
          Get a title formatted for a Key.
 java.lang.String getTitle()
          Get the vector's title.
 SGTGrid getU()
          Get the U component.
 SGTGrid getV()
          Get the V component.
 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.
 boolean isXTime()
          Returns true if the X coordinate is Time.
 boolean isYTime()
          Returns true if the Y coordinate is Time.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Remove a PropertyChangeListener from the listener list.
 void setComponents(SGTGrid uComp, SGTGrid vComp)
          Set the vector components.
 void setId(java.lang.String ident)
          Set the unique identifier.
 void setKeyTitle(SGLabel title)
          Set the title formatted for the VectorKey.
 void setTitle(java.lang.String title)
          Set the vector's title.
 void setU(SGTGrid uComp)
          Set the U component.
 void setV(SGTGrid vComp)
          Set the V component.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SGTVector

public SGTVector()
Default constructor.

SGTVector

public SGTVector(SGTGrid uComp,
                 SGTGrid vComp)
Construct a SGTVector from two components. The two components must match in both SGTData and CoordinateSystem Interfaces. Both components must be the same shape.
Parameters:
uComp - U component of the vector
vComp - V component of the vector
Method Detail

copy

public SGTData copy()
Create a copy. Creates a shallow copy.
Specified by:
copy in interface SGTData
See Also:
SGTData

getU

public SGTGrid getU()
Get the U component.
Returns:
U component

getV

public SGTGrid getV()
Get the V component.
Returns:
V component

setU

public void setU(SGTGrid uComp)
Set the U component.
Parameters:
uComp - U component

setV

public void setV(SGTGrid vComp)
Set the V component.
Parameters:
vComp - V component

setComponents

public void setComponents(SGTGrid uComp,
                          SGTGrid vComp)
Set the vector components.
Parameters:
uComp - U component
vComp - V component

setTitle

public void setTitle(java.lang.String title)
Set the vector's title.
Parameters:
title -  

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.
Specified by:
getKeyTitle in interface SGTData
Following copied from interface: gov.noaa.pmel.sgt.dm.SGTData
See Also:
SGLabel, ColorKey, LineKey, PointCollectionKey, VectorKey

setKeyTitle

public void setKeyTitle(SGLabel title)
Set the title formatted for the VectorKey.

getId

public java.lang.String getId()
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

setId

public void setId(java.lang.String ident)
Set the unique identifier.

getTitle

public java.lang.String getTitle()
Get the vector's title.
Specified by:
getTitle in interface SGTData
Returns:
the title

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

getXMetaData

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

getYMetaData

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

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
Following copied from interface: gov.noaa.pmel.sgt.dm.SGTData
See Also:
GeoDate.isMissing()

getYRange

public SoTRange getYRange()
Description copied from interface: SGTData
Returns the range of the Y coordinates.
Specified by:
getYRange in interface SGTData
Following copied from interface: gov.noaa.pmel.sgt.dm.SGTData
See Also:
SGTData.getXRange()

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


Send comments about the Scientific Graphics toolkit to dwd@pmel.noaa.gov. For more information about Java Development in the EPIC Group see the EPIC Software Page
Generated on December 13 2001