sgtplot.dm
Class SimplePoint
- java.lang.Object
-
- sgtplot.dm.SimplePoint
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Cartesian, CoordinateSystem, SGTData, SGTPoint
public class SimplePoint extends java.lang.Object implements SGTPoint, Cartesian, java.lang.Cloneable, java.io.Serializable
SimplePointprovides an implementation of theSGTPointandCartesianinterfaces.- Since:
- 1.0
- See Also:
SGTPoint,Cartesian, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description SimplePoint()Default constructor.SimplePoint(double xloc, double yloc, java.lang.String title)Simple Point constructor.SimplePoint(SoTPoint loc, java.lang.String title)Simple Point constructor.
-
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.longgetLongTime()Get the time inlongreferenced to 1970-01-01GeoDategetTime()Get the time coordinate.java.lang.StringgetTitle()Get the title.doublegetValue()Get the associated value.SGTMetaDatagetValueMetaData()Get the associated value SGTMetaData.doublegetX()Get the X coordinate.SGTMetaDatagetXMetaData()Returns the X SGTMetaData.SoTRangegetXRange()Returns the range of the X coordinates.doublegetY()Get the Y coordinateSGTMetaDatagetYMetaData()Returns the Y SGTMetaData.SoTRangegetYRange()Returns the range of the Y coordinates.booleanhasValue()Is there an associated value?booleanisXTime()Is the X coordinate Time?booleanisYTime()Is the Y coordinate Time?voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)Remove a PropertyChangeListener from the listener list.voidsetId(java.lang.String ident)Set the unique identifier.voidsetKeyTitle(SGLabel title)Set the title formatted for theVectorKey.voidsetTime(GeoDate date)Set the time coordinatevoidsetTime(long t)voidsetTitle(java.lang.String title)Set the title.voidsetValue(double value, java.lang.String name, java.lang.String units)The the associated value and basic metadata.voidsetX(double xloc)Set the X coordinate.voidsetXMetaData(SGTMetaData md)Set theSGTMetaDataassociated with the x coordinatevoidsetY(double yloc)Set the Y coordinate.voidsetYMetaData(SGTMetaData md)Set theSGTMetaDataassociated with the y coordinate
-
-
-
Constructor Detail
-
SimplePoint
public SimplePoint()
Default constructor.
-
SimplePoint
public SimplePoint(double xloc, double yloc, java.lang.String title)Simple Point constructor.- Parameters:
xloc- X coordinateyloc- Y coordinatetitle- the title
-
SimplePoint
public SimplePoint(SoTPoint loc, java.lang.String title)
Simple Point constructor.- Parameters:
loc- SoTPointtitle- the title- Since:
- 3.0
-
-
Method Detail
-
copy
public SGTData copy()
Create a copy.
-
getValue
public double getValue()
Get the associated value.
-
hasValue
public boolean hasValue()
Is there an associated value?
-
getTime
public GeoDate getTime()
Get the time coordinate.
-
getLongTime
public long getLongTime()
Get the time inlongreferenced to 1970-01-01- Specified by:
getLongTimein interfaceSGTPoint- Since:
- 3.0
-
setTime
public void setTime(GeoDate date)
Set the time coordinate- Since:
- 3.0
-
setTime
public void setTime(long t)
- Since:
- 3.0
-
isXTime
public boolean isXTime()
Is the X coordinate Time?
-
isYTime
public boolean isYTime()
Is the Y coordinate Time?
-
getTitle
public java.lang.String getTitle()
Get the title.
-
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.
-
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.
-
getValueMetaData
public SGTMetaData getValueMetaData()
Get the associated value SGTMetaData.- Specified by:
getValueMetaDatain interfaceSGTPoint
-
setX
public void setX(double xloc)
Set the X coordinate.
Property Change:dataModified.
-
setY
public void setY(double yloc)
Set the Y coordinate.
Property Change:dataModified.
-
setValue
public void setValue(double value, java.lang.String name, java.lang.String units)The the associated value and basic metadata.
Property Change:associatedDataModified.- Parameters:
value- associated dataname- values nameunits- values units
-
setXMetaData
public void setXMetaData(SGTMetaData md)
Set theSGTMetaDataassociated with the x coordinate- Since:
- 2.0
-
setYMetaData
public void setYMetaData(SGTMetaData md)
Set theSGTMetaDataassociated with the y coordinate- Since:
- 2.0
-
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