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
 
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

generateGraph

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