org.primordion.xholon.io
Class HistogramViewerJFreeChart

java.lang.Object
  extended byorg.primordion.xholon.io.AbstractHistogramViewer
      extended byorg.primordion.xholon.io.HistogramViewerJFreeChart
All Implemented Interfaces:
IHistogramViewer

public class HistogramViewerJFreeChart
extends AbstractHistogramViewer
implements IHistogramViewer

Captures data, and creates a histogram using JFreeChart.

JFreeChart is an open source project that can be freely downloaded from sourceforge.net/projects/jfreechart.

Since:
0.6 (Created on May 3, 2007)
Author:
Ken Webb

Constructor Summary
HistogramViewerJFreeChart()
          default constructor
HistogramViewerJFreeChart(IXholon histRootModel, IXholon histRootView, IXholonClass xhClass, int numBins, int nameConcatLevels)
          constructor
 
Method Summary
 void chart(double[] values)
          Produce a histogram chart.
 void initialize(IXholon histRootModel, IXholon histRootView, IXholonClass xhClass, int numBins, int nameConcatLevels)
          Initialize the histogram viewer.
 void remove()
          Remove the chart from the screen.
 
Methods inherited from class org.primordion.xholon.io.AbstractHistogramViewer
chart, setXRange, setYRange
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.primordion.xholon.io.IHistogramViewer
chart, setXRange, setYRange
 

Constructor Detail

HistogramViewerJFreeChart

public HistogramViewerJFreeChart()
default constructor


HistogramViewerJFreeChart

public HistogramViewerJFreeChart(IXholon histRootModel,
                                 IXholon histRootView,
                                 IXholonClass xhClass,
                                 int numBins,
                                 int nameConcatLevels)
constructor

Parameters:
histRootModel - The root node of a Xholon subtree in the model, that will be traversed looking for instances of the xholon class.
histRootView - Root node in the view. This is the "HistogramViewer" node.
xhClass - A Xholon class whose instances will be queried for values, using getVal().
numBins - Number of bins.
nameConcatLevels - Number of composite levels to concatenate in deriving name.
Method Detail

initialize

public void initialize(IXholon histRootModel,
                       IXholon histRootView,
                       IXholonClass xhClass,
                       int numBins,
                       int nameConcatLevels)
Description copied from interface: IHistogramViewer
Initialize the histogram viewer.

Specified by:
initialize in interface IHistogramViewer
Parameters:
histRootModel - The root node of a Xholon subtree in the model, that will be traversed looking for instances of the xholon class.
histRootView - Root node in the view. This is the "HistogramViewer" node.
xhClass - A Xholon class whose instances will be queried for values, using getVal().
numBins - Number of bins.
nameConcatLevels - Number of composite levels to concatenate in deriving name.

chart

public void chart(double[] values)
Description copied from interface: IHistogramViewer
Produce a histogram chart.

Specified by:
chart in interface IHistogramViewer
Specified by:
chart in class AbstractHistogramViewer

remove

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

Specified by:
remove in interface IHistogramViewer
Specified by:
remove in class AbstractHistogramViewer