org.jfree.data.gantt
Class Task
java.lang.Objectorg.jfree.data.gantt.Task
- Cloneable, PublicCloneable, Serializable
extends java.lang.Object
implements Cloneable, PublicCloneable, Serializable
A simple representation of a task. The task has a description and a
duration. You can add sub-tasks to the task.
Task(String description, Date start, Date end)- Creates a new task.
|
Task(String description, TimePeriod duration)- Creates a new task.
|
Task
public Task(String description,
Date start,
Date end) Creates a new task.
description - the task description (null not
permitted).start - the start date (null not permitted).end - the end date (null not permitted).
Task
public Task(String description,
TimePeriod duration) Creates a new task.
description - the task description (null not
permitted).duration - the task duration (null permitted).
addSubtask
public void addSubtask(Task subtask)
Adds a sub-task to the task.
subtask - the subtask (null not permitted).
clone
public Object clone()
throws CloneNotSupportedException Returns a clone of the task.
equals
public boolean equals(Object object)
Tests this object for equality with an arbitrary object.
object - the other object (null permitted).
getDescription
public String getDescription()
Returns the task description.
- The task description (never
null).
getDuration
public TimePeriod getDuration()
Returns the duration (actual or estimated) of the task.
- The task duration (possibly
null).
getPercentComplete
public Double getPercentComplete()
Returns the percentage complete for this task.
- The percentage complete (possibly
null).
removeSubtask
public void removeSubtask(Task subtask)
Removes a sub-task from the task.
setDescription
public void setDescription(String description)
Sets the task description.
description - the description (null not permitted).
setDuration
public void setDuration(TimePeriod duration)
Sets the task duration (actual or estimated).
duration - the duration (null permitted).
setPercentComplete
public void setPercentComplete(Double percent)
Sets the percentage complete for the task.
percent - the percentage (null permitted).
setPercentComplete
public void setPercentComplete(double percent)
Sets the percentage complete for the task.
percent - the percentage.