org.graffiti.plugins.views.defaults
Class StraightLineEdgeShape

java.lang.Object
  extended by org.graffiti.plugins.views.defaults.LineEdgeShape
      extended by 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: 5766 $

Field Summary
 
Fields inherited from interface org.graffiti.plugin.view.EdgeShape
CLICK_TOLERANCE
 
Constructor Summary
StraightLineEdgeShape()
           
 
Method Summary
 void buildShape(EdgeGraphicAttribute edgeAttr, NodeShape sourceShape, NodeShape targetShape)
          This method sets all necessary properties of an edge using the values contained within the CollectionAttribute (like coordinates etc.).
 boolean contains(double x, double y)
          Decides whether or not a point lies within this shape.
 
Methods inherited from class org.graffiti.plugins.views.defaults.LineEdgeShape
contains, contains, contains, getBounds, getBounds2D, getHeadArrow, getLinePath, getPathIterator, getPathIterator, getRealBounds2D, getTailArrow, intersects, intersects, lineContains, setTrimArrows
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StraightLineEdgeShape

public StraightLineEdgeShape()
Method Detail

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.


Generated at 2012-05-30 11:01:25 PM CEST