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 GanttModel

    java.lang.Object
      com.yuxingwang.gantt.model.GanttModel

    public class GanttModel

extends java.lang.Object

Represent the model of the `GanttChart`, consist of KickOffTime, Deadline and a `TaskTreeModel`.

Version:
  1.0
Author:
  Yuxing Wang

Constructor Summary
`GanttModel()`

Method Summary
`void` | `addGanttModelListener(GanttModelListener l)` Add listener for Gantt chart model changes.
`void` | `addTask(Task task)` Add Task to the root node of TaskTreeModel inside the GanttModel.
`void` | `addTask(Task[] tasks)` Add Tasks to the root node of TaskTreeModel inside the GanttModel.
`java.util.Calendar` | `getDeadline()` Get deadline of Gantt chart.
`java.util.Calendar` | `getKickoffTime()` Get kickoff time of Gantt chart.
`TaskTreeModel` | `getTaskTreeModel()` Get `TaskTreeModel`.
`void` | `recalculate()` Recaculate something that needs for displaying.
`void` | `removeAll()` Remove all tasks from Gantt chart.
`void` | `removeTask(Task task)` Remove task from the Gantt chart model.
`void` | `setDeadline(java.util.Calendar deadline)` Set deadline of Gantt chart.
`void` | `setKickoffTime(java.util.Calendar kickoffTime)` Set kickoff time of Gantt chart.

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

Constructor Detail

### GanttModel

    public GanttModel()

Method Detail

### addTask

    public void addTask(Task[] tasks)

  Add Tasks to the root node of TaskTreeModel inside the GanttModel.

  Parameters:
    `tasks` -

### addTask

    public void addTask(Task task)

  Add Task to the root node of TaskTreeModel inside the GanttModel.

  Parameters:
    `task` -

### removeTask

    public void removeTask(Task task)

  Remove task from the Gantt chart model.

  Parameters:
    `task` -

### removeAll

    public void removeAll()

  Remove all tasks from Gantt chart.

### recalculate

    public void recalculate()

  Recaculate something that needs for displaying.

### addGanttModelListener

    public void addGanttModelListener(GanttModelListener l)

  Add listener for Gantt chart model changes.

  Parameters:
    `l` -

### getDeadline

    public java.util.Calendar getDeadline()

  Get deadline of Gantt chart.

  Returns:
    the deadline

### setDeadline

    public void setDeadline(java.util.Calendar deadline)

  Set deadline of Gantt chart.

  Parameters:
    `deadline` - the deadline to set

### getKickoffTime

    public java.util.Calendar getKickoffTime()

  Get kickoff time of Gantt chart.

  Returns:
    the kickoffTime

### setKickoffTime

    public void setKickoffTime(java.util.Calendar kickoffTime)

  Set kickoff time of Gantt chart.

  Parameters:
    `kickoffTime` - the kickoffTime to set

### getTaskTreeModel

    public TaskTreeModel getTaskTreeModel()

  Get `TaskTreeModel`.

  Returns:
    the taskList

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