halo.userinterface.gui.graphhandler
Class HistogramConstructor

java.lang.Object
  extended by halo.userinterface.gui.graphhandler.HistogramConstructor

public class HistogramConstructor
extends java.lang.Object

Provides methods for the construction and handling of histograms.

Author:
Stefanie Kaufmann

Constructor Summary
HistogramConstructor(java.lang.String title, java.lang.String xlabel, java.lang.String ylabel)
          Constructs a new histogram constructor object
 
Method Summary
 void addSeries(java.lang.String title, double[] val, int bins, double start, double stop)
          Adds a complete data series to the graph
 void addValue(double val)
          Adds a new value to the set of values
 void addValues(double[] val)
          Adds all values in an array to the set of values
 void generateGraph()
          Generates a graph from the given series
 void saveGraph(java.io.File output)
          Saves the graph as a JPEG picture
 void savePlotFile(java.io.File output)
          Saves the plotting information of the histogram
 void setColor(java.awt.Color color)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistogramConstructor

public HistogramConstructor(java.lang.String title,
                            java.lang.String xlabel,
                            java.lang.String ylabel)
Constructs a new histogram constructor object

Parameters:
title - The title of the histogram
xlabel - The name of the x-axis
ylabel - The name of the y-axis
Method Detail

addValue

public void addValue(double val)
Adds a new value to the set of values

Parameters:
val - The new entry

addValues

public void addValues(double[] val)
Adds all values in an array to the set of values

Parameters:
val - The array with all new entries

addSeries

public void addSeries(java.lang.String title,
                      double[] val,
                      int bins,
                      double start,
                      double stop)
Adds a complete data series to the graph

Parameters:
title - Name of the series
val - Value entries
bins - Number of bins
start - Lower x-axis limitation
stop - Upper x-axis limitation

savePlotFile

public void savePlotFile(java.io.File output)
Saves the plotting information of the histogram

Parameters:
output - The output destination

saveGraph

public void saveGraph(java.io.File output)
Saves the graph as a JPEG picture

Parameters:
output - The output file where it will be saved

generateGraph

public void generateGraph()
Generates a graph from the given series


setColor

public void setColor(java.awt.Color color)