com.dlsc.flexgantt.model.gantt
Class DefaultRelationship<T>

java.lang.Object
  extended by com.dlsc.flexgantt.model.gantt.DefaultRelationship<T>
Type Parameters:
T - the object type of the related timeline objects
All Implemented Interfaces:
IRelationship<T>

public class DefaultRelationship<T>
extends java.lang.Object
implements IRelationship<T>

The default implementation for relationships. For more information read the notes on IRelationship.

Since:
1.0
Author:
Dirk Lemmermann

Constructor Summary
DefaultRelationship(TimelineObjectPath<T> sourcePath, TimelineObjectPath<T> targetPath)
          Constructs a new relationship object.
 
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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultRelationship

public DefaultRelationship(TimelineObjectPath<T> sourcePath,
                           TimelineObjectPath<T> targetPath)
Constructs a new relationship object.

Parameters:
sourcePath - the timeline object path used to locate the source timeline object
targetPath - the timeline object path used to locate the target timeline object
Since:
1.0
Method Detail

setSourcePath

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

Specified by:
setSourcePath in interface IRelationship<T>
Parameters:
path - the new source path

getSourcePath

public TimelineObjectPath<T> getSourcePath()
Description copied from interface: IRelationship
Returns the tree path information that can be used to locate the row on which the source timeline object is displayed.

Specified by:
getSourcePath in interface IRelationship<T>
Returns:
the tree path to the row where the source object is located

setTargetPath

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

Specified by:
setTargetPath in interface IRelationship<T>
Parameters:
path - the new target path

getTargetPath

public TimelineObjectPath<T> getTargetPath()
Description copied from interface: IRelationship
Returns the tree path information that can be used to locate the row on which the target timeline object is displayed.

Specified by:
getTargetPath in interface IRelationship<T>
Returns:
the tree path to the row where the target object is located

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object