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.Object
clone()
Clones the GanttConnection (and adds the clone to the parent)void
dispose()
Disposes this connectionboolean
equals(java.lang.Object obj)
org.eclipse.swt.graphics.Color
getColor()
Returns the color of the line drawn in the connection.GanttEvent
getSource()
Returns the source event of this connection.GanttEvent
getTarget()
Returns the target event of this connection.void
setColor(org.eclipse.swt.graphics.Color color)
Sets the color of the line drawn in the connection.(package private) void
setParentComposite(GanttComposite _parent)
Set the parent compositevoid
setSource(GanttEvent source)
Sets the source event of this connection.void
setTarget(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:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-