org.primordion.xholon.io
Class AbstractChartViewer

java.lang.Object
  extended byorg.primordion.xholon.io.AbstractChartViewer
All Implemented Interfaces:
IChartViewer
Direct Known Subclasses:
ChartViewerGnuplot, ChartViewerJFreeChart

public abstract class AbstractChartViewer
extends java.lang.Object
implements IChartViewer

This is the abstract superclass for concrete classes that capture data and display the data in a chart.

Since:
0.3 (Created on April 24, 2006)
Author:
Ken Webb

Field Summary
 
Fields inherited from interface org.primordion.xholon.io.IChartViewer
WRITE_AS_DOUBLE, WRITE_AS_FLOAT, WRITE_AS_INT, WRITE_AS_LONG, WRITE_AS_NULL, WRITE_AS_SHORT, WRITE_TIME_IN_HEADING
 
Constructor Summary
AbstractChartViewer()
           
 
Method Summary
abstract  void capture(double timeStep)
          Capture data at each timestep.
abstract  void capture(int numTimeSeries, double xVal, double[] yVal)
          Capture specified data at each time interval.
abstract  void chart()
          Produce a chart from the captured data.
abstract  void remove()
          Remove the chart from the screen.
 void setXRange(double min, double max)
          Set the X range of the chart.
 void setYFormat(java.lang.String yFormat)
          Set the format of the y axis of the chart.
 void setYRange(double min, double max)
          Set the Y range of the chart.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.primordion.xholon.io.IChartViewer
chart, createXySeries, initialize
 

Constructor Detail

AbstractChartViewer

public AbstractChartViewer()
Method Detail

capture

public abstract void capture(double timeStep)
Description copied from interface: IChartViewer
Capture data at each timestep.

Specified by:
capture in interface IChartViewer
Parameters:
timeStep - Time step, or other time interval.

capture

public abstract void capture(int numTimeSeries,
                             double xVal,
                             double[] yVal)
Description copied from interface: IChartViewer
Capture specified data at each time interval.

Specified by:
capture in interface IChartViewer
Parameters:
numTimeSeries - Number of time series indices.
xVal - X Value.
yVal - Y Values.

chart

public abstract void chart()
Description copied from interface: IChartViewer
Produce a chart from the captured data.

Specified by:
chart in interface IChartViewer

setXRange

public void setXRange(double min,
                      double max)
Description copied from interface: IChartViewer
Set the X range of the chart.

Specified by:
setXRange in interface IChartViewer
Parameters:
min - Minimum cutoff value to show in the chart.
max - Maximum cutoff value to show in the chart.

setYRange

public void setYRange(double min,
                      double max)
Description copied from interface: IChartViewer
Set the Y range of the chart.

Specified by:
setYRange in interface IChartViewer
Parameters:
min - Minimum cutoff value to show in the chart.
max - Maximum cutoff value to show in the chart.

setYFormat

public void setYFormat(java.lang.String yFormat)
Description copied from interface: IChartViewer
Set the format of the y axis of the chart. This is specific to gnuplot.

Specified by:
setYFormat in interface IChartViewer
Parameters:
yFormat - A format string (ex: "%.4f" or "%.0f")

remove

public abstract void remove()
Description copied from interface: IChartViewer
Remove the chart from the screen.

Specified by:
remove in interface IChartViewer