Class DataColumn

All Implemented Interfaces:
Data, Drawable, LogMeasurable, Measurable

public class DataColumn extends Dataset
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
  • 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

      public void setXYColumnNames(String xName, String yName)
      Overrides Dataset.setXYColumnNames method. The x-column name is always "row".
      Overrides:
      setXYColumnNames in class Dataset
      Parameters:
      xName - ignored
      yName - the y-column name
    • setXYColumnNames

      public void setXYColumnNames(String xName, String yName, String name)
      Overrides Dataset.setXYColumnNames method. The x-column name is always "row".
      Overrides:
      setXYColumnNames in class Dataset
      Parameters:
      xName - ignored
      yName - the y-column name
      name - the dataset name
    • setXColumnVisible

      public void setXColumnVisible(boolean b)
      Overrides Dataset.setXColumnVisible method. The x-column is never visible.
      Overrides:
      setXColumnVisible in class Dataset
      Parameters:
      b - ignored
    • getYPoints

      public double[] getYPoints()
      Gets a copy of the ypoints array, with shift added if shifted.
      Overrides:
      getYPoints in class Dataset
      Returns:
      the y points (may be shifted)
    • getY

      public double getY(int i)
      Overrides:
      getY in class Dataset
    • setShifted

      public void setShifted(boolean shift)
      Sets the shifted property to shift the values of all elements.
      Overrides:
      setShifted in class Dataset
      Parameters:
      shift - true to shift the values
    • isShifted

      public boolean isShifted()
      Gets the shifted property.
      Overrides:
      isShifted in class Dataset
      Returns:
      true if values are shifted
    • setShift

      public boolean setShift(double shift)
      Sets the shift used to shift the values of all elements.
      Overrides:
      setShift in class Dataset
      Parameters:
      shift - the shift
      Returns:
      true if shift was changed
    • getShift

      public double getShift()
      Gets the shift used to shift the values of all elements.
      Overrides:
      getShift in class Dataset
      Returns:
      the shift
    • getPreviousShift

      public double getPreviousShift()
      Gets the previous shift.
      Returns:
      the previous shift
    • setShiftedValue

      public boolean setShiftedValue(int i, double value)
      Overrides:
      setShiftedValue in class Dataset
    • getLoader

      public static XML.ObjectLoader getLoader()
      Returns the XML.ObjectLoader for this class.
      Returns:
      the object loader