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 connection
    boolean 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 composite
    void setSource​(GanttEvent source)
    Sets the source event of this connection.
    void setTarget​(GanttEvent target)
    Sets the target event of this connection.

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 parent
      source - Source event
      target - 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 parent
      source - Source event
      target - Target event
      lineColor - Color of line and arrowhead drawn between the events
  • Method Details

    • 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.CloneNotSupportedException
      Clones the GanttConnection (and adds the clone to the parent)
      Overrides:
      clone in class java.lang.Object
      Throws:
      java.lang.CloneNotSupportedException
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object