Class SegmentedConnector

java.lang.Object
org.pathvisio.libgpml.model.connector.AbstractConnector
org.pathvisio.libgpml.model.connector.SegmentedConnector
All Implemented Interfaces:
ConnectorShape
Direct Known Subclasses:
ElbowConnectorShape, FreeConnectorShape

public abstract class SegmentedConnector
extends AbstractConnector
Base class for segmented connectors.
Author:
unknown
  • Constructor Details

    • SegmentedConnector

      public SegmentedConnector()
  • Method Details

    • fromLineCoordinate

      protected java.awt.geom.Point2D fromLineCoordinate​(double l, ConnectorShape.Segment[] segments)
      Parameters:
      l -
      segments -
      Returns:
    • calculateShape

      protected java.awt.Shape calculateShape​(ConnectorShape.Segment[] segments)
      Calculates shape from the width of the line endings.
      Specified by:
      calculateShape in class AbstractConnector
      Parameters:
      segments - the array of segments.
      Returns:
      the calculated shape.
    • getTotalLength

      double getTotalLength​(ConnectorShape.Segment[] segments)
      Returns the sum of the lengths of the segments
      Parameters:
      segments - the array of segments.
      Returns:
      the total length of segments.
    • fromLineCoordinate

      public java.awt.geom.Point2D fromLineCoordinate​(double l)
      Translates a 1-dimensional line coordinate to a 2-dimensional view coordinate. The 1-dimensional line coordinate is position objects that are attached to the line.
      Parameters:
      l - the double.
    • toLineCoordinate

      public double toLineCoordinate​(java.awt.geom.Point2D v)
      Translates a 2-dimensional view coordinate to a 1-dimensional line coordinate.
      Parameters:
      v - the Point2D