com.approximatrix.charting.model
Class ScatterDataModel

java.lang.Object
  extended by com.approximatrix.charting.model.AbstractChartDataModel
      extended by com.approximatrix.charting.model.DefaultChartDataModel
          extended by com.approximatrix.charting.model.EditableChartDataModel
              extended by com.approximatrix.charting.model.ScatterDataModel
All Implemented Interfaces:
ChartDataModel

public class ScatterDataModel
extends EditableChartDataModel

Implements an EditableChartDataModel that can be used for plotting data that shares the same X-axis points. Each series in the ScatterDataModel also retains the series plot properties, including line style, color, and marker type.

Author:
armstrong

Nested Class Summary
private  class ScatterDataModel.SeriesProperties
          Simple private class that is used to store the drawing properties for a ScatterDataModel series.
 
Field Summary
(package private)  java.util.ArrayList data_properties
          Arraylist containing a SeriesProperties classes, one for each data set
 
Fields inherited from class com.approximatrix.charting.model.DefaultChartDataModel
columnSet, constraints1, constraints2, data, valuesbyaxis
 
Fields inherited from class com.approximatrix.charting.model.AbstractChartDataModel
autoscale, listener, manualscale, maxcolumn, maxvalue, mincolumn, minvalue
 
Constructor Summary
ScatterDataModel(double[][] model, double[] columns, java.lang.String[] rows)
          Creates a new ScatterDataModel with default series properties
 
Method Summary
 boolean getSeriesLine(int set)
          Returns whether the specified line series displays a drawn line
 boolean getSeriesLine(java.lang.String name)
          Returns whether the specified line series displays a its line
 boolean getSeriesMarker(int set)
          Returns whether the specified line series displays a marker
 boolean getSeriesMarker(java.lang.String name)
          Returns whether the specified line series displays a marker
 void setSeriesLine(java.lang.String name, boolean on_or_off)
          Set the series line, specified by name, to be either displayed or hidden
 void setSeriesMarker(java.lang.String name, boolean on_or_off)
          Sets the series marker, specified by name, to be either displayed or hidden
 
Methods inherited from class com.approximatrix.charting.model.EditableChartDataModel
insertValue, removeValueAt, setAxisBinding, setValueAt
 
Methods inherited from class com.approximatrix.charting.model.DefaultChartDataModel
getAxisBinding, getChartDataModelConstraints, getColumnClass, getColumnValueAt, getColumnValueAt, getDataSetLength, getDataSetName, getDataSetNumber, getFirstColumnValue, getLastColumnValue, getOrderedValues, getValueAt, isColumnNumeric, setChartDataModelConstraints, trimSet
 
Methods inherited from class com.approximatrix.charting.model.AbstractChartDataModel
addChartDataModelListener, equals, fireChartDataModelChangedEvent, getManualMaximumColumnValue, getManualMaximumValue, getManualMaximumX, getManualMaximumY, getManualMinimumColumnValue, getManualMinimumValue, getManualMinimumX, getManualMinimumY, isAutoScale, isManualScale, removeChartDataModelListener, setAutoScale, setManualScale, setMaximumColumnValue, setMaximumValue, setMaximumValueX, setMaximumValueY, setMinimumColumnValue, setMinimumValue, setMinimumValueX, setMinimumValueY
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data_properties

java.util.ArrayList data_properties
Arraylist containing a SeriesProperties classes, one for each data set

Constructor Detail

ScatterDataModel

public ScatterDataModel(double[][] model,
                        double[] columns,
                        java.lang.String[] rows)
Creates a new ScatterDataModel with default series properties

Parameters:
model - an array containing one series along each row
columns - x-axis (independent) values corresponding to each column of model
rows - String array containing the name of each series
Method Detail

setSeriesMarker

public void setSeriesMarker(java.lang.String name,
                            boolean on_or_off)
Sets the series marker, specified by name, to be either displayed or hidden

Parameters:
name - line series name
on_or_off - true to show markers, false otherwise

setSeriesLine

public void setSeriesLine(java.lang.String name,
                          boolean on_or_off)
Set the series line, specified by name, to be either displayed or hidden

Parameters:
name - line series name
on_or_off - true to display the line, false otherwise

getSeriesMarker

public boolean getSeriesMarker(int set)
Returns whether the specified line series displays a marker

Parameters:
set - an integer specifying which series to inquire about
Returns:
true if marker is visible, false otherwise

getSeriesLine

public boolean getSeriesLine(int set)
Returns whether the specified line series displays a drawn line

Parameters:
set - an integer specifying which series to inquire about
Returns:
true if line is visible, false otherwise

getSeriesMarker

public boolean getSeriesMarker(java.lang.String name)
Returns whether the specified line series displays a marker

Parameters:
name - the name of the series to inquire about
Returns:
true if marker is visible, false otherwise

getSeriesLine

public boolean getSeriesLine(java.lang.String name)
Returns whether the specified line series displays a its line

Parameters:
name - the name of the series to inquire about
Returns:
true if line is visible, false otherwise