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.CloneableThis 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 callingGanttChart.addConnection(GanttEvent, GanttEvent)on theGanttChart.
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.graphics.Color_colorprivate GanttComposite_parentprivate GanttEvent_sourceprivate GanttEvent_target
-
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
All Methods Instance Methods Concrete Methods 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.
-
-
-
Field Detail
-
_source
private GanttEvent _source
-
_target
private GanttEvent _target
-
_color
private org.eclipse.swt.graphics.Color _color
-
_parent
private GanttComposite _parent
-
-
Constructor Detail
-
GanttConnection
GanttConnection()
-
GanttConnection
GanttConnection(GanttEvent source, GanttEvent target, org.eclipse.swt.graphics.Color color)
-
GanttConnection
public GanttConnection(GanttChart parent, GanttEvent source, GanttEvent target)
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 Detail
-
getSource
public GanttEvent getSource()
Returns the source event of this connection.- Returns:
- Source event
-
setSource
public void setSource(GanttEvent source)
Sets the source event of this connection.- Parameters:
source- Source event
-
getTarget
public GanttEvent getTarget()
Returns the target event of this connection.- Returns:
- Target event
-
setTarget
public void setTarget(GanttEvent target)
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
void setParentComposite(GanttComposite _parent)
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
-
-