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 classA 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.ObjectLoaderReturns the XML.ObjectLoader for this class.doubleGets the previous shift.doublegetShift()Gets the shift used to shift the values of all elements.doublegetY(int i) double[]Gets a copy of the ypoints array, with shift added if shifted.booleanGets the shifted property.voidsetPoints(double[] yPoints, int len) Sets the y-column points.booleansetShift(double shift) Sets the shift used to shift the values of all elements.voidsetShifted(boolean shift) Sets the shifted property to shift the values of all elements.booleansetShiftedValue(int i, double value) voidsetXColumnVisible(boolean b) Overrides Dataset.setXColumnVisible method.voidsetXYColumnNames(String xName, String yName) Overrides Dataset.setXYColumnNames method.voidsetXYColumnNames(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, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
setXYColumnNamesin classDataset- Parameters:
xName- ignoredyName- the y-column name
-
setXYColumnNames
Overrides Dataset.setXYColumnNames method. The x-column name is always "row".- Overrides:
setXYColumnNamesin 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:
setXColumnVisiblein classDataset- Parameters:
b- ignored
-
getYPoints
public double[] getYPoints()Gets a copy of the ypoints array, with shift added if shifted.- Overrides:
getYPointsin 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:
setShiftedin 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:
setShiftedValuein classDataset
-
getLoader
Returns the XML.ObjectLoader for this class.- Returns:
- the object loader
-