Package org.opensourcephysics.tools
Class DataColumn
java.lang.Object
org.opensourcephysics.display.DataTable.DataModel
org.opensourcephysics.display.Dataset
org.opensourcephysics.tools.DataColumn
- All Implemented Interfaces:
Data
,Drawable
,LogMeasurable
,Measurable
DataColumn is a Dataset that represents a single column in a DataToolTable.
The x-column name is always "row" and the x-points are always row numbers.
Y-values may be shifted from their raw values. All values have the same
shift.
- Version:
- 1.0
- Author:
- Douglas Brown
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A class to save and load DataColumn data in an XMLControl.Nested classes/interfaces inherited from class org.opensourcephysics.display.Dataset
Dataset.Model
-
Field Summary
Fields inherited from class org.opensourcephysics.display.Dataset
AREA, BAR, CIRCLE, columnID, CUSTOM, customMarker, datasetID, errorBars, generalPath, id, index, maxPoints, maxPointsMultiplier, model, NO_MARKER, PIXEL, POST, shift, sorted, SQUARE, update, visible, xColumnDescription, xmax, xmaxLogscale, xmin, xminLogscale, xpoints, yColumnDescription, ymax, ymaxLogscale, ymin, yminLogscale, ypoints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XML.ObjectLoader
Returns the XML.ObjectLoader for this class.double
Gets the previous shift.double
getShift()
Gets the shift used to shift the values of all elements.double
getY
(int i) double[]
Gets a copy of the ypoints array, with shift added if shifted.boolean
Gets the shifted property.void
setPoints
(double[] yPoints, int len) Sets the y-column points.boolean
setShift
(double shift) Sets the shift used to shift the values of all elements.void
setShifted
(boolean shift) Sets the shifted property to shift the values of all elements.boolean
setShiftedValue
(int i, double value) void
setXColumnVisible
(boolean b) Overrides Dataset.setXColumnVisible method.void
setXYColumnNames
(String xName, String yName) Overrides Dataset.setXYColumnNames method.void
setXYColumnNames
(String xName, String yName, String name) Overrides Dataset.setXYColumnNames method.Methods inherited from class org.opensourcephysics.display.Dataset
append, append, append, append, append, clear, convertTableColumnIndex, countColumnsVisible, draw, drawable, drawClip, drawData, drawScatterPlot, findDataSet, getColumnCount, getColumnID, getColumnName, getColumnNames, getData2D, getData3D, getDataList, getDatasets, getEdgeColor, getFillColor, getFillColors, getID, getIndex, getLineColor, getLineColors, getMarkerShape, getMarkerSize, getMean, getName, getNaNCount, getPoints, getRowCount, getTranslateInstance, getValidXPoints, getValidYPoints, getValueAt, getVisible, getX, getXColumnDescription, getXColumnName, getXMax, getXMaxLogscale, getXMin, getXMinLogscale, getXPoints, getXPointsRaw, getYColumnDescription, getYColumnName, getYMax, getYMaxLogscale, getYMin, getYMinLogscale, getYPointsRaw, getYShifted, insertionSort, isConnected, isMeasured, isSorted, isXColumnVisible, isYColumnVisible, loadDatasets, read, recalculatePath, set, setColumnID, setConnected, setCustomMarker, setID, setLineColor, setMarkerColor, setMarkerColor, setMarkerColor, setMarkerShape, setMarkerSize, setMaximumPoints, setName, setSorted, setStride, setVisible, setXColumnDescription, setYColumnDescription, setYColumnVisible, toBoolArray, toString, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensourcephysics.display.Drawable
isInteractive
-
Constructor Details
-
DataColumn
public DataColumn()Constructs a DataColumn.
-
-
Method Details
-
setPoints
public void setPoints(double[] yPoints, int len) Sets the y-column points. The x-column points are always row numbers.- Parameters:
yPoints
- the y-column data points
-
setXYColumnNames
Overrides Dataset.setXYColumnNames method. The x-column name is always "row".- Overrides:
setXYColumnNames
in classDataset
- Parameters:
xName
- ignoredyName
- the y-column name
-
setXYColumnNames
Overrides Dataset.setXYColumnNames method. The x-column name is always "row".- Overrides:
setXYColumnNames
in classDataset
- Parameters:
xName
- ignoredyName
- the y-column namename
- the dataset name
-
setXColumnVisible
public void setXColumnVisible(boolean b) Overrides Dataset.setXColumnVisible method. The x-column is never visible.- Overrides:
setXColumnVisible
in classDataset
- Parameters:
b
- ignored
-
getYPoints
public double[] getYPoints()Gets a copy of the ypoints array, with shift added if shifted.- Overrides:
getYPoints
in classDataset
- Returns:
- the y points (may be shifted)
-
getY
public double getY(int i) -
setShifted
public void setShifted(boolean shift) Sets the shifted property to shift the values of all elements.- Overrides:
setShifted
in classDataset
- Parameters:
shift
- true to shift the values
-
isShifted
public boolean isShifted()Gets the shifted property. -
setShift
public boolean setShift(double shift) Sets the shift used to shift the values of all elements. -
getShift
public double getShift()Gets the shift used to shift the values of all elements. -
getPreviousShift
public double getPreviousShift()Gets the previous shift.- Returns:
- the previous shift
-
setShiftedValue
public boolean setShiftedValue(int i, double value) - Overrides:
setShiftedValue
in classDataset
-
getLoader
Returns the XML.ObjectLoader for this class.- Returns:
- the object loader
-