|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.swiftgantt.model.BaseTask<Task>
org.swiftgantt.model.Task
public final class Task
A Task
is an object that represent a task in project, it is task node in the tasks tree.
PropertyChangeEvent
event raised after:
task start time changed, task end time changed, task progress changed.
Field Summary |
---|
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
EMPTY_ENUMERATION |
Constructor Summary | |
---|---|
Task()
|
|
Task(java.lang.String name,
java.lang.String description,
org.swiftgantt.common.Time startTime,
org.swiftgantt.common.Time endTime,
int progress,
java.util.List<Task> predecessors)
|
|
Task(java.lang.String name,
org.swiftgantt.common.Time startTime,
org.swiftgantt.common.Time endTime)
|
|
Task(java.lang.String name,
org.swiftgantt.common.Time startTime,
org.swiftgantt.common.Time endTime,
int progress)
|
|
Task(java.lang.String name,
org.swiftgantt.common.Time startTime,
org.swiftgantt.common.Time endTime,
java.util.List<Task> predecessors)
|
Method Summary | |
---|---|
void |
adjustActualTimesByPredecessor()
Adjust actual start and end time by it's latest predecessor. |
int |
calcProgressSteps()
Calculate displaying progress steps by task progress. |
int |
calcTaskSteps()
Calculate how many steps for this task in Gantt chart. |
void |
copy(Task sourceTask)
Copy content from given source task |
org.swiftgantt.common.Time |
getActualEnd()
Get actual end time of this task. |
org.swiftgantt.common.Time |
getActualStart()
Get actual start time of this task. |
int |
getDuration()
Get duration of this Task , exclude the rest-out time. |
Task |
getEarliestSubTask()
Get the sub-task, who has the earliest end time, in the sub-task tree. |
Task |
getEarliestTask()
Get the sub-task, who has the earliest end time, in the sub-task tree include myself. |
org.swiftgantt.common.Time |
getEnd()
Get end time of this Task . |
Task |
getLatestSubTask()
Get the last task, who has the latest end time, in the sub task tree. |
Task |
getLatestTask()
Get the last task, who has the latest end time, in the sub task tree include myself. |
int |
getProgress()
Get progress of this Task . |
org.swiftgantt.common.Time |
getStart()
Get start time of this Task . |
void |
predecessorChanged(PredecessorChangeEvent e)
Handler the predecessor changes event. |
void |
setEnd(java.util.Calendar end)
Set end time of this Task . |
void |
setEnd(org.swiftgantt.common.Time end)
Set end time of this Task . |
void |
setProgress(int progress)
Set progress of this Task . |
void |
setStart(java.util.Calendar start)
Set start time of this Task . |
void |
setStart(org.swiftgantt.common.Time start)
Set start time of this Task . |
java.lang.String |
toSimpleString()
Task name, actual start and end time. |
java.lang.String |
toString()
The detail information for this Task. |
Methods inherited from class org.swiftgantt.model.BaseTask |
---|
add, add, addPredecessor, addPredecessorChangeListener, addPropertyChangeListener, getBackcolor, getChildren, getDescription, getId, getLevel, getName, getPredecessors, getTasksCount, removePredecessorChangeListener, removePropertyChangeListener, setBackcolor, setDescription, setId, setName |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Task()
public Task(java.lang.String name, org.swiftgantt.common.Time startTime, org.swiftgantt.common.Time endTime)
public Task(java.lang.String name, org.swiftgantt.common.Time startTime, org.swiftgantt.common.Time endTime, int progress)
public Task(java.lang.String name, org.swiftgantt.common.Time startTime, org.swiftgantt.common.Time endTime, java.util.List<Task> predecessors)
public Task(java.lang.String name, java.lang.String description, org.swiftgantt.common.Time startTime, org.swiftgantt.common.Time endTime, int progress, java.util.List<Task> predecessors)
Method Detail |
---|
public void copy(Task sourceTask)
public Task getEarliestSubTask()
public Task getEarliestTask()
public Task getLatestSubTask()
public Task getLatestTask()
public int calcTaskSteps()
task
-
public int calcProgressSteps()
start
- progress
-
public int getDuration()
Task
, exclude the rest-out time.
public int getProgress()
Task
. If progress exceeds the task duration, it will be limited within the duration.
public void setProgress(int progress)
Task
.
progress
- the progress to setpublic org.swiftgantt.common.Time getStart()
Task
.
public void setStart(java.util.Calendar start)
Task
.
start
- public void setStart(org.swiftgantt.common.Time start)
Task
.
start
- the start to setpublic void predecessorChanged(PredecessorChangeEvent e)
predecessorChanged
in interface PredecessorChangeListener
public void adjustActualTimesByPredecessor()
public org.swiftgantt.common.Time getActualStart()
public org.swiftgantt.common.Time getEnd()
Task
.
public void setEnd(java.util.Calendar end)
Task
.
end
- public void setEnd(org.swiftgantt.common.Time end)
Task
.
end
- The end time of task to setpublic org.swiftgantt.common.Time getActualEnd()
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
public java.lang.String toSimpleString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |