jhomenet.gui.tab.plotting
Class AbstractPlot

java.lang.Object
  extended by jhomenet.gui.tab.plotting.AbstractPlot
Direct Known Subclasses:
DefaultPlot, TemperaturePlot, WindDirectionPlot

public abstract class AbstractPlot
extends java.lang.Object

The abstract plotting panel.
Id: $Id$

Author:
David Irwin

Field Summary
protected  HomenetHardware hardware
          Reference to the hardware to plot.
protected static Logger logger
          The logger
 
Constructor Summary
AbstractPlot(HomenetHardware hardware)
          Default constructor.
 
Method Summary
 void addOrUpdateDataset(java.util.Date desiredStartTime, java.util.Date desiredEndTime)
          Add to or update the data set.
protected abstract  JFreeChart createChart(XYDataset xydataset)
          Create the actual chart given the XY data set.
 javax.swing.JPanel initializePlot()
          Initialize the plot.
 void resetTimeseries()
          Reset the plot's time series objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static Logger logger
The logger


hardware

protected HomenetHardware hardware
Reference to the hardware to plot.

Constructor Detail

AbstractPlot

public AbstractPlot(HomenetHardware hardware)
Default constructor.

Parameters:
hardware -
Method Detail

initializePlot

public javax.swing.JPanel initializePlot()
Initialize the plot. Call this initially to get the actual plot and then call the addOrUpdateDataset method to add or update the plot.

Returns:
JPanel containing the plot

resetTimeseries

public void resetTimeseries()
Reset the plot's time series objects.


addOrUpdateDataset

public void addOrUpdateDataset(java.util.Date desiredStartTime,
                               java.util.Date desiredEndTime)
                        throws java.lang.Exception
Add to or update the data set.

Parameters:
desiredStartTime -
desiredEndTime -
Throws:
java.lang.Exception

createChart

protected abstract JFreeChart createChart(XYDataset xydataset)
Create the actual chart given the XY data set.

Parameters:
xydataset -
Returns:
A reference to a newly create JFreeChart


Copyright © 2004-2005 David Irwin. All Rights Reserved.