com.jrefinery.data
Class GanttSeries

java.lang.Object
  |
  +--com.jrefinery.data.Series
        |
        +--com.jrefinery.data.GanttSeries
All Implemented Interfaces:
java.lang.Cloneable

public class GanttSeries
extends Series

A very basic representation of a list of tasks and time allocations.

This class is used as a building block for the GanttSeriesCollection class that implements the IntervalCategoryDataset that, in turn, can be used to construct simple Gantt charts.

This class is incomplete. It implements the bare minimum required to get a simple demo running.

Author:
DG

Constructor Summary
GanttSeries(java.lang.String name)
          Constructs a new series with the specified name.
 
Method Summary
 void add(java.lang.Object task, TimeAllocation allocation)
          Adds a time allocation for a task.
 int getItemCount()
          Returns the number of items in the series.
 java.util.List getTasks()
          Returns the tasks.
 TimeAllocation getTimeAllocation(java.lang.Object task)
          Returns the time allocation for a task.
 
Methods inherited from class com.jrefinery.data.Series
addChangeListener, addPropertyChangeListener, clone, firePropertyChange, fireSeriesChanged, getDescription, getName, notifyListeners, removeChangeListener, removePropertyChangeListener, setDescription, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GanttSeries

public GanttSeries(java.lang.String name)
Constructs a new series with the specified name.
Parameters:
name - the series name.
Method Detail

getTasks

public java.util.List getTasks()
Returns the tasks.
Returns:
the tasks.

getItemCount

public int getItemCount()
Returns the number of items in the series.
Returns:
the item count.

getTimeAllocation

public TimeAllocation getTimeAllocation(java.lang.Object task)
Returns the time allocation for a task.
Parameters:
task - the task.
Returns:
the time allocation for a task.

add

public void add(java.lang.Object task,
                TimeAllocation allocation)
Adds a time allocation for a task.

The task can be represented by an arbitrary Object.

Parameters:
task - the task.
allocation - the time allocation.