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 $
-
Field Summary
Fields inherited from class org.graffiti.plugins.views.defaults.LineEdgeShape
hollowSourceArrowShape, hollowTargetArrowShapeFields inherited from interface org.graffiti.plugin.view.EdgeShape
CLICK_TOLERANCE -
Constructor Summary
Constructors Constructor Description StraightLineEdgeShape() -
Method Summary
Modifier and Type Method Description voidbuildShape(EdgeGraphicAttribute edgeAttr, NodeShape sourceShape, NodeShape targetShape)This method sets all necessary properties of an edge using the values contained within theCollectionAttribute(like coordinates etc.).booleancontains(double x, double y)Decides whether or not a point lies within this shape.PathIteratorgetPathIterator(AffineTransform t)DOCUMENT ME!PathIteratorgetPathIterator(AffineTransform t, double d)DOCUMENT ME!doublegetXexcess()doublegetYexcess()voidsetCoordinateSystem(CoordinateSystem coordinates)Methods inherited from class org.graffiti.plugins.views.defaults.LineEdgeShape
contains, contains, contains, getBounds, getBounds2D, getHeadArrow, getRealBounds2D, getTailArrow, intersects, intersects, lineContains
-
Constructor Details
-
StraightLineEdgeShape
public StraightLineEdgeShape()
-
-
Method Details
-
getPathIterator
Description copied from class:LineEdgeShapeDOCUMENT ME!- Specified by:
getPathIteratorin interfaceShape- Overrides:
getPathIteratorin classLineEdgeShape- Parameters:
t- DOCUMENT ME!d- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPathIterator
DOCUMENT ME!- Specified by:
getPathIteratorin interfaceShape- Overrides:
getPathIteratorin classLineEdgeShape- Parameters:
t- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
buildShape
public void buildShape(EdgeGraphicAttribute edgeAttr, NodeShape sourceShape, NodeShape targetShape) throws ShapeNotFoundExceptionThis method sets all necessary properties of an edge using the values contained within theCollectionAttribute(like coordinates etc.). It also uses information about ports. It attaches arrows if there are any.- Specified by:
buildShapein interfaceEdgeShape- Specified by:
buildShapein classLineEdgeShape- 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:
containsin interfaceShape- Specified by:
containsin classLineEdgeShape- 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
-
getXexcess
public double getXexcess() -
getYexcess
public double getYexcess()
-