Class GanttConnection
java.lang.Object
org.eclipse.nebula.widgets.ganttchart.GanttConnection
- All Implemented Interfaces:
java.lang.Cloneable
public class GanttConnection
extends java.lang.Object
implements java.lang.Cloneable
This class represents one connection between two events in one direction. You may create a connection by using this class, or do it the slightly easier way by calling
GanttChart.addConnection(GanttEvent, GanttEvent) on the GanttChart.-
Constructor Summary
Constructors Constructor Description GanttConnection()GanttConnection(GanttChart parent, GanttEvent source, GanttEvent target)Creates a new connection between two events.GanttConnection(GanttChart parent, GanttEvent source, GanttEvent target, org.eclipse.swt.graphics.Color lineColor)Creates a new connection between two events and gives the connecting line a specific color.GanttConnection(GanttEvent source, GanttEvent target, org.eclipse.swt.graphics.Color color) -
Method Summary
Modifier and Type Method Description java.lang.Objectclone()Clones the GanttConnection (and adds the clone to the parent)voiddispose()Disposes this connectionbooleanequals(java.lang.Object obj)org.eclipse.swt.graphics.ColorgetColor()Returns the color of the line drawn in the connection.GanttEventgetSource()Returns the source event of this connection.GanttEventgetTarget()Returns the target event of this connection.voidsetColor(org.eclipse.swt.graphics.Color color)Sets the color of the line drawn in the connection.(package private) voidsetParentComposite(GanttComposite _parent)Set the parent compositevoidsetSource(GanttEvent source)Sets the source event of this connection.voidsetTarget(GanttEvent target)Sets the target event of this connection.
-
Constructor Details
-
GanttConnection
GanttConnection() -
GanttConnection
GanttConnection(GanttEvent source, GanttEvent target, org.eclipse.swt.graphics.Color color) -
GanttConnection
Creates a new connection between two events.- Parameters:
parent- Gantt Chart parentsource- Source eventtarget- Target event
-
GanttConnection
public GanttConnection(GanttChart parent, GanttEvent source, GanttEvent target, org.eclipse.swt.graphics.Color lineColor)Creates a new connection between two events and gives the connecting line a specific color.- Parameters:
parent- Gantt Chart parentsource- Source eventtarget- Target eventlineColor- Color of line and arrowhead drawn between the events
-
-
Method Details
-
getSource
Returns the source event of this connection.- Returns:
- Source event
-
setSource
Sets the source event of this connection.- Parameters:
source- Source event
-
getTarget
Returns the target event of this connection.- Returns:
- Target event
-
setTarget
Sets the target event of this connection.- Parameters:
target- Target event
-
getColor
public org.eclipse.swt.graphics.Color getColor()Returns the color of the line drawn in the connection.- Returns:
- Color
-
setColor
public void setColor(org.eclipse.swt.graphics.Color color)Sets the color of the line drawn in the connection.- Parameters:
color- Color or null for default color.
-
dispose
public void dispose()Disposes this connection -
setParentComposite
Set the parent composite- Parameters:
_parent-
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionClones the GanttConnection (and adds the clone to the parent)- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-