|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
com.yuxingwang.gantt.model.BaseTask<Task>
com.yuxingwang.gantt.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.
| Field Summary |
|---|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
EMPTY_ENUMERATION |
| Constructor Summary | |
|---|---|
Task()
|
|
Task(java.lang.String name,
java.util.Calendar startTime,
java.util.Calendar endTime)
|
|
Task(java.lang.String name,
java.util.Calendar startTime,
java.util.Calendar endTime,
int progress)
|
|
Task(java.lang.String name,
java.util.Calendar startTime,
java.util.Calendar endTime,
java.util.List<Task> predecessors)
|
|
Task(java.lang.String name,
java.lang.String description,
java.util.Calendar startTime,
java.util.Calendar endTime,
int progress,
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 |
java.util.Calendar |
getActualEnd()
Get actual end time of this task. |
java.util.Calendar |
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. |
java.util.Calendar |
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. |
java.util.Calendar |
getStart()
Get start time of this Task. |
void |
predecessorChanged(com.yuxingwang.gantt.event.PredecessorChangeEvent e)
Handler the predecessor changes event. |
void |
setEnd(java.util.Calendar 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. |
java.lang.String |
toSimpleString()
Task Name + Actual start and end time. |
java.lang.String |
toString()
The information about this Task. |
| Methods inherited from class com.yuxingwang.gantt.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,
java.util.Calendar startTime,
java.util.Calendar endTime)
public Task(java.lang.String name,
java.util.Calendar startTime,
java.util.Calendar endTime,
int progress)
public Task(java.lang.String name,
java.util.Calendar startTime,
java.util.Calendar endTime,
java.util.List<Task> predecessors)
public Task(java.lang.String name,
java.lang.String description,
java.util.Calendar startTime,
java.util.Calendar 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 java.util.Calendar getStart()
Task.
public void setStart(java.util.Calendar start)
Task.
start - the start to setpublic void predecessorChanged(com.yuxingwang.gantt.event.PredecessorChangeEvent e)
predecessorChanged in interface com.yuxingwang.gantt.event.PredecessorChangeListenerpublic void adjustActualTimesByPredecessor()
public java.util.Calendar getActualStart()
public java.util.Calendar getEnd()
Task.
public void setEnd(java.util.Calendar end)
Task.
end - the end to setpublic java.util.Calendar getActualEnd()
public java.lang.String toString()
toString in class javax.swing.tree.DefaultMutableTreeNodepublic java.lang.String toSimpleString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||