com.approximatrix.charting.model.threedimensional
Class ColorScaleDotPlotDataModel

java.lang.Object
  extended by com.approximatrix.charting.model.AbstractChartDataModel
      extended by com.approximatrix.charting.model.threedimensional.AbstractDotPlotDataModel
          extended by com.approximatrix.charting.model.threedimensional.ColorDotPlotDataModel
              extended by com.approximatrix.charting.model.threedimensional.ColorScaleDotPlotDataModel
All Implemented Interfaces:
ChartDataModel, IntegratedImageModel

public class ColorScaleDotPlotDataModel
extends ColorDotPlotDataModel

Extension of ColorDotPlotModel that allows the assignment of true numeric Z data to be input along with a ColorScale object to determine how the Z data will be plotted. The actual Z data is maintained in the model. All Z data is stored as double values.

Author:
armstrong

Field Summary
protected  double maxZ
          The largest Z value
protected  double minZ
          The smallest Z value
protected  double[] z
          The array of z data
 
Fields inherited from class com.approximatrix.charting.model.threedimensional.ColorDotPlotDataModel
c, x, y
 
Fields inherited from class com.approximatrix.charting.model.threedimensional.AbstractDotPlotDataModel
constraints, dataImage, maxX, maxY, minX, minY
 
Fields inherited from class com.approximatrix.charting.model.AbstractChartDataModel
autoscale, listener, manualscale, maxcolumn, maxvalue, mincolumn, minvalue
 
Constructor Summary
ColorScaleDotPlotDataModel(double[] x, double[] y, double[] z, ColorScale scale)
          Constructor that accepts data as three double arrays and a valid ColorScale object
ColorScaleDotPlotDataModel(double[] x, double[] y, int[] z, ColorScale scale)
          Constructor that accepts data as two double arrays for x and y coordinates and an array of integers for z data along with valid ColorScale object.
ColorScaleDotPlotDataModel(int[] x, int[] y, double[] z, ColorScale scale)
          Constructor that accepts data as two integer arrays for x and y coordinates and an array of doubles for z data along with valid ColorScale object.
ColorScaleDotPlotDataModel(int[] x, int[] y, int[] z, ColorScale scale)
          Constructor that accepts data as three integer arrays and a valid ColorScale object.
 
Method Summary
protected  void scanRanges()
          Override of the scanRanges() method to allow for scanning the Z axis data as well.
private  double[] toDouble(int[] z)
          Small method to convert integer arrays to double arrays.
 
Methods inherited from class com.approximatrix.charting.model.threedimensional.ColorDotPlotDataModel
buildImage, getColumnValueAt, getColumnValueAt, getDataSetLength, getDataSetNumber, getFirstColumnValue, getLastColumnValue, getOrderedValues, getValueAt, setResolution, setValueAt, setValueAt
 
Methods inherited from class com.approximatrix.charting.model.threedimensional.AbstractDotPlotDataModel
getChartDataModelConstraints, getImage, getModelMaximumX, getModelMaximumY, getModelMinimumX, getModelMinimumY, getViewableImage, getXIndex, getXIndices, getYIndex, getYIndices, initializeImage, isColumnNumeric, scanRanges, setChartDataModelConstraints
 
Methods inherited from class com.approximatrix.charting.model.AbstractChartDataModel
addChartDataModelListener, equals, fireChartDataModelChangedEvent, getAxisBinding, getColumnClass, getDataSetName, getManualMaximumColumnValue, getManualMaximumValue, getManualMaximumX, getManualMaximumY, getManualMinimumColumnValue, getManualMinimumValue, getManualMinimumX, getManualMinimumY, isAutoScale, isManualScale, removeChartDataModelListener, setAutoScale, setAxisBinding, setManualScale, setMaximumColumnValue, setMaximumValue, setMaximumValueX, setMaximumValueY, setMinimumColumnValue, setMinimumValue, setMinimumValueX, setMinimumValueY, setValueAt
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.approximatrix.charting.model.ChartDataModel
addChartDataModelListener, fireChartDataModelChangedEvent, getAxisBinding, getColumnClass, getDataSetName, getManualMaximumColumnValue, getManualMaximumValue, getManualMaximumX, getManualMaximumY, getManualMinimumColumnValue, getManualMinimumValue, getManualMinimumX, getManualMinimumY, isAutoScale, isManualScale, removeChartDataModelListener, setAutoScale, setAxisBinding, setManualScale, setMaximumColumnValue, setMaximumValue, setMaximumValueX, setMaximumValueY, setMinimumColumnValue, setMinimumValue, setMinimumValueX, setMinimumValueY, setValueAt
 

Field Detail

z

protected double[] z
The array of z data


maxZ

protected double maxZ
The largest Z value


minZ

protected double minZ
The smallest Z value

Constructor Detail

ColorScaleDotPlotDataModel

public ColorScaleDotPlotDataModel(double[] x,
                                  double[] y,
                                  double[] z,
                                  ColorScale scale)
Constructor that accepts data as three double arrays and a valid ColorScale object

Parameters:
x - the x-axis data
y - the y-axis data
z - the z-axis data
scale - a ColorScale object to use when drawing the chart

ColorScaleDotPlotDataModel

public ColorScaleDotPlotDataModel(int[] x,
                                  int[] y,
                                  int[] z,
                                  ColorScale scale)
Constructor that accepts data as three integer arrays and a valid ColorScale object. The integer data is converted into double values.

Parameters:
x - the x-axis data
y - the y-axis data
z - the z-axis data
scale - a ColorScale object to use when drawing the chart

ColorScaleDotPlotDataModel

public ColorScaleDotPlotDataModel(int[] x,
                                  int[] y,
                                  double[] z,
                                  ColorScale scale)
Constructor that accepts data as two integer arrays for x and y coordinates and an array of doubles for z data along with valid ColorScale object. The integer data is converted into double values.

Parameters:
x - the x-axis data
y - the y-axis data
z - the z-axis data
scale - a ColorScale object to use when drawing the chart

ColorScaleDotPlotDataModel

public ColorScaleDotPlotDataModel(double[] x,
                                  double[] y,
                                  int[] z,
                                  ColorScale scale)
Constructor that accepts data as two double arrays for x and y coordinates and an array of integers for z data along with valid ColorScale object. The integer data is converted into double values.

Parameters:
x - the x-axis data
y - the y-axis data
z - the z-axis data
scale - a ColorScale object to use when drawing the chart
Method Detail

toDouble

private double[] toDouble(int[] z)
Small method to convert integer arrays to double arrays.

Parameters:
z - the integer data to convert
Returns:
a double array

scanRanges

protected void scanRanges()
Override of the scanRanges() method to allow for scanning the Z axis data as well.