Package org.jfree.data.gantt
Class TaskSeriesCollection
java.lang.Object
org.jfree.data.AbstractDataset
org.jfree.data.AbstractSeriesDataset
org.jfree.data.gantt.TaskSeriesCollection
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,EventListener,CategoryDataset,Dataset,GanttCategoryDataset,IntervalCategoryDataset,KeyedValues2D,SeriesChangeListener,SeriesDataset,Values2D
public class TaskSeriesCollection extends AbstractSeriesDataset implements GanttCategoryDataset
A collection of
TaskSeries objects.
This class provides one implementation of the GanttCategoryDataset
interface.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description TaskSeriesCollection()Default constructor. -
Method Summary
Modifier and Type Method Description voidadd(TaskSeries series)Adds a series to the dataset.intgetColumnCount()Returns the number of column in the dataset.intgetColumnIndex(Comparable columnKey)Returns the column index for a column key.ComparablegetColumnKey(int item)Returns a column key.ListgetColumnKeys()Returns a list of the column keys in the dataset.NumbergetEndValue(int row, int column)Returns the end value for a task.NumbergetEndValue(int row, int column, int subinterval)Returns the end value of a sub-interval for a given item.NumbergetEndValue(Comparable rowKey, Comparable columnKey)Returns the end value for a task.NumbergetEndValue(Comparable rowKey, Comparable columnKey, int subinterval)Returns the end value of a sub-interval for a given item.NumbergetPercentComplete(int row, int column)Returns the percent complete for a given item.NumbergetPercentComplete(int row, int column, int subinterval)Returns the percentage complete value of a sub-interval for a given item.NumbergetPercentComplete(Comparable rowKey, Comparable columnKey)Returns the percent complete for a given item.NumbergetPercentComplete(Comparable rowKey, Comparable columnKey, int subinterval)Returns the percentage complete value of a sub-interval for a given item.intgetRowCount()Returns the number of rows (series) in the collection.intgetRowIndex(Comparable rowKey)Returns the row index for the given row key.ComparablegetRowKey(int index)Returns the key for a row.ListgetRowKeys()Returns the row keys.intgetSeriesCount()Returns the number of series in the collection.StringgetSeriesName(int series)Returns the name of a series.NumbergetStartValue(int row, int column)Returns the start value for a task.NumbergetStartValue(int row, int column, int subinterval)Returns the start value of a sub-interval for a given item.NumbergetStartValue(Comparable rowKey, Comparable columnKey)Returns the start value for a task.NumbergetStartValue(Comparable rowKey, Comparable columnKey, int subinterval)Returns the start value of a sub-interval for a given item.intgetSubIntervalCount(int row, int column)Returns the number of sub-intervals for a given item.intgetSubIntervalCount(Comparable rowKey, Comparable columnKey)Returns the number of sub-intervals for a given item.NumbergetValue(int row, int column)/** Returns the value for a task.NumbergetValue(Comparable rowKey, Comparable columnKey)Returns the value for an item.voidremove(int series)Removes a series from the collection.voidremove(TaskSeries series)Removes a series from the collection.voidremoveAll()Removes all the series from the collection.voidseriesChanged(SeriesChangeEvent event)Called when a series belonging to the dataset changes.Methods inherited from class org.jfree.data.AbstractDataset
addChangeListener, clone, getGroup, removeChangeListener, setGroup, validateObjectMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.data.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
-
Constructor Details
-
TaskSeriesCollection
public TaskSeriesCollection()Default constructor.
-
-
Method Details
-
getSeriesName
Returns the name of a series.- Specified by:
getSeriesNamein interfaceSeriesDataset- Specified by:
getSeriesNamein classAbstractSeriesDataset- Parameters:
series- the series index (zero-based).- Returns:
- The name of a series.
-
getSeriesCount
public int getSeriesCount()Returns the number of series in the collection.- Specified by:
getSeriesCountin interfaceSeriesDataset- Specified by:
getSeriesCountin classAbstractSeriesDataset- Returns:
- The series count.
-
getRowCount
public int getRowCount()Returns the number of rows (series) in the collection.- Specified by:
getRowCountin interfaceValues2D- Returns:
- The series count.
-
getColumnCount
public int getColumnCount()Returns the number of column in the dataset.- Specified by:
getColumnCountin interfaceValues2D- Returns:
- The column count.
-
getRowKeys
Returns the row keys. In this case, each series is a key.- Specified by:
getRowKeysin interfaceKeyedValues2D- Returns:
- The row keys.
-
getColumnKeys
Returns a list of the column keys in the dataset.- Specified by:
getColumnKeysin interfaceKeyedValues2D- Returns:
- The category list.
-
getColumnKey
Returns a column key.- Specified by:
getColumnKeyin interfaceKeyedValues2D- Parameters:
item- the index.- Returns:
- The column key.
-
getColumnIndex
Returns the column index for a column key.- Specified by:
getColumnIndexin interfaceKeyedValues2D- Parameters:
columnKey- the columnKey.- Returns:
- The column index.
-
getRowIndex
Returns the row index for the given row key.- Specified by:
getRowIndexin interfaceKeyedValues2D- Parameters:
rowKey- the row key.- Returns:
- The index.
-
getRowKey
Returns the key for a row.- Specified by:
getRowKeyin interfaceKeyedValues2D- Parameters:
index- the row index (zero-based).- Returns:
- The key.
-
add
Adds a series to the dataset.- Parameters:
series- the series.
-
remove
public void remove(int series)Removes a series from the collection.Notifies all registered listeners that the dataset has changed.
- Parameters:
series- the series (zero based index).
-
remove
Removes a series from the collection.Notifies all registered listeners that the dataset has changed.
- Parameters:
series- the series.
-
removeAll
public void removeAll()Removes all the series from the collection.Notifies all registered listeners that the dataset has changed.
-
getValue
Returns the value for an item.- Specified by:
getValuein interfaceKeyedValues2D- Parameters:
rowKey- the row key.columnKey- the column key.- Returns:
- The item value.
-
getValue
/** Returns the value for a task. -
getStartValue
Returns the start value for a task.- Specified by:
getStartValuein interfaceIntervalCategoryDataset- Parameters:
rowKey- the series.columnKey- the category.- Returns:
- The start value.
-
getStartValue
Returns the start value for a task.- Specified by:
getStartValuein interfaceIntervalCategoryDataset- Parameters:
row- the row index (zero-based).column- the column index (zero-based).- Returns:
- The start value.
-
getEndValue
Returns the end value for a task.- Specified by:
getEndValuein interfaceIntervalCategoryDataset- Parameters:
rowKey- the series.columnKey- the category.- Returns:
- The end value.
-
getEndValue
Returns the end value for a task.- Specified by:
getEndValuein interfaceIntervalCategoryDataset- Parameters:
row- the row index (zero-based).column- the column index (zero-based).- Returns:
- The end value.
-
getPercentComplete
Returns the percent complete for a given item.- Specified by:
getPercentCompletein interfaceGanttCategoryDataset- Parameters:
row- the row index (zero-based).column- the column index (zero-based).- Returns:
- The percent complete.
-
getPercentComplete
Returns the percent complete for a given item.- Specified by:
getPercentCompletein interfaceGanttCategoryDataset- Parameters:
rowKey- the row key.columnKey- the column key.- Returns:
- The percent complete.
-
getSubIntervalCount
public int getSubIntervalCount(int row, int column)Returns the number of sub-intervals for a given item.- Specified by:
getSubIntervalCountin interfaceGanttCategoryDataset- Parameters:
row- the row index (zero-based).column- the column index (zero-based).- Returns:
- The sub-interval count.
-
getSubIntervalCount
Returns the number of sub-intervals for a given item.- Specified by:
getSubIntervalCountin interfaceGanttCategoryDataset- Parameters:
rowKey- the row key.columnKey- the column key.- Returns:
- The sub-interval count.
-
getStartValue
Returns the start value of a sub-interval for a given item.- Specified by:
getStartValuein interfaceGanttCategoryDataset- Parameters:
row- the row index (zero-based).column- the column index (zero-based).subinterval- the sub-interval index (zero-based).- Returns:
- The start value (possibly
null).
-
getStartValue
Returns the start value of a sub-interval for a given item.- Specified by:
getStartValuein interfaceGanttCategoryDataset- Parameters:
rowKey- the row key.columnKey- the column key.subinterval- the subinterval.- Returns:
- The start value (possibly
null).
-
getEndValue
Returns the end value of a sub-interval for a given item.- Specified by:
getEndValuein interfaceGanttCategoryDataset- Parameters:
row- the row index (zero-based).column- the column index (zero-based).subinterval- the subinterval.- Returns:
- The end value (possibly
null).
-
getEndValue
Returns the end value of a sub-interval for a given item.- Specified by:
getEndValuein interfaceGanttCategoryDataset- Parameters:
rowKey- the row key.columnKey- the column key.subinterval- the subinterval.- Returns:
- The end value (possibly
null).
-
getPercentComplete
Returns the percentage complete value of a sub-interval for a given item.- Specified by:
getPercentCompletein interfaceGanttCategoryDataset- Parameters:
row- the row index (zero-based).column- the column index (zero-based).subinterval- the sub-interval.- Returns:
- The percent complete value (possibly
null).
-
getPercentComplete
Returns the percentage complete value of a sub-interval for a given item.- Specified by:
getPercentCompletein interfaceGanttCategoryDataset- Parameters:
rowKey- the row key.columnKey- the column key.subinterval- the sub-interval.- Returns:
- The precent complete value (possibly
null).
-
seriesChanged
Called when a series belonging to the dataset changes.- Specified by:
seriesChangedin interfaceSeriesChangeListener- Overrides:
seriesChangedin classAbstractSeriesDataset- Parameters:
event- information about the change.
-