Search this API

y.view
Class PolyLinePathCalculator

java.lang.Object
  extended by y.view.PolyLinePathCalculator
All Implemented Interfaces:
GenericEdgeRealizer.PathCalculator

public class PolyLinePathCalculator
extends java.lang.Object
implements GenericEdgeRealizer.PathCalculator

Calculates the visible path of an edge as a polyline. The behavior of this path calculator is similar to the path calculated for class PolyLineEdgeRealizer.

 

Constructor Summary
PolyLinePathCalculator()
          Initializes a new PolyLinePathCalculator instance.
 
Method Summary
 byte calculatePath(EdgeRealizer context, BendList bends, java.awt.geom.GeneralPath path, java.awt.geom.Point2D sourceIntersectionPointOut, java.awt.geom.Point2D targetIntersectionPointOut)
          Calculates the visible path of an edge as a polyline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolyLinePathCalculator

public PolyLinePathCalculator()
Initializes a new PolyLinePathCalculator instance.

Method Detail

calculatePath

public byte calculatePath(EdgeRealizer context,
                          BendList bends,
                          java.awt.geom.GeneralPath path,
                          java.awt.geom.Point2D sourceIntersectionPointOut,
                          java.awt.geom.Point2D targetIntersectionPointOut)
Calculates the visible path of an edge as a polyline. The given realizer's bends are the control points for the polyline.

Specified by:
calculatePath in interface GenericEdgeRealizer.PathCalculator
Parameters:
context - the context EdgeRealizer
bends - the current BendList
path - the current GeneralPath
sourceIntersectionPointOut - the point to place the source intersection point in
targetIntersectionPointOut - the point to place the target intersection point in
Returns:
one of EdgeRealizer.PATH_UNCLIPPED, EdgeRealizer.PATH_CLIPPED_AT_SOURCE, EdgeRealizer.PATH_CLIPPED_AT_TARGET, or EdgeRealizer.PATH_CLIPPED_AT_SOURCE_AND_TARGET.

© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.