public class HistogramPlotter extends GraphicalObserver implements ExperimentListener, ChartOwner
| Constructor and Description |
|---|
HistogramPlotter(java.lang.String title,
GraphicalObserverContext context,
Histogram data,
java.lang.String xUnit,
int winWidth,
int winHeight)
Creates a new HistogramPlotter
|
HistogramPlotter(java.lang.String title,
GraphicalObserverContext context,
Histogram data,
java.lang.String xUnit,
int winWidth,
int winHeight,
int x,
int y)
Creates a new HistogramPlotter
|
| Modifier and Type | Method and Description |
|---|---|
void |
drawChart(java.awt.Graphics g)
Draws the histogram bars given by the Histogram statistic object into the
chart.
|
void |
experimentPaused(SimRunEvent e)
Called when experiment is paused.
|
void |
experimentRunning(SimRunEvent e)
Called when experiment is (re)started.
|
void |
experimentStopped(SimRunEvent e)
Called when experiment is stopped.
|
java.awt.Component |
getGUI()
Should return the graphical observer's main GUI component
|
deregister, getContext, getName, register, setLocation, setSize, setVisible, updatepublic HistogramPlotter(java.lang.String title,
GraphicalObserverContext context,
Histogram data,
java.lang.String xUnit,
int winWidth,
int winHeight)
name - name displayed in window titlecontext - graphical observer context the plotter is displayed indata - HistogramData consisting of double values to be displayed in
the histogramxUnit - unit label for x axiswinWidth - width of windowwinHeight - height of windowpublic HistogramPlotter(java.lang.String title,
GraphicalObserverContext context,
Histogram data,
java.lang.String xUnit,
int winWidth,
int winHeight,
int x,
int y)
name - name displayed in window titlecontext - graphical observer context the plotter is displayed indata - HistogramData consisting of double values to be displayed in
the histogramxUnit - unit label for x axiswinWidth - width of windowwinHeight - height of windowx - horizontal window locationy - vertical window locationpublic java.awt.Component getGUI()
IGraphicalObservergetGUI in interface IGraphicalObservergetGUI in class GraphicalObserverjfree.org.chart.ChartPanel).GraphicalObserver.getGUI()public void experimentRunning(SimRunEvent e)
experimentRunning in interface ExperimentListenere - a SimRunEventdesmoj.extensions.experimentation.access.ExperimentListener#experimentRunning(SimRunEvent)public void experimentStopped(SimRunEvent e)
experimentStopped in interface ExperimentListenere - a SimRunEventdesmoj.extensions.experimentation.access.ExperimentListener#experimentStopped(SimRunEvent)public void experimentPaused(SimRunEvent e)
experimentPaused in interface ExperimentListenere - a SimRunEventdesmoj.extensions.experimentation.access.ExperimentListener#experimentPaused(SimRunEvent)public void drawChart(java.awt.Graphics g)
drawChart in interface ChartOwnerg - The specified Graphics object.