at.ac.tuwien.cs.ztimeview.core
Class Task

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended byat.ac.tuwien.cs.ztimeview.core.Task
All Implemented Interfaces:
java.lang.Cloneable, Interval, javax.swing.tree.MutableTreeNode, java.io.Serializable, Timed, javax.swing.tree.TreeNode
Direct Known Subclasses:
PlanningTask

public class Task
extends javax.swing.tree.DefaultMutableTreeNode
implements Interval

Class representing a Task

Version:
0.3 created: 2004-05-19 last change: 2004-06-04
Author:
Wolfgang Aigner
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
Task()
          Default constructor
Task(java.lang.String name, java.util.Date start, java.util.Date end)
          Constructor
Task(java.lang.String name, Interval interval)
          Constructor
 
Method Summary
 java.util.Date getEnd()
          Get the end of the interval
 java.lang.String getName()
          Get task name
 java.util.Date getStart()
          Get the start of the interval
 void printHierarchy()
          Print task hierarchy textually to the screen
protected  void printHierarchy(int indent)
          Print task hierarchy textually to the screen
 void setEnd(java.util.Date end)
          Set the end of the interval
 void setName(java.lang.String name)
          Set task name
 void setStart(java.util.Date start)
          Set the start of the interval
 java.lang.String toString()
           
 
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, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Task

public Task()
     throws java.lang.IllegalArgumentException
Default constructor


Task

public Task(java.lang.String name,
            Interval interval)
     throws java.lang.IllegalArgumentException
Constructor

Parameters:
name - task name
interval - time interval

Task

public Task(java.lang.String name,
            java.util.Date start,
            java.util.Date end)
     throws java.lang.IllegalArgumentException
Constructor

Parameters:
name - task name
start - start time of interval
end - end time of interval
Method Detail

printHierarchy

public void printHierarchy()
Print task hierarchy textually to the screen


printHierarchy

protected void printHierarchy(int indent)
Print task hierarchy textually to the screen

Parameters:
indent - number of spaces for indentation

toString

public java.lang.String toString()

setName

public void setName(java.lang.String name)
Set task name

Parameters:
name - task name

getName

public java.lang.String getName()
Get task name

Returns:
task name

setStart

public void setStart(java.util.Date start)
Set the start of the interval

Specified by:
setStart in interface Interval
Parameters:
start - beginning of interval

getStart

public java.util.Date getStart()
Get the start of the interval

Specified by:
getStart in interface Interval
Returns:
beginning of interval

setEnd

public void setEnd(java.util.Date end)
Set the end of the interval

Specified by:
setEnd in interface Interval
Parameters:
end - end of interval

getEnd

public java.util.Date getEnd()
Get the end of the interval

Specified by:
getEnd in interface Interval
Returns:
end of interval


Copyright © 2004 by Vienna University of Technology.