dk.klafbang.tincpn.animation.plugin
Class Histogram

java.lang.Object
  extended by dk.klafbang.tincpn.gui.sheet.Sheet
      extended by dk.klafbang.tincpn.animation.AnimationSheet
          extended by dk.klafbang.tincpn.animation.plugin.Histogram
All Implemented Interfaces:
dk.klafbang.tincpn.gui.sheet.hook.ScrollWrap

public class Histogram
extends dk.klafbang.tincpn.animation.AnimationSheet
implements dk.klafbang.tincpn.gui.sheet.hook.ScrollWrap

Allows you to create a histogram.

Since:
1.0
Author:
Michael Westergaard
See Also:
AreaChart, GanttChart, PieChart, PieChart3D, StepChart, XYChart

Constructor Summary
Histogram(java.lang.String name, java.lang.String id)
          Constructs an Histogram object.
 
Method Summary
 void addValue(java.lang.String series, int x, int y)
          Add a new point to the given series.
 javax.swing.JComponent createAnimation()
           
 java.awt.Dimension getPreferredSize()
           
 
Methods inherited from class dk.klafbang.tincpn.animation.AnimationSheet
canCoexistWith, getComponentImpl
 
Methods inherited from class dk.klafbang.tincpn.gui.sheet.Sheet
addSheetHook, getComponent, getIndexNode, getText, removeComponent, setText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Histogram

public Histogram(java.lang.String name,
                 java.lang.String id)
Constructs an Histogram object.

Parameters:
name - the name of the chart
id -
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
Specified by:
getPreferredSize in class dk.klafbang.tincpn.gui.sheet.Sheet
See Also:
Sheet.getPreferredSize()

addValue

public void addValue(java.lang.String series,
                     int x,
                     int y)
Add a new point to the given series.

Parameters:
series - the series
x - the X-value of the point
y - the Y-value of the point

createAnimation

public javax.swing.JComponent createAnimation()
Specified by:
createAnimation in class dk.klafbang.tincpn.animation.AnimationSheet
See Also:
AnimationSheet.createAnimation()