sgtplot.dm
Class SimpleGrid
- java.lang.Object
-
- sgtplot.dm.SimpleGrid
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Cartesian, CoordinateSystem, SGTData, SGTGrid
public class SimpleGrid extends java.lang.Object implements SGTGrid, Cartesian, java.lang.Cloneable, java.io.Serializable
SimpleGridprovides an implementation of theSGTGridandCartesianinterfaces.- Since:
- 1.0
- See Also:
SGTGrid,Cartesian, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description SimpleGrid()Default constructor.SimpleGrid(double[] grid, double[] xloc, double[] yloc, java.lang.String title)Constructor for X and Y coordinates as double.SimpleGrid(double[] grid, double[] xloc, GeoDate[] tloc, java.lang.String title)Constructor for X double and Y time.SimpleGrid(double[] grid, GeoDate[] 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 copy of the grid.SGTGridgetAssociatedData()Get the associated data.GeoDateArraygetGeoDateArray()Get theGeoDateArrayobject.GeoDateArraygetGeoDateArrayEdges()Get theGeoDateArrayobject.java.lang.StringgetId()Get the unique identifier.SGLabelgetKeyTitle()Get a title formatted for a Key.GeoDate[]getTimeArray()Get the array of temporal values.GeoDate[]getTimeEdges()Get the Time edges.java.lang.StringgetTitle()Get the title.intgetTSize()Get the length of the Time axisdouble[]getXArray()Get the array of X values.double[]getXEdges()Get the X coordinate edges.SoTRangegetXEdgesRange()Return the range of the x edgesSGTMetaDatagetXMetaData()Returns the X SGTMetaData.SoTRangegetXRange()Returns the range of the X coordinates.intgetXSize()Get the length of the x axisdouble[]getYArray()Get the array of Y values.double[]getYEdges()Get the Y coordinate edges.SoTRangegetYEdgesRange()Return the range of the y edgesSGTMetaDatagetYMetaData()Returns the Y SGTMetaData.SoTRangegetYRange()Returns the range of the Y coordinates.intgetYSize()Get the length of the y axisdouble[]getZArray()Get the array of Z values.SGTMetaDatagetZMetaData()Get the Z SGTMetaData.Range2DgetZRange()Get the range of Z values.booleanhasAssociatedData()Is there associated data available?booleanhasXEdges()Are X edges available?booleanhasYEdges()Are Y edges available?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.voidsetAssociatedData(SGTGrid assoc)Set the associated data grid.voidsetId(java.lang.String ident)Set the unique identifier.voidsetKeyTitle(SGLabel title)Set the title formatted for theVectorKey.voidsetTimeArray(GeoDate[] tloc)set the temporal grid centers
Property Change:dataModified.voidsetTimeArray(GeoDateArray tarray)voidsetTimeEdges(GeoDate[] edge)Set the values for the temporal grid edges.voidsetTimeEdges(GeoDateArray tarray)voidsetTitle(java.lang.String title)Set the grid titlevoidsetXArray(double[] xloc)Set the x coordinate grid centers
Property Change:dataModified.voidsetXEdges(double[] edge)Set the values for the x grid edges.voidsetXMetaData(SGTMetaData md)Set theSGTMetaDataassociated with the x coordinate.voidsetYArray(double[] yloc)Set the y coordinate grid centers
Property Change:dataModified.voidsetYEdges(double[] edge)Set the values for the y grid edges.voidsetYMetaData(SGTMetaData md)Set theSGTMetaDataassociated with the y coordinate.voidsetZArray(double[] grid)Set the z grid values.voidsetZMetaData(SGTMetaData md)Set theSGTMetaDataassociated with the z coordinate.
-
-
-
Constructor Detail
-
SimpleGrid
public SimpleGrid()
Default constructor.
-
SimpleGrid
public SimpleGrid(double[] grid, double[] xloc, double[] yloc, java.lang.String title)Constructor for X and Y coordinates as double.- Parameters:
grid- Z valuesxloc- X coordinatesyloc- Y coordinatestitle- the title
-
SimpleGrid
public SimpleGrid(double[] grid, GeoDate[] tloc, double[] yloc, java.lang.String title)Constructor for X time and Y double.- Parameters:
grid- Z valuestloc- Time coordinatesyloc- Y coordinatestitle- the title
-
SimpleGrid
public SimpleGrid(double[] grid, double[] xloc, GeoDate[] tloc, java.lang.String title)Constructor for X double and Y time.- Parameters:
grid- Z valuesxloc- X coordinatestloc- Time coordinatestitle- the title
-
-
Method Detail
-
copy
public SGTData copy()
Create a copy of the grid.
-
getXArray
public double[] getXArray()
Description copied from interface:SGTGridGet the array of X values.
-
getXSize
public int getXSize()
Get the length of the x axis
-
getYArray
public double[] getYArray()
Description copied from interface:SGTGridGet the array of Y values.
-
getYSize
public int getYSize()
Get the length of the y axis
-
getZArray
public double[] getZArray()
Description copied from interface:SGTGridGet the array of Z values.
-
getTimeArray
public GeoDate[] getTimeArray()
Description copied from interface:SGTGridGet the array of temporal values.- Specified by:
getTimeArrayin interfaceSGTGrid
-
getGeoDateArray
public GeoDateArray getGeoDateArray()
Get theGeoDateArrayobject.- Specified by:
getGeoDateArrayin interfaceSGTGrid- Since:
- 3.0
-
getTSize
public int getTSize()
Get the length of the Time axis
-
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
-
getZMetaData
public SGTMetaData getZMetaData()
Description copied from interface:SGTGridGet the Z SGTMetaData.- Specified by:
getZMetaDatain interfaceSGTGrid
-
getTitle
public java.lang.String getTitle()
Description copied from interface:SGTDataGet the title.
-
setAssociatedData
public void setAssociatedData(SGTGrid assoc)
Set the associated data grid.
Property Change:associatedDataModified.- Since:
- 2.0
-
getAssociatedData
public SGTGrid getAssociatedData()
Description copied from interface:SGTGridGet the associated data. The associated data must be of the same type (SGTGrid) and shape.- Specified by:
getAssociatedDatain interfaceSGTGrid
-
hasAssociatedData
public boolean hasAssociatedData()
Description copied from interface:SGTGridIs there associated data available?- Specified by:
hasAssociatedDatain interfaceSGTGrid
-
hasXEdges
public boolean hasXEdges()
Description copied from interface:SGTGridAre X edges available?
-
getXEdges
public double[] getXEdges()
Description copied from interface:SGTGridGet the X coordinate edges. The XEdge length will be one greater than the XArray length.
-
setXEdges
public void setXEdges(double[] edge)
Set the values for the x grid edges.
-
hasYEdges
public boolean hasYEdges()
Description copied from interface:SGTGridAre Y edges available?
-
getYEdges
public double[] getYEdges()
Description copied from interface:SGTGridGet the Y coordinate edges. The YEdge length will be one greater than the YArray length.
-
setYEdges
public void setYEdges(double[] edge)
Set the values for the y grid edges.
-
getTimeEdges
public GeoDate[] getTimeEdges()
Description copied from interface:SGTGridGet the Time edges. The TimeEdge length will be one greater than the TimeArray length.- Specified by:
getTimeEdgesin interfaceSGTGrid
-
getGeoDateArrayEdges
public GeoDateArray getGeoDateArrayEdges()
Get theGeoDateArrayobject.- Specified by:
getGeoDateArrayEdgesin interfaceSGTGrid- Since:
- 3.0
-
setTimeEdges
public void setTimeEdges(GeoDate[] edge)
Set the values for the temporal grid edges.
-
setTimeEdges
public void setTimeEdges(GeoDateArray tarray)
- Since:
- 3.0
-
setXMetaData
public void setXMetaData(SGTMetaData md)
Set theSGTMetaDataassociated with the x coordinate.
-
setYMetaData
public void setYMetaData(SGTMetaData md)
Set theSGTMetaDataassociated with the y coordinate.
-
setZMetaData
public void setZMetaData(SGTMetaData md)
Set theSGTMetaDataassociated with the z coordinate.
-
setTitle
public void setTitle(java.lang.String title)
Set the grid 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.
-
setXArray
public void setXArray(double[] xloc)
Set the x coordinate grid centers
Property Change:dataModified.
-
setYArray
public void setYArray(double[] yloc)
Set the y coordinate grid centers
Property Change:dataModified.
-
setZArray
public void setZArray(double[] grid)
Set the z grid values.
Property Change:dataModified.
-
setTimeArray
public void setTimeArray(GeoDate[] tloc)
set the temporal grid centers
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()
-
getZRange
public Range2D getZRange()
Description copied from interface:SGTGridGet the range of Z values.
-
getXEdgesRange
public SoTRange getXEdgesRange()
Return the range of the x edges- Specified by:
getXEdgesRangein interfaceSGTGrid- Since:
- 2.0
-
getYEdgesRange
public SoTRange getYEdgesRange()
Return the range of the y edges- Specified by:
getYEdgesRangein interfaceSGTGrid- Since:
- 2.0
-
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