sgtplot.dm
Class SimpleLine
- java.lang.Object
-
- sgtplot.dm.SimpleLine
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Cartesian, CoordinateSystem, SGTData, SGTLine
public class SimpleLine extends java.lang.Object implements SGTLine, Cartesian, java.io.Serializable, java.lang.Cloneable
SimpleLineprovides an implementation of theSGTLineandCartesianinterfaces.- Since:
- 1.0
- See Also:
SGTLine,Cartesian, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description SimpleLine()Default constuctor.SimpleLine(double[] xloc, double[] yloc, java.lang.String title)Constructor for X and Y double.SimpleLine(double[] xloc, GeoDate[] tloc, java.lang.String title)Constructor for X double and Y Time.SimpleLine(double[] xloc, GeoDateArray tloc, java.lang.String title)Constructor for X double and Y Time.SimpleLine(GeoDate[] tloc, double[] yloc, java.lang.String title)Constructor for X Time and Y double.SimpleLine(GeoDateArray tloc, double[] yloc, java.lang.String title)Constructor for X Time and Y double.
-
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 shallow copy.SGTLinegetAssociatedData()Get the associated data.GeoDateArraygetGeoDateArray()Get theGeoDateArrayobject.java.lang.StringgetId()Get the unique identifier.SGLabelgetKeyTitle()Get a title formatted for a Key.GeoDate[]getTimeArray()Get the Time coordinate array.java.lang.StringgetTitle()Get the Title.double[]getXArray()Get the X coordinate array.SGTMetaDatagetXMetaData()Get the X coordinate metadata.SoTRangegetXRange()Returns the range of the X coordinates.double[]getYArray()Get the Y coordinate array.SGTMetaDatagetYMetaData()Get the Y coordinate metadataSoTRangegetYRange()Returns the range of the Y coordinates.booleanhasAssociatedData()Is there associated data?booleanisXTime()Is the X coordinate Time?booleanisYTime()Is the Y coordinate Time?voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)Remove a PropertyChangeListener from the listener list.voidsetAssociatedData(SGTLine assoc)Set the data that will be associated withSGTLine
Property Change:associatedDataModified.voidsetId(java.lang.String ident)Set the unique identifier.voidsetKeyTitle(SGLabel title)Set the title formatted for theVectorKey.voidsetTimeArray(GeoDate[] tloc)Set the Time coordinate array
Property Change:dataModified.voidsetTimeArray(GeoDateArray tarray)voidsetTitle(java.lang.String title)Set the title.voidsetXArray(double[] xloc)Set the X coordinate array.voidsetXMetaData(SGTMetaData md)Set the X coordinate metadata.voidsetYArray(double[] yloc)Set the Y coordinate array
Property Change:dataModified.voidsetYMetaData(SGTMetaData md)Set the Y coordinate metadata.
-
-
-
Constructor Detail
-
SimpleLine
public SimpleLine()
Default constuctor.
-
SimpleLine
public SimpleLine(double[] xloc, double[] yloc, java.lang.String title)Constructor for X and Y double.- Parameters:
xloc- X coordinatesyloc- Y coordinatestitle- the Title
-
SimpleLine
public SimpleLine(GeoDate[] tloc, double[] yloc, java.lang.String title)
Constructor for X Time and Y double.- Parameters:
tloc- Time coordinatesyloc- Y coordinatestitle- the Title
-
SimpleLine
public SimpleLine(GeoDateArray tloc, double[] yloc, java.lang.String title)
Constructor for X Time and Y double.- Parameters:
tloc- Time coordinatesyloc- Y coordinatestitle- the Title- Since:
- 3.0
-
SimpleLine
public SimpleLine(double[] xloc, GeoDateArray tloc, java.lang.String title)Constructor for X double and Y Time.- Parameters:
xloc- X coordinatestloc- Time coordinatestitle- the Title- Since:
- 3.0
-
SimpleLine
public SimpleLine(double[] xloc, GeoDate[] tloc, java.lang.String title)Constructor for X double and Y Time.- Parameters:
xloc- X coordinatestloc- Time coordinatestitle- the Title
-
-
Method Detail
-
copy
public SGTData copy()
Create a shallow copy.
-
getXArray
public double[] getXArray()
Get the X coordinate array.
-
getYArray
public double[] getYArray()
Get the Y coordinate array.
-
getTimeArray
public GeoDate[] getTimeArray()
Get the Time coordinate array.- Specified by:
getTimeArrayin interfaceSGTLine
-
getGeoDateArray
public GeoDateArray getGeoDateArray()
Get theGeoDateArrayobject.- Specified by:
getGeoDateArrayin interfaceSGTLine- Since:
- 3.0
-
isXTime
public boolean isXTime()
Is the X coordinate Time?
-
isYTime
public boolean isYTime()
Is the Y coordinate Time?
-
getXMetaData
public SGTMetaData getXMetaData()
Get the X coordinate metadata.- Specified by:
getXMetaDatain interfaceSGTData
-
getYMetaData
public SGTMetaData getYMetaData()
Get the Y coordinate metadata- Specified by:
getYMetaDatain interfaceSGTData
-
getTitle
public java.lang.String getTitle()
Get the Title.
-
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.
-
setAssociatedData
public void setAssociatedData(SGTLine assoc)
Set the data that will be associated withSGTLine
Property Change:associatedDataModified.- Since:
- 2.0
-
getAssociatedData
public SGTLine getAssociatedData()
Get the associated data.- Specified by:
getAssociatedDatain interfaceSGTLine
-
hasAssociatedData
public boolean hasAssociatedData()
Is there associated data?- Specified by:
hasAssociatedDatain interfaceSGTLine
-
setXMetaData
public void setXMetaData(SGTMetaData md)
Set the X coordinate metadata.
-
setYMetaData
public void setYMetaData(SGTMetaData md)
Set the Y coordinate metadata.
-
setTitle
public void setTitle(java.lang.String title)
Set the 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.
-
setXArray
public void setXArray(double[] xloc)
Set the X coordinate array.
Property Change:dataModified.
-
setYArray
public void setYArray(double[] yloc)
Set the Y coordinate array
Property Change:dataModified.
-
setTimeArray
public void setTimeArray(GeoDate[] tloc)
Set the Time coordinate array
Property Change:dataModified.
-
setTimeArray
public void setTimeArray(GeoDateArray tarray)
- Since:
- 3.0
-
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