Class Connector

java.lang.Object
org.graphstream.ui.swing.renderer.shape.Connector
Direct Known Subclasses:
ConnectorShape

public class Connector
extends java.lang.Object
  • Field Summary

    Fields 
    Modifier and Type Field Description
    boolean isDirected
    Is the connector directed ?
    ConnectorSkeleton skel
    We will use it often, better store it.
    org.graphstream.ui.graphicGraph.GraphicEdge theEdge
    The edge, we will also need it often.
    double theSize
    Width of the connector.
    org.graphstream.ui.geom.Point2 theSourceSize
    Overall sizes of the area at the end of the connector.
    org.graphstream.ui.geom.Point2 theTargetSize
    Overall size of the area at the end of the connector.
  • Constructor Summary

    Constructors 
    Constructor Description
    Connector()  
  • Method Summary

    Modifier and Type Method Description
    org.graphstream.ui.geom.Point3 byPos1()
    First control point.
    org.graphstream.ui.geom.Point3 byPos2()
    Second control point.
    void configureConnectorForElement​(org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.GraphicEdge element, ConnectorSkeleton skel)  
    void configureConnectorForGroup​(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.camera.DefaultCamera2D camera)  
    void endPoints​(double sourceWidth, double targetWidth, boolean directed)
    Define the two end points sizes (does not use the style nor the fit size).
    void endPoints​(double sourceWidth, double sourceHeight, double targetWidth, double targetHeight, boolean directed)
    Define the two end points sizes (does not use the style nor the fit size).
    void endPoints​(org.graphstream.ui.graphicGraph.GraphicNode from, org.graphstream.ui.graphicGraph.GraphicNode to, boolean directed, org.graphstream.ui.view.camera.DefaultCamera2D camera)
    Define the two end points sizes using the fit size stored in the nodes.
    void endPoints​(org.graphstream.ui.graphicGraph.StyleGroup sourceStyle, org.graphstream.ui.graphicGraph.StyleGroup targetStyle, boolean directed, org.graphstream.ui.view.camera.DefaultCamera2D camera)  
    org.graphstream.ui.geom.Point3 fromPos()
    Origin point of the connector.
    void positionForLinesAndCurves​(ConnectorSkeleton skel, org.graphstream.ui.graphicGraph.StyleGroup style, org.graphstream.ui.graphicGraph.GraphicNode from, org.graphstream.ui.graphicGraph.GraphicNode to)  
    void positionForLinesAndCurves​(ConnectorSkeleton skel, org.graphstream.ui.graphicGraph.StyleGroup style, org.graphstream.ui.graphicGraph.GraphicNode from, org.graphstream.ui.graphicGraph.GraphicNode to, int multi, org.graphstream.ui.graphicGraph.GraphicEdge.EdgeGroup group)  
    org.graphstream.ui.geom.Point3 toPos()
    Destination of the connector.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • theEdge

      public org.graphstream.ui.graphicGraph.GraphicEdge theEdge
      The edge, we will also need it often.
    • theSize

      public double theSize
      Width of the connector.
    • theTargetSize

      public org.graphstream.ui.geom.Point2 theTargetSize
      Overall size of the area at the end of the connector.
    • theSourceSize

      public org.graphstream.ui.geom.Point2 theSourceSize
      Overall sizes of the area at the end of the connector.
    • isDirected

      public boolean isDirected
      Is the connector directed ?
    • skel

      public ConnectorSkeleton skel
      We will use it often, better store it.
  • Constructor Details

  • Method Details

    • fromPos

      public org.graphstream.ui.geom.Point3 fromPos()
      Origin point of the connector.
    • byPos1

      public org.graphstream.ui.geom.Point3 byPos1()
      First control point. Works only for curves.
    • byPos2

      public org.graphstream.ui.geom.Point3 byPos2()
      Second control point. Works only for curves.
    • toPos

      public org.graphstream.ui.geom.Point3 toPos()
      Destination of the connector.
    • configureConnectorForGroup

      public void configureConnectorForGroup​(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.camera.DefaultCamera2D camera)
    • configureConnectorForElement

      public void configureConnectorForElement​(org.graphstream.ui.view.camera.DefaultCamera2D camera, org.graphstream.ui.graphicGraph.GraphicEdge element, ConnectorSkeleton skel)
    • endPoints

      public void endPoints​(org.graphstream.ui.graphicGraph.GraphicNode from, org.graphstream.ui.graphicGraph.GraphicNode to, boolean directed, org.graphstream.ui.view.camera.DefaultCamera2D camera)
      Define the two end points sizes using the fit size stored in the nodes.
    • endPoints

      public void endPoints​(double sourceWidth, double targetWidth, boolean directed)
      Define the two end points sizes (does not use the style nor the fit size).
    • endPoints

      public void endPoints​(double sourceWidth, double sourceHeight, double targetWidth, double targetHeight, boolean directed)
      Define the two end points sizes (does not use the style nor the fit size).
    • endPoints

      public void endPoints​(org.graphstream.ui.graphicGraph.StyleGroup sourceStyle, org.graphstream.ui.graphicGraph.StyleGroup targetStyle, boolean directed, org.graphstream.ui.view.camera.DefaultCamera2D camera)
    • positionForLinesAndCurves

      public void positionForLinesAndCurves​(ConnectorSkeleton skel, org.graphstream.ui.graphicGraph.StyleGroup style, org.graphstream.ui.graphicGraph.GraphicNode from, org.graphstream.ui.graphicGraph.GraphicNode to)
    • positionForLinesAndCurves

      public void positionForLinesAndCurves​(ConnectorSkeleton skel, org.graphstream.ui.graphicGraph.StyleGroup style, org.graphstream.ui.graphicGraph.GraphicNode from, org.graphstream.ui.graphicGraph.GraphicNode to, int multi, org.graphstream.ui.graphicGraph.GraphicEdge.EdgeGroup group)