dk.klafbang.tincpn.animation.plugin
Class XYChart

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.XYChart
All Implemented Interfaces:
dk.klafbang.tincpn.gui.sheet.hook.ScrollWrap

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

A chart where data values are visualised as points.

You can spoecify both the x and y values, and the order is not important.

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

Constructor Summary
XYChart(java.lang.String name, java.lang.String id)
          Constructs an XYChart 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

XYChart

public XYChart(java.lang.String name,
               java.lang.String id)
Constructs an XYChart 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()