dk.klafbang.tincpn.animation.plugin
Class GanttChart

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

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

Allows you to create Gantt chart

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

Constructor Summary
GanttChart(java.lang.String name, java.lang.String id)
          Constructs an GanttChart object.
 
Method Summary
 void addSeries(java.lang.String name)
          Add a new possible thing to do, e.g.
 void addTaskDay(java.lang.String series, java.lang.String category, int y1, int m1, int d1, int y2, int m2, int d2)
          Add a new task with day precision.
 void addTaskMinute(java.lang.String series, java.lang.String category, int h1, int m1, int h2, int m2)
          Add a new task with minute precision but without date information.
 void addTaskMoment(java.lang.String series, java.lang.String category, int y1, int m1, int d1, int h1, int min1, int y2, int m2, int d2, int h2, int min2)
          Add a new task with minute precision and date information.
 javax.swing.JComponent createAnimation()
           
 java.awt.Dimension getPreferredSize()
           
 void reset()
          Reset this chart.
 
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

GanttChart

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

addSeries

public void addSeries(java.lang.String name)
Add a new possible thing to do, e.g. Sleep, Eat, Drink, etc.

Parameters:
name - the new thing to do

addTaskMinute

public void addTaskMinute(java.lang.String series,
                          java.lang.String category,
                          int h1,
                          int m1,
                          int h2,
                          int m2)
Add a new task with minute precision but without date information. The date of all task created like this is 2000/1/1

Parameters:
series - what to do
category - which category to do this task in
h1 - hour start 0..23
m1 - minute start 0..59
h2 - hour end 0..23
m2 - minute end 0..59

addTaskDay

public void addTaskDay(java.lang.String series,
                       java.lang.String category,
                       int y1,
                       int m1,
                       int d1,
                       int y2,
                       int m2,
                       int d2)
Add a new task with day precision. All tasks start and end at 00:00 at the start of the days.

Parameters:
series - what to do
category - which category to do this task in
y1 - year start 1900..9999
m1 - month start 1..12
d1 - day start 1..31
y2 - year end 1900..9999
m2 - month end 1..12
d2 - day end 1..31

addTaskMoment

public void addTaskMoment(java.lang.String series,
                          java.lang.String category,
                          int y1,
                          int m1,
                          int d1,
                          int h1,
                          int min1,
                          int y2,
                          int m2,
                          int d2,
                          int h2,
                          int min2)
Add a new task with minute precision and date information.

Parameters:
series - what to do
category - which category to do this task in
y1 - year start 1900..9999
m1 - month start 1..12
d1 - day start 1..31
h1 - hour start 0..23
min1 - minute start 0..59
y2 - year end 1900..9999
m2 - month end 1..12
d2 - day end 1..31
h2 - hour end 0..23
min2 - minute end 0..59

createAnimation

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

reset

public void reset()
Reset this chart.