Gantt Chart Model (IGanttChartModel)
Each Gantt chart consists of a left-hand side and a right-hand side. The left-hand side is implemented by a tree table, the right-hand side is a layer container. The Gantt chart model needs to provide data for both sides at the same time. To do so it extends the tree table model interface used on the left-hand side with methods that are needed for the layer container on the right-hand side. The layer container primarily needs to know how many layers are shown and which timeline objects are shown on which layer in which row (on which node). This is done by the following methods (T is the type of the hierarchy node, S is the type of the timeline objects):
ILayer[] IGanttChartModel.getLayers();
Iterator<S> IGanttChartModel.getTimelineObjectsIterator(T node, ILayer layer, ITimeSpan span);
The layer container will create a separate timeline object layer for each model layer. These layers will then query the model for those timeline objects that are placed on them.
Additionally timeline objects can have relationships with each other. These are visualized by the relationship layer via lines with arrows that connect the related timeline objects with each other.
Collection<IRelationship<S>> IGanttChartModel.getRelationships();
Collection<IRelationship<S>> IGanttChartModel.getRelationships(S timelineObject);
The first method returns all relationships while the second one returns only those relationships where the given timeline object is either the source or the target of the relationship.
