nl.astron.lofar.java.gui.plotter
Interface IPlot

All Known Implementing Classes:
PlotSGTImpl

public interface IPlot

This interface forms the communications contract between the plotter classes and any possible plotter graphics framework using a class that implements this interface.

Version:
$Id$
Author:
pompert

Method Summary
 javax.swing.JComponent createPlot(int type, java.lang.String name, java.util.HashMap data, boolean separateLegend)
          Creates a plot using several key arguments
 java.util.HashMap getData()
          Returns the current dataset used in the plot
 javax.swing.JComponent getLegend(javax.swing.JComponent aPlot)
          Create a legend/key using the plot specified.
 javax.swing.JComponent modifyPlot(javax.swing.JComponent aPlot, java.util.HashMap data)
          Modifies a given plot using a given dataset.
 void setData(java.util.HashMap newData)
          Sets the dataset used in the plot
 

Method Detail

createPlot

javax.swing.JComponent createPlot(int type,
                                  java.lang.String name,
                                  java.util.HashMap data,
                                  boolean separateLegend)
                                  throws PlotterException
Creates a plot using several key arguments

Parameters:
type - Type of plot as dictated by PlotConstants.PLOT_*
name - Name to be given to the plot
data - The dataset to be used to create the plot
separateLegend - Indicates the user's need for a separate legend
Returns:
the JComponent plot generated
Throws:
PlotterException - will be thrown if the plot could not be generated for any reason.

modifyPlot

javax.swing.JComponent modifyPlot(javax.swing.JComponent aPlot,
                                  java.util.HashMap data)
                                  throws PlotterException
Modifies a given plot using a given dataset.

Parameters:
aPlot - A plot JComponent
data - The data to be displayed in the plot.
Returns:
A legend JComponent of plot aPlot
Throws:
PlotterException - will be thrown if the plot could not be generated for any reason.

getData

java.util.HashMap getData()
Returns the current dataset used in the plot

Returns:
the dataset currently in use.

setData

void setData(java.util.HashMap newData)
Sets the dataset used in the plot

Parameters:
newData - A new set of data

getLegend

javax.swing.JComponent getLegend(javax.swing.JComponent aPlot)
                                 throws PlotterException
Create a legend/key using the plot specified.

Parameters:
aPlot - A plot JComponent
Returns:
A legend JComponent of plot aPlot
Throws:
PlotterException - will be thrown if the legend could not be generated for the given JComponent.