Class SmoothLineEdgeShape
java.lang.Object
org.graffiti.plugins.views.defaults.LineEdgeShape
org.graffiti.plugins.views.defaults.PolyLineEdgeShape
org.graffiti.plugins.views.defaults.QuadCurveEdgeShape
org.graffiti.plugins.views.defaults.SmoothLineEdgeShape
- All Implemented Interfaces:
Shape
,EdgeShape
,GraffitiShape
,GraphElementShape
public class SmoothLineEdgeShape extends QuadCurveEdgeShape
A class that represents line shapes that are "smooth" in the sense GML uses
it.
- Version:
- $Revision: 1.11 $
-
Field Summary
Fields inherited from class org.graffiti.plugins.views.defaults.LineEdgeShape
hollowSourceArrowShape, hollowTargetArrowShape
Fields inherited from interface org.graffiti.plugin.view.EdgeShape
CLICK_TOLERANCE
-
Constructor Summary
Constructors Constructor Description SmoothLineEdgeShape()
Default constructor. -
Method Summary
Modifier and Type Method Description void
buildShape(EdgeGraphicAttribute edgeAttr, NodeShape sourceShape, NodeShape targetShape)
This method sets all necessary properties of an edge using the values contained within theCollectionAttribute
(like coordinates etc.).Methods inherited from class org.graffiti.plugins.views.defaults.QuadCurveEdgeShape
contains
Methods inherited from class org.graffiti.plugins.views.defaults.PolyLineEdgeShape
getIndexOfPathWhichContains, getXexcess, getYexcess, setCoordinateSystem
Methods inherited from class org.graffiti.plugins.views.defaults.LineEdgeShape
contains, contains, contains, getBounds, getBounds2D, getHeadArrow, getPathIterator, getPathIterator, getRealBounds2D, getTailArrow, intersects, intersects, lineContains
-
Constructor Details
-
SmoothLineEdgeShape
public SmoothLineEdgeShape()Default constructor. Used to ensure that next timebuildShape
is called, the bends are modified.
-
-
Method Details
-
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. WhenmustExpandBends
is true, i.e. it is started the very first time for an object, all line segments except the first and last ones are divided into two equally long segments. That is to ensure that the single quadric splines fit together.- Specified by:
buildShape
in interfaceEdgeShape
- Overrides:
buildShape
in classQuadCurveEdgeShape
- Parameters:
edgeAttr
- the attribute that contains all necessary information to construct a line.sourceShape
- DOCUMENT ME!targetShape
- DOCUMENT ME!- Throws:
ShapeNotFoundException
- DOCUMENT ME!
-