Package org.jfree.data.gantt
Class TaskSeriesCollection
java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.general.AbstractSeriesDataset
org.jfree.data.gantt.TaskSeriesCollection
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,EventListener,PublicCloneable,CategoryDataset,IntervalCategoryDataset,GanttCategoryDataset,Dataset,SeriesChangeListener,SeriesDataset,KeyedValues2D,Values2D
public class TaskSeriesCollection
extends AbstractSeriesDataset
implements GanttCategoryDataset, Cloneable, PublicCloneable, Serializable
A collection of
TaskSeries objects. This class provides one
implementation of the GanttCategoryDataset interface.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(TaskSeries series) Adds a series to the dataset and sends aDatasetChangeEventto all registered listeners.booleanEnsures symmetry between super/subclass implementations of equals.clone()Returns an independent copy of this dataset.booleanTests this instance for equality with an arbitrary object.intReturns the number of column in the dataset.intgetColumnIndex(Comparable columnKey) Returns the column index for a column key.getColumnKey(int index) Returns a column key.Returns a list of the column keys in the dataset.getEndValue(int row, int column) Returns the end value for a task.getEndValue(int row, int column, int subinterval) Returns the end value of a sub-interval for a given item.getEndValue(Comparable rowKey, Comparable columnKey) Returns the end value for a task.getEndValue(Comparable rowKey, Comparable columnKey, int subinterval) Returns the end value of a sub-interval for a given item.getPercentComplete(int row, int column) Returns the percent complete for a given item.getPercentComplete(int row, int column, int subinterval) Returns the percentage complete value of a sub-interval for a given item.getPercentComplete(Comparable rowKey, Comparable columnKey) Returns the percent complete for a given item.getPercentComplete(Comparable rowKey, Comparable columnKey, int subinterval) Returns the percentage complete value of a sub-interval for a given item.intReturns the number of rows (series) in the collection.intgetRowIndex(Comparable rowKey) Returns the row index for the given row key.getRowKey(int index) Returns the key for a row.Returns the row keys.getSeries(int series) Returns a series from the collection.getSeries(Comparable key) Returns a series from the collection.intReturns the number of series in the collection.getSeriesKey(int series) Returns the name of a series.getStartValue(int row, int column) Returns the start value for a task.getStartValue(int row, int column, int subinterval) Returns the start value of a sub-interval for a given item.getStartValue(Comparable rowKey, Comparable columnKey) Returns the start value for a task.getStartValue(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.getValue(int row, int column) Returns the value for a task.getValue(Comparable rowKey, Comparable columnKey) Returns the value for an item.inthashCode()voidremove(int series) Removes a series from the collection and sends aDatasetChangeEventto all registered listeners.voidremove(TaskSeries series) Removes a series from the collection and sends aDatasetChangeEventto all registered listeners.voidRemoves all the series from the collection and sends aDatasetChangeEventto all registered listeners.voidseriesChanged(SeriesChangeEvent event) Called when a series belonging to the dataset changes.Methods inherited from class org.jfree.data.general.AbstractSeriesDataset
indexOfMethods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObjectMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.data.general.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
-
Constructor Details
-
TaskSeriesCollection
public TaskSeriesCollection()Default constructor.
-
-
Method Details
-
getSeries
Returns a series from the collection.- Parameters:
key- the series key (nullnot permitted).- Returns:
- The series.
-
getSeries
Returns a series from the collection.- Parameters:
series- the series index (zero-based).- Returns:
- The series.
-
getSeriesCount
Returns the number of series in the collection.- Specified by:
getSeriesCountin interfaceSeriesDataset- Specified by:
getSeriesCountin classAbstractSeriesDataset- Returns:
- The series count.
-
getSeriesKey
Returns the name of a series.- Specified by:
getSeriesKeyin interfaceSeriesDataset- Specified by:
getSeriesKeyin classAbstractSeriesDataset- Parameters:
series- the series index (zero-based).- Returns:
- The name of a series.
-
getRowCount
Returns the number of rows (series) in the collection.- Specified by:
getRowCountin interfaceValues2D- Returns:
- The series count.
-
getRowKeys
Returns the row keys. In this case, each series is a key.- Specified by:
getRowKeysin interfaceKeyedValues2D- Returns:
- The row keys.
-
getColumnCount
Returns the number of column in the dataset.- Specified by:
getColumnCountin interfaceValues2D- Returns:
- The column count.
-
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:
index- the column index.- Returns:
- The column key.
-
getColumnIndex
Returns the column index for a column key.- Specified by:
getColumnIndexin interfaceKeyedValues2D- Parameters:
columnKey- the column key (nullnot permitted).- 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 and sends aDatasetChangeEventto all registered listeners.- Parameters:
series- the series (nullnot permitted).
-
remove
Removes a series from the collection and sends aDatasetChangeEventto all registered listeners.- Parameters:
series- the series.
-
remove
Removes a series from the collection and sends aDatasetChangeEventto all registered listeners.- Parameters:
series- the series (zero based index).
-
removeAll
Removes all the series from the collection and sends aDatasetChangeEventto all registered listeners. -
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. This is a date/time value, measured in milliseconds since 1-Jan-1970.- Specified by:
getStartValuein interfaceIntervalCategoryDataset- Parameters:
rowKey- the series.columnKey- the category.- Returns:
- The start value (possibly
null). - See Also:
-
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.
- See Also:
-
getEndValue
Returns the end value for a task. This is a date/time value, measured in milliseconds since 1-Jan-1970.- Specified by:
getEndValuein interfaceIntervalCategoryDataset- Parameters:
rowKey- the series.columnKey- the category.- Returns:
- The end value (possibly
null). - See Also:
-
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.
- See Also:
-
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 (possibly
null). - See Also:
-
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.
- See Also:
-
getSubIntervalCount
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.
- See Also:
-
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.
- See Also:
-
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). - See Also:
-
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). - See Also:
-
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). - See Also:
-
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). - See Also:
-
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). - See Also:
-
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 percent complete value (possibly
null). - See Also:
-
seriesChanged
Called when a series belonging to the dataset changes.- Specified by:
seriesChangedin interfaceSeriesChangeListener- Overrides:
seriesChangedin classAbstractSeriesDataset- Parameters:
event- information about the change.
-
equals
Tests this instance for equality with an arbitrary object.- Overrides:
equalsin classAbstractDataset- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
canEqual
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.- Overrides:
canEqualin classAbstractDataset- Parameters:
other- Object- Returns:
- true ONLY if the parameter is THIS class type
-
hashCode
- Overrides:
hashCodein classAbstractDataset
-
clone
Returns an independent copy of this dataset.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classAbstractDataset- Returns:
- A clone of the dataset.
- Throws:
CloneNotSupportedException- if there is some problem cloning the dataset.
-