Class StraightLineEdgeShape

java.lang.Object
org.graffiti.plugins.views.defaults.LineEdgeShape
org.graffiti.plugins.views.defaults.StraightLineEdgeShape
All Implemented Interfaces:
Shape, EdgeShape, GraffitiShape, GraphElementShape

public class StraightLineEdgeShape
extends LineEdgeShape
Concrete class representing an edge as one straight line.
Version:
$Revision: 1.15 $
  • Constructor Details

    • StraightLineEdgeShape

      public StraightLineEdgeShape()
  • Method Details

    • getPathIterator

      public PathIterator getPathIterator​(AffineTransform t, double d)
      Description copied from class: LineEdgeShape
      DOCUMENT ME!
      Specified by:
      getPathIterator in interface Shape
      Overrides:
      getPathIterator in class LineEdgeShape
      Parameters:
      t - DOCUMENT ME!
      d - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getPathIterator

      public PathIterator getPathIterator​(AffineTransform t)
      DOCUMENT ME!
      Specified by:
      getPathIterator in interface Shape
      Overrides:
      getPathIterator in class LineEdgeShape
      Parameters:
      t - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • 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)
      Decides whether or not a point lies within this shape.
      Specified by:
      contains in interface Shape
      Specified by:
      contains in class LineEdgeShape
      Parameters:
      x - the x-coordinate of the point to check.
      y - the y-coordinate of the point to check.
      Returns:
      true if the point lies within this shape.
    • setCoordinateSystem

      public void setCoordinateSystem​(CoordinateSystem coordinates)
    • getXexcess

      public double getXexcess()
    • getYexcess

      public double getYexcess()