Class PolyLineEdgeShape

java.lang.Object
org.graffiti.plugins.views.defaults.LineEdgeShape
org.graffiti.plugins.views.defaults.PolyLineEdgeShape
All Implemented Interfaces:
Shape, EdgeShape, GraffitiShape, GraphElementShape
Direct Known Subclasses:
QuadCurveEdgeShape

public class PolyLineEdgeShape
extends LineEdgeShape
Represents an edge with several segments separated by bends.
Version:
$Revision: 1.16 $
  • Constructor Details

    • PolyLineEdgeShape

      public PolyLineEdgeShape()
  • Method Details

    • buildShape

      public void buildShape​(EdgeGraphicAttribute edgeAttr, NodeShape sourceShape, NodeShape targetShape) throws ShapeNotFoundException
      This method sets all necessary properties of an edge using the values contained within the CollectionAttribute (like coordinates etc.). It also uses information about ports. It attaches arrows if there are any.
      Specified by:
      buildShape in interface EdgeShape
      Specified by:
      buildShape in class LineEdgeShape
      Parameters:
      edgeAttr - the attribute that contains all necessary information to construct a line.
      sourceShape - DOCUMENT ME!
      targetShape - DOCUMENT ME!
      Throws:
      ShapeNotFoundException - DOCUMENT ME!
    • contains

      public boolean contains​(double x, double y)
      Returns true if the edge has been hit.
      Specified by:
      contains in interface Shape
      Specified by:
      contains in class LineEdgeShape
      Parameters:
      x - x coordinate relative to the coordinates of this shape.
      y - y coordinate relative to the coordinates of this shape.
      Returns:
      true if the edge has been hit else false.
    • getIndexOfPathWhichContains

      public int getIndexOfPathWhichContains​(double x, double y)
    • setCoordinateSystem

      public void setCoordinateSystem​(CoordinateSystem coordinates)
    • getXexcess

      public double getXexcess()
    • getYexcess

      public double getYexcess()