com.jrefinery.data
Class GanttSeriesCollection

java.lang.Object
  |
  +--com.jrefinery.data.AbstractDataset
        |
        +--com.jrefinery.data.AbstractSeriesDataset
              |
              +--com.jrefinery.data.GanttSeriesCollection
All Implemented Interfaces:
CategoryDataset, Dataset, IntervalCategoryDataset, SeriesChangeListener, SeriesDataset

public class GanttSeriesCollection
extends AbstractSeriesDataset
implements IntervalCategoryDataset

A collection of GanttSeries objects.

This class provides one implementation of the IntervalCategoryDataset interface. It is sufficient to provide a demonstration of a simple Gantt chart.

Author:
DG

Constructor Summary
GanttSeriesCollection()
          Default constructor.
 
Method Summary
 void add(GanttSeries series)
          Adds a series to the dataset.
 java.util.List getCategories()
          Returns a list of the categories in the dataset.
 int getCategoryCount()
          Returns the number of categories in the dataset.
 java.lang.Number getEndValue(int series, java.lang.Object category)
          Returns the max value for the specified series (zero-based index) and category.
 int getSeriesCount()
          Returns the number of series in the collection.
 java.lang.String getSeriesName(int series)
          Returns the name of a series.
 java.lang.Number getStartValue(int series, java.lang.Object category)
          Returns the min value for the specified series (zero-based index) and category.
 java.lang.Number getValue(int series, java.lang.Object category)
          Returns the value for a series and category.
 
Methods inherited from class com.jrefinery.data.AbstractSeriesDataset
getLegendItemCount, getLegendItemLabels, seriesChanged
 
Methods inherited from class com.jrefinery.data.AbstractDataset
addChangeListener, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jrefinery.data.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
 

Constructor Detail

GanttSeriesCollection

public GanttSeriesCollection()
Default constructor.
Method Detail

getSeriesName

public java.lang.String getSeriesName(int series)
Returns the name of a series.
Specified by:
getSeriesName in interface SeriesDataset
Overrides:
getSeriesName in class AbstractSeriesDataset
Parameters:
series - the series (zero-based index).
Returns:
the name of a series.

getSeriesCount

public int getSeriesCount()
Returns the number of series in the collection.
Specified by:
getSeriesCount in interface SeriesDataset
Overrides:
getSeriesCount in class AbstractSeriesDataset
Returns:
the series count.

getCategoryCount

public int getCategoryCount()
Returns the number of categories in the dataset.
Specified by:
getCategoryCount in interface CategoryDataset
Returns:
The category count.

getCategories

public java.util.List getCategories()
Returns a list of the categories in the dataset.
Specified by:
getCategories in interface CategoryDataset
Returns:
the category list.

add

public void add(GanttSeries series)
Adds a series to the dataset.
Parameters:
series - the series.

getValue

public java.lang.Number getValue(int series,
                                 java.lang.Object category)
Returns the value for a series and category.
Specified by:
getValue in interface CategoryDataset
Parameters:
series - the series (zero-based index).
category - the category.
Returns:
the value for a series and category.

getStartValue

public java.lang.Number getStartValue(int series,
                                      java.lang.Object category)
Returns the min value for the specified series (zero-based index) and category.
Specified by:
getStartValue in interface IntervalCategoryDataset
Parameters:
series - the series index (zero-based).
category - the category.
Returns:
the min value for the specified series and category.

getEndValue

public java.lang.Number getEndValue(int series,
                                    java.lang.Object category)
Returns the max value for the specified series (zero-based index) and category.
Specified by:
getEndValue in interface IntervalCategoryDataset
Parameters:
series - the series index (zero-based).
category - the category.
Returns:
the max value for the specified series and category.