Class HistogramGenerator

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class HistogramGenerator extends XYChartGenerator
HistogramGenerator is a ChartGenerator which displays a histogram using the JFreeChart library. The generator uses the HistoramDataset as its dataset, which holds histogram elements consisting of a name, an array of doubles (the samples), and an integer (the number of bins). representing a time series displayed on the chart. You add series to the generator with the addSeries method.

HistogramGenerator creates attributes components in the form of HistogramSeriesAttributes, which work with the generator to properly update the chart to reflect changes the user has made to its display.

See Also:
  • Constructor Details

    • HistogramGenerator

      public HistogramGenerator()
  • Method Details

    • removeSeries

      public void removeSeries(int index)
      Description copied from class: ChartGenerator
      Override this to remove a series from the chart. Be sure to call super(...) first.
      Overrides:
      removeSeries in class ChartGenerator
    • moveSeries

      public void moveSeries(int index, boolean up)
      Description copied from class: ChartGenerator
      Override this to move a series relative to other series. Be sure to call super(...) first.
      Overrides:
      moveSeries in class ChartGenerator
    • buildChart

      protected void buildChart()
      Description copied from class: ChartGenerator
      Override this to construct the appropriate kind of chart. This is the first thing called from the constructor; so certain of your instance variables may not have been set yet and you may need to set them yourself. You'll need to set the dataset.
      Specified by:
      buildChart in class ChartGenerator
    • update

      protected void update()
      Overrides:
      update in class ChartGenerator
    • addSeries

      public SeriesAttributes addSeries(double[] vals, int bins, String name, org.jfree.data.general.SeriesChangeListener stopper)
      Adds a series, plus a (possibly null) SeriesChangeListener which will receive a single event if/when the series is deleted from the chart by the user. Returns the series attributes.
    • updateSeries

      public void updateSeries(int index, double[] vals)
    • setHistogramType

      public void setHistogramType(org.jfree.data.statistics.HistogramType type)
    • getHistogramType

      public org.jfree.data.statistics.HistogramType getHistogramType()