y.view
Class PolyLinePathCalculator
java.lang.Object
y.view.PolyLinePathCalculator
- All Implemented Interfaces:
- GenericEdgeRealizer.PathCalculator
public class PolyLinePathCalculator
- extends Object
- implements GenericEdgeRealizer.PathCalculator
Simple GenericEdgeRealizer.PathCalculator
implementation that mimics the calculation
of the path in class PolyLineEdgeRealizer
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PolyLinePathCalculator
public PolyLinePathCalculator()
calculatePath
public byte calculatePath(EdgeRealizer context,
BendList bends,
GeneralPath path,
Point2D sourceIntersectionPointOut,
Point2D targetIntersectionPointOut)
- Description copied from interface:
GenericEdgeRealizer.PathCalculator
- Callback method for
GenericEdgeRealizer.calculatePath(java.awt.geom.Point2D, java.awt.geom.Point2D)
()}.
This method should modify the given path instance and return whether it took into account
the length
of
the source and/or target arrow.
- Specified by:
calculatePath
in interface GenericEdgeRealizer.PathCalculator
- Parameters:
context
- the context EdgeRealizerbends
- the current BendListpath
- the current GeneralPathsourceIntersectionPointOut
- the point to place the source intersection point intargetIntersectionPointOut
- the point to place the target intersection point in
- Returns:
- either
EdgeRealizer.PATH_UNCLIPPED
, EdgeRealizer.PATH_CLIPPED_AT_SOURCE
,
EdgeRealizer.PATH_CLIPPED_AT_TARGET
, or EdgeRealizer.PATH_CLIPPED_AT_SOURCE_AND_TARGET