Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.yuxingwang.gantt.model
Class BaseTask<E extends BaseTask>

    java.lang.Object
      javax.swing.tree.DefaultMutableTreeNode
          com.yuxingwang.gantt.model.BaseTask<E>

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

Direct Known Subclasses:
  Task

    public abstract class BaseTask<E extends BaseTask>

extends javax.swing.tree.DefaultMutableTreeNode

Since:
  0.3.0
Author:
  Yuxing Wang
See Also:
  Serialized Form

Field Summary

Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
`EMPTY_ENUMERATION`

Constructor Summary
`BaseTask()`

Method Summary
`void` | `add(E subTask)` Add sub task to this `Task`.
`void` | `add(E[] tasks)` Add sub-tasks to this `Task`.
`void` | `addPredecessor(E predecessor)` Add predecessor to this `Task`.
`void` | `addPredecessorChangeListener(com.yuxingwang.gantt.event.PredecessorChangeListener l)` Add listener for predecessor task changes event.
`void` | `addPropertyChangeListener(java.beans.PropertyChangeListener l)` Add listener to this Task and all his sub-tasks.
`java.awt.Color` | `getBackcolor()` Get backcolor of the task bar in Gantt Chart.
`java.util.List<Task>` | `getChildren()` Get children tasks.
`java.lang.String` | `getDescription()` Get description of this `Task`.
`int` | `getId()` Get the id of this Task.
`int` | `getLevel()` Get level in the task tree.
`java.lang.String` | `getName()` Get name of this `Task`.
`java.util.List<E>` | `getPredecessors()` Get predecessors of this `Task`.
`int` | `getTasksCount()` Get count of sub-tasks in all levels.
`void` | `removePredecessorChangeListener(com.yuxingwang.gantt.event.PredecessorChangeListener l)`
`void` | `removePropertyChangeListener(java.beans.PropertyChangeListener l)` Remove listener from this Task and all his sub-tasks.
`void` | `setBackcolor(java.awt.Color backcolor)` Set backcolor of this task bar in Gantt Chart, not applied to task group bar.
`void` | `setDescription(java.lang.String description)` Set description of this `Task`.
`void` | `setId(int id)` Set the id of this Task.
`void` | `setName(java.lang.String name)` Set name of this `Task`.

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, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BaseTask

    public BaseTask()

Method Detail

### add

    public void add(E[] tasks)

  Add sub-tasks to this `Task`.

  Parameters:
    `tasks` -

### add

    public void add(E subTask)

  Add sub task to this `Task`.

  Parameters:
    `subTask` -

### getTasksCount

    public int getTasksCount()

  Get count of sub-tasks in all levels.

  Returns:

### getChildren

    public java.util.List<Task> getChildren()

  Get children tasks.

  Returns:

### getPredecessors

    public java.util.List<E> getPredecessors()

  Get predecessors of this `Task`.

  Returns:
    the predecessors

### addPredecessor

    public void addPredecessor(E predecessor)

  Add predecessor to this `Task`.

  Parameters:
    `predecessors` - the predecessors tasks to set.

### addPredecessorChangeListener

    public void addPredecessorChangeListener(com.yuxingwang.gantt.event.PredecessorChangeListener l)

  Add listener for predecessor task changes event.

  Parameters:
    `l` -

### addPropertyChangeListener

    public void addPropertyChangeListener(java.beans.PropertyChangeListener l)

  Add listener to this Task and all his sub-tasks.

  Parameters:
    `l` -

### removePredecessorChangeListener

    public void removePredecessorChangeListener(com.yuxingwang.gantt.event.PredecessorChangeListener l)

### removePropertyChangeListener

    public void removePropertyChangeListener(java.beans.PropertyChangeListener l)

  Remove listener from this Task and all his sub-tasks.

  Parameters:
    `l` -

### getId

    public int getId()

  Get the id of this Task.

  Returns:
    the id

### setId

    public void setId(int id)

  Set the id of this Task.

### getDescription

    public java.lang.String getDescription()

  Get description of this `Task`.

  Returns:
    the description

### setDescription

    public void setDescription(java.lang.String description)

  Set description of this `Task`.

  Parameters:
    `description` - the description to set

### getName

    public java.lang.String getName()

  Get name of this `Task`.

  Returns:
    the name

### setName

    public void setName(java.lang.String name)

  Set name of this `Task`.

  Parameters:
    `name` - the name to set

### getLevel

    public int getLevel()

  Get level in the task tree.

  Overrides:
    `getLevel` in class `javax.swing.tree.DefaultMutableTreeNode`

### getBackcolor

    public java.awt.Color getBackcolor()

  Get backcolor of the task bar in Gantt Chart.

  Returns:

### setBackcolor

    public void setBackcolor(java.awt.Color backcolor)

  Set backcolor of this task bar in Gantt Chart, not applied to task group bar.

  Parameters:
    `backcolor` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD