dk.klafbang.tincpn.animation.plugin
Class PieChart
java.lang.Object
dk.klafbang.tincpn.gui.sheet.Sheet
dk.klafbang.tincpn.animation.AnimationSheet
dk.klafbang.tincpn.animation.plugin.PieChart
- All Implemented Interfaces:
- dk.klafbang.tincpn.gui.sheet.hook.ScrollWrap
public class PieChart
- extends dk.klafbang.tincpn.animation.AnimationSheet
- implements dk.klafbang.tincpn.gui.sheet.hook.ScrollWrap
Allows you to create a graph where the data values are visualised by filling
parts of a circle.
- Since:
- 1.0
- Author:
- Michael Westergaard
- See Also:
AreaChart
,
GanttChart
,
Histogram
,
PieChart3D
,
StepChart
,
XYChart
Constructor Summary |
PieChart(java.lang.String name,
java.lang.String id)
Constructs an PieChart object. |
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 |
PieChart
public PieChart(java.lang.String name,
java.lang.String id)
- Constructs an PieChart object.
- Parameters:
name
- the name of the chartid
-
getPreferredSize
public java.awt.Dimension getPreferredSize()
- Specified by:
getPreferredSize
in class dk.klafbang.tincpn.gui.sheet.Sheet
- See Also:
Sheet.getPreferredSize()
addSlice
public void addSlice(java.lang.String name,
int value)
- Add a new slice with a given weight.
- Parameters:
name
- the name of the slicevalue
- the weight of the slice
createAnimation
public javax.swing.JComponent createAnimation()
- Specified by:
createAnimation
in class dk.klafbang.tincpn.animation.AnimationSheet
- See Also:
AnimationSheet.createAnimation()