Package hec.gfx2d
Class SimpleJTableData
java.lang.Object
java.util.Observable
hec.gfx2d.G2dData
hec.gfx2d.SimpleJTableData
- All Implemented Interfaces:
G2dObject,Serializable
Simple data object for holding a table structure for ploting.
- See Also:
-
Field Summary
FieldsFields inherited from interface hec.gfx2d.G2dObject
RESET_DATA, UPDATE_DATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddToPairedDataContainer(PairedDataContainer pairedDataContainer) voidaddToPairedDataContainerReveresed(boolean rev) voidclears the data, in effect, erases the plotReturns the extents of the object in world coordinatesintReturns the number of curves that this object contains.getCurveName(int curveIdx) Returns the point in local coordinates of the closest data point to the given ptintReturns the name of the x axisintReturns the type of the x axisReturns the name of the y axisintReturns the type of the y axisvoidload()Causes the object to load its data into memoryprotected doubleparseValue(Object dataObj, int axisType) get double value for table cell objectvoidsetCurveNames(String[] names) voidSets the data for this plot data model from a table.voidsets the data Vector and notifies observersvoidsetMultipleColumnData(RmaJTable tbl, int[] xCol, int[] yCol) Sets the data from a table so that you can have a single y-data point with multiple x-data points or visa-versa.voidsetStartRow(int row) voidsetXAxisType(int xAxis) set the x axis typevoidsetXDataElement(int xPos, double data) voidsetYAxisType(int yAxis) set the y axis typevoidsetYDataElement(int yPos, double data) protected StringstripUnitsFromLabel(String labelString) strip units from string to use in plot legendvoidunload()Causes the object to unload its data from memoryMethods inherited from class hec.gfx2d.G2dData
addObserver, canSwapXYValues, getDefaultMaxYValue, getDefaultMinYValue, getGmtOffset, getLineStyleName, getLookup, getName, getUnitSystem, getXParameterId, getXValues, getYParameterId, getYValues, hasDefaultMaxYValue, hasDefaultMinYValue, setDefaultMaxYValue, setDefaultMinYValue, setGmtOffset, setName, setSwapXYValues, setUnitSystem, setUseDisplayUnits, setXParameterId, setYParameterId, swapXYValues, toString, useDisplayUnitsMethods inherited from class java.util.Observable
clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.gfx2d.G2dObject
canSwapXYValues, getDataZoneId, getDefaultMaxYValue, getDefaultMinYValue, getGmtOffset, getLineStyleName, getLookup, getName, getUnitSystem, getXParameterId, getXValues, getYParameterId, getYValues, hasDefaultMaxYValue, hasDefaultMinYValue, setDefaultMaxYValue, setDefaultMinYValue, setSwapXYValues, swapXYValues
-
Field Details
-
xdata
public double[][] xdata -
ydata
public double[][] ydata -
_startRow
public int _startRow
-
-
Constructor Details
-
SimpleJTableData
public SimpleJTableData()
-
-
Method Details
-
getXAxisName
Returns the name of the x axis- Specified by:
getXAxisNamein interfaceG2dObject
-
getYAxisName
Returns the name of the y axis- Specified by:
getYAxisNamein interfaceG2dObject
-
setXAxisType
public void setXAxisType(int xAxis) set the x axis type -
getXAxisType
public int getXAxisType()Returns the type of the x axis- Specified by:
getXAxisTypein interfaceG2dObject
-
setYAxisType
public void setYAxisType(int yAxis) set the y axis type -
getYAxisType
public int getYAxisType()Returns the type of the y axis- Specified by:
getYAxisTypein interfaceG2dObject
-
getCurveCount
public int getCurveCount()Description copied from class:G2dDataReturns the number of curves that this object contains.- Specified by:
getCurveCountin interfaceG2dObject- Overrides:
getCurveCountin classG2dData
-
getCurveName
-
clearData
public void clearData()clears the data, in effect, erases the plot -
setMultipleColumnData
Sets the data from a table so that you can have a single y-data point with multiple x-data points or visa-versa.- Parameters:
tbl-xCol-yCol-
-
setData
Sets the data for this plot data model from a table. This sets the data as 1 X data point and 1 Y data point- Parameters:
tbl- the table to ge the data fromxCol- an array of columns that together provide the xdatayCol- ad array of columns that together provide the ydata.
-
setData
sets the data Vector and notifies observers -
getDataResetType
-
stripUnitsFromLabel
strip units from string to use in plot legend -
parseValue
get double value for table cell object -
setXDataElement
public void setXDataElement(int xPos, double data) -
setYDataElement
public void setYDataElement(int yPos, double data) -
setStartRow
public void setStartRow(int row) -
getStartRow
public int getStartRow() -
load
public void load()Causes the object to load its data into memory -
unload
public void unload()Causes the object to unload its data from memory -
getBounds
Returns the extents of the object in world coordinates -
setCurveNames
-
getPairedDataContainer
-
addToPairedDataContainerReveresed
public void addToPairedDataContainerReveresed(boolean rev) -
addToPairedDataContainer
-
getNearestDataPt
Returns the point in local coordinates of the closest data point to the given pt
-