com.dlsc.flexgantt.model.gantt
Interface IRelationship<T>

Type Parameters:
T - the object type of the timeline objects
All Known Implementing Classes:
DefaultRelationship

public interface IRelationship<T>

Timeline objects may have some kind of relationship between each other. To visualize this relationship (which might be a dependency / constraint like "finish before start") lines with arrows can be drawn between them. To enable the user interface to draw these lines a relationship object needs to return the related timeline objects plus the tree paths to locate the row on which they are displayed. The path and the timeline object information is encapsulated in instances of type TimelineObjectPath.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
RelationshipLayer, IGanttChartModel.getRelationships()

Method Summary
 TimelineObjectPath<T> getSourcePath()
          Returns the tree path information that can be used to locate the row on which the source timeline object is displayed.
 TimelineObjectPath<T> getTargetPath()
          Returns the tree path information that can be used to locate the row on which the target timeline object is displayed.
 void setSourcePath(TimelineObjectPath<T> path)
          Sets a new tree path that can be used to locate the row on which the source timeline object is displayed.
 void setTargetPath(TimelineObjectPath<T> path)
          Sets a new tree path that can be used to locate the row on which the target timeline object is displayed.
 

Method Detail

setSourcePath

void setSourcePath(TimelineObjectPath<T> path)
Sets a new tree path that can be used to locate the row on which the source timeline object is displayed.

Parameters:
path - the new source path
Since:
1.0

getSourcePath

TimelineObjectPath<T> getSourcePath()
Returns the tree path information that can be used to locate the row on which the source timeline object is displayed.

Returns:
the tree path to the row where the source object is located
Since:
1.0

setTargetPath

void setTargetPath(TimelineObjectPath<T> path)
Sets a new tree path that can be used to locate the row on which the target timeline object is displayed.

Parameters:
path - the new target path
Since:
1.0

getTargetPath

TimelineObjectPath<T> getTargetPath()
Returns the tree path information that can be used to locate the row on which the target timeline object is displayed.

Returns:
the tree path to the row where the target object is located
Since:
1.0