sgtplot.dm
Class SGTVector
- java.lang.Object
-
- sgtplot.dm.SGTVector
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, SGTData
- Direct Known Subclasses:
- SGT3DVector
public class SGTVector extends java.lang.Object implements SGTData, java.lang.Cloneable, java.io.Serializable
Defines a data object to be a Vector. Interpretation of U and V is determined by theCoordinateSystem. ForCartesian, U and V are the Cartesian vector components. ForPolar, U and V are R (radius) and Theta (angle) vector components, respectively.- Since:
- 1.0
- See Also:
SGTData,CoordinateSystem, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description SGTVector()Default constructor.SGTVector(SGTGrid uComp, SGTGrid vComp)Construct a SGTVector from two components.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener l)Add a PropertyChangeListener to the listener list.SGTDatacopy()Create a copy.java.lang.StringgetId()Get the unique identifier.SGLabelgetKeyTitle()Get a title formatted for a Key.java.lang.StringgetTitle()Get the vector's title.SGTGridgetU()Get the U component.SGTGridgetV()Get the V component.SGTMetaDatagetXMetaData()Returns the X SGTMetaData.SoTRangegetXRange()Returns the range of the X coordinates.SGTMetaDatagetYMetaData()Returns the Y SGTMetaData.SoTRangegetYRange()Returns the range of the Y coordinates.booleanisXTime()Returns true if the X coordinate is Time.booleanisYTime()Returns true if the Y coordinate is Time.voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)Remove a PropertyChangeListener from the listener list.voidsetComponents(SGTGrid uComp, SGTGrid vComp)Set the vector components.voidsetId(java.lang.String ident)Set the unique identifier.voidsetKeyTitle(SGLabel title)Set the title formatted for theVectorKey.voidsetTitle(java.lang.String title)Set the vector's title.voidsetU(SGTGrid uComp)Set the U component.voidsetV(SGTGrid vComp)Set the V component.
-
-
-
Method Detail
-
copy
public SGTData copy()
Create a copy. Creates a shallow copy.
-
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 componentvComp- 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:SGTDataGet a title formatted for a Key.JPlotLayoutwill use this if an explicit Key title is not given in theaddDatamethod.- Specified by:
getKeyTitlein interfaceSGTData- See Also:
SGLabel,ColorKey,LineKey,PointCollectionKey,VectorKey
-
setKeyTitle
public void setKeyTitle(SGLabel title)
Set the title formatted for theVectorKey.
-
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.
-
setId
public void setId(java.lang.String ident)
Set the unique identifier.
-
getTitle
public java.lang.String getTitle()
Get the vector's title.
-
isXTime
public boolean isXTime()
Description copied from interface:SGTDataReturns true if the X coordinate is Time.
-
isYTime
public boolean isYTime()
Description copied from interface:SGTDataReturns true if the Y coordinate is Time.
-
getXMetaData
public SGTMetaData getXMetaData()
Description copied from interface:SGTDataReturns the X SGTMetaData.- Specified by:
getXMetaDatain interfaceSGTData
-
getYMetaData
public SGTMetaData getYMetaData()
Description copied from interface:SGTDataReturns the Y SGTMetaData.- Specified by:
getYMetaDatain interfaceSGTData
-
getXRange
public SoTRange getXRange()
Description copied from interface:SGTDataReturns the range of the X coordinates. If all the data in the array is missing, this method will returnDouble.NaNas the start and end values for data of typedoubleand returnGeoDate(Long.MIN_VALUE)for data of typeGeoDate.- Specified by:
getXRangein interfaceSGTData- See Also:
GeoDate.isMissing()
-
getYRange
public SoTRange getYRange()
Description copied from interface:SGTDataReturns the range of the Y coordinates.- Specified by:
getYRangein interfaceSGTData- See Also:
SGTData.getXRange()
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface:SGTDataAdd a PropertyChangeListener to the listener list.- Specified by:
addPropertyChangeListenerin interfaceSGTData
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface:SGTDataRemove a PropertyChangeListener from the listener list.- Specified by:
removePropertyChangeListenerin interfaceSGTData
-
-
DMelt 3.0 © DataMelt by jWork.ORG