Relationship Layer
It is quite common that timeline objects have some kind of relationship with each other. Project planning software for example often defines constraints between them. Some examples for constraints are: 'start after', 'finish before', 'same start', 'same end'. FlexGantt can visualize them by drawing lines betwen them. Each application has its own way of visualizing them (different colors and / or line styles for different constraints). By plugging in a custom relationship renderer it is possible to implement any kind of relationship rendering.
The relationship layer uses two different lookup strategies to determine the relationships that need rendering. The first approach always queries all relationships from the model and renders them all. The second one only looks up the relationships for those timeline objects that are painted at a certain time. The second approach performs better but relationships between two currently not visible timeline objects will not be drawn and the lines of these relationships will not cross the currently visible area of the layer container. Then when one of these related timeline objects does become visible the relationship will show up. This causes some sort of 'flickering' and inconsistent visuals but might still work for apps where related timeline objects are always just one row apart from each other or even on the same row.
Relationships drawn between activites
Relevant API
Collection<IRelationship> IGanttChartModel.getRelationships();
Collection<IRelationship> IGanttChartModel.getRelationships(Object timelineObject);
IRelationshipRenderer
IRelationship
IRelationshipPolicy
DefaultRelationship
DefaultRelationshipPolicy
DefaultCreateRelationshipCommand
void RelationshipLayer.setLookupStrategy(LookupStrategy strategy);
void RelationshipLayer.setRelationshipRenderer(IRelationshipRenderer);
