JIDE 3.5.15

com.jidesoft.gantt
Interface GanttModel<T,S extends GanttEntry<T>>

Type Parameters:
T - The type of the bases unit of the scale, for example Date or Integer.
S - The type of the GanttEntries in the model.
All Known Implementing Classes:
AbstractGanttModel, DefaultGanttModel

public interface GanttModel<T,S extends GanttEntry<T>>

GanttModel is the model for GanttChart. It specifies methods that GanttChart will use to interrogate the underlying gantt entires.


Method Summary
 void addGanttModelListener(GanttModelListener listener)
          Adds a GanttModelListener.
 S getEntryAt(int index)
          Gets the entry at the entry index.
 int getEntryCount()
          Gets the total entry count.
 GanttEntryRelationModel<S> getGanttEntryRelationModel()
          Gets the model that defines the relationship among gantt entries.
 int getIndexOf(S entry)
          Gets the index of the entry.
 Range<T> getRange()
          Gets the range of the GanttModel.
 ScaleModel<T> getScaleModel()
          Gets the ScaleModel.
 ITreeTableModel<S> getTreeTableModel()
          Returns the TreeTableModel instance.
 void removeGanttModelListener(GanttModelListener listener)
          Removes a GanttModelListener.
 

Method Detail

getEntryCount

int getEntryCount()
Gets the total entry count.

Please note, if an entry has children and the entry itself is collapsed, the children will not be included in the total entry count.

Returns:
the total entry count.

getEntryAt

S getEntryAt(int index)
Gets the entry at the entry index.

Parameters:
index - the entry index.
Returns:
Returns the GanttEntry at the index or null if the index is out of bounds.

getIndexOf

int getIndexOf(S entry)
Gets the index of the entry.

Parameters:
entry - the entry
Returns:
the index.

getTreeTableModel

ITreeTableModel<S> getTreeTableModel()
Returns the TreeTableModel instance.

The returned model should also be a TableModel instance! Enforcing this through the type system would introduce another generic type.

Returns:
The TreeTableModel to be displayed in the TreeTable of the GanttChartPane.

getRange

Range<T> getRange()
Gets the range of the GanttModel. It is the union of the ranges in all the gantt entries.

Returns:
the range.

getScaleModel

ScaleModel<T> getScaleModel()
Gets the ScaleModel.

Returns:
the ScaleModel.

getGanttEntryRelationModel

GanttEntryRelationModel<S> getGanttEntryRelationModel()
Gets the model that defines the relationship among gantt entries.

Returns:
the GanttEntryRelationModel.

addGanttModelListener

void addGanttModelListener(GanttModelListener listener)
Adds a GanttModelListener.

Parameters:
listener - the GanttModelListener.

removeGanttModelListener

void removeGanttModelListener(GanttModelListener listener)
Removes a GanttModelListener.

Parameters:
listener - a GanttModelListener.

JIDE 3.5.15