Package org.jfree.data.gantt
Class TaskSeries
java.lang.Object
org.jfree.data.general.Series
org.jfree.data.gantt.TaskSeries
- All Implemented Interfaces:
Serializable
,Cloneable
A series that contains zero, one or many
Task
objects.
This class is used as a building block for the TaskSeriesCollection
class that can be used to construct basic Gantt charts.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a task to the series and sends aSeriesChangeEvent
to all registered listeners.boolean
Ensures symmetry between super/subclass implementations of equals.clone()
Returns an independent copy of this series.boolean
Tests this object for equality with an arbitrary object.get
(int index) Returns a task from the series.Returns the task in the series that has the specified description.int
Returns the number of items in the series.getTasks()
Returns an unmodifialble list of the tasks in the series.int
hashCode()
Returns a hash code.void
Removes a task from the series and sends aSeriesChangeEvent
to all registered listeners.void
Removes all tasks from the series and sends aSeriesChangeEvent
to all registered listeners.Methods inherited from class org.jfree.data.general.Series
addChangeListener, addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireSeriesChanged, fireVetoableChange, getDescription, getKey, getNotify, isEmpty, notifyListeners, removeChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setDescription, setKey, setNotify
-
Constructor Details
-
TaskSeries
Constructs a new series with the specified name.- Parameters:
name
- the series name (null
not permitted).
-
-
Method Details
-
add
Adds a task to the series and sends aSeriesChangeEvent
to all registered listeners.- Parameters:
task
- the task (null
not permitted).
-
remove
Removes a task from the series and sends aSeriesChangeEvent
to all registered listeners.- Parameters:
task
- the task.
-
removeAll
Removes all tasks from the series and sends aSeriesChangeEvent
to all registered listeners. -
getItemCount
Returns the number of items in the series.- Specified by:
getItemCount
in classSeries
- Returns:
- The item count.
-
get
Returns a task from the series.- Parameters:
index
- the task index (zero-based).- Returns:
- The task.
-
get
Returns the task in the series that has the specified description.- Parameters:
description
- the name (null
not permitted).- Returns:
- The task (possibly
null
).
-
getTasks
Returns an unmodifialble list of the tasks in the series.- Returns:
- The tasks.
-
equals
Tests this object for equality with an arbitrary object. -
canEqual
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance. -
hashCode
Description copied from class:Series
Returns a hash code. -
clone
Returns an independent copy of this series.- Overrides:
clone
in classSeries
- Returns:
- A clone of the series.
- Throws:
CloneNotSupportedException
- if there is some problem cloning the dataset.
-