net.sourceforge.ganttproject
Class GanttTaskRelationship

java.lang.Object
  |
  +--net.sourceforge.ganttproject.GanttTaskRelationship

public class GanttTaskRelationship
extends java.lang.Object

Title:

Description: This class model the four relationships between different tasks.

Start-start: As soon as the predecessor task starts, the successor task can start.

start to finish: As soon as the predecessor task starts, the successor task can finish. This type of link is rarely used, but still available if you need it.

finish to start relationship: As soon as the predecessor task finishes, the successor task can start

finish to finish relationship: As soon as the predecessor task finishes, the successor task can finish


Field Summary
static int FF
           
static int FS
           
static int SF
           
static int SS
           
 
Constructor Summary
GanttTaskRelationship()
          Constructor, do nothing
GanttTaskRelationship(int predecessorTaskID, int successorTaskID, int relationshipType)
          Constructor
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(GanttTaskRelationship compareRel)
           
 GanttTask getPredecessorTask()
          get the predecessor task
 int getPredecessorTaskID()
          get the predecessor task ID or -1 if there is no such ID
 int getRelationshipType()
          get the relationship type
 GanttTask getSuccessorTask()
          get the successor task
 int getSuccessorTaskID()
           
 void setPredecessorTask(GanttTask predecessorTask)
          set the predecessor task by GanttTask object
 void setPredecessorTask(int predecessorTaskID)
          set the predecessor task ID by integer
 void setRelationshipType(int relationshipType)
          set the relationship type
 void setSuccessorTask(GanttTask successorTask)
          set the successor task by GanttTask object
 void setSuccessorTask(int seccessorTaskID)
          set the successor task ID by the integer
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SS

public static final int SS
See Also:
Constant Field Values

FS

public static final int FS
See Also:
Constant Field Values

FF

public static final int FF
See Also:
Constant Field Values

SF

public static final int SF
See Also:
Constant Field Values
Constructor Detail

GanttTaskRelationship

public GanttTaskRelationship()
Constructor, do nothing


GanttTaskRelationship

public GanttTaskRelationship(int predecessorTaskID,
                             int successorTaskID,
                             int relationshipType)
Constructor

Method Detail

getPredecessorTask

public GanttTask getPredecessorTask()
get the predecessor task


getPredecessorTaskID

public int getPredecessorTaskID()
get the predecessor task ID or -1 if there is no such ID


setPredecessorTask

public void setPredecessorTask(GanttTask predecessorTask)
set the predecessor task by GanttTask object


setPredecessorTask

public void setPredecessorTask(int predecessorTaskID)
set the predecessor task ID by integer

Parameters:
predecessorTaskID - ID of predecessor task

getSuccessorTask

public GanttTask getSuccessorTask()
get the successor task


getSuccessorTaskID

public int getSuccessorTaskID()
Returns:
id of successor task

setSuccessorTask

public void setSuccessorTask(GanttTask successorTask)
set the successor task by GanttTask object

Parameters:
successorTask - GanttTask object of successor

setSuccessorTask

public void setSuccessorTask(int seccessorTaskID)
set the successor task ID by the integer


getRelationshipType

public int getRelationshipType()
get the relationship type


setRelationshipType

public void setRelationshipType(int relationshipType)
set the relationship type


equals

public boolean equals(GanttTaskRelationship compareRel)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

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


${copyright}