Search this API

y.view
Class PolyLineContainsTest

java.lang.Object
  extended by y.view.PolyLineContainsTest
All Implemented Interfaces:
GenericEdgeRealizer.ContainsTest

public class PolyLineContainsTest
extends java.lang.Object
implements GenericEdgeRealizer.ContainsTest

This implementation of the GenericEdgeRealizer.ContainsTest interface uses the polyline defined by the control points of an edge for answering queries. The control points are the source intersection followed by the bends and finally the target intersection. For self loops with one bend the distance to the circle defined by the source port and the single bend is considered. The path of the edge is ignored in any case. The behavior is similar to PolyLineEdgeRealizers.

 

Constructor Summary
PolyLineContainsTest()
           
 
Method Summary
 boolean contains(EdgeRealizer context, BendList bends, java.awt.geom.GeneralPath path, double x, double y)
          Callback method for EdgeRealizer.contains(double, double).
 int containsSeg(EdgeRealizer context, BendList bends, java.awt.geom.GeneralPath path, double x, double y)
          Callback method for EdgeRealizer.containsSeg(double, double).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolyLineContainsTest

public PolyLineContainsTest()
Method Detail

contains

public boolean contains(EdgeRealizer context,
                        BendList bends,
                        java.awt.geom.GeneralPath path,
                        double x,
                        double y)
Description copied from interface: GenericEdgeRealizer.ContainsTest
Callback method for EdgeRealizer.contains(double, double).

Specified by:
contains in interface GenericEdgeRealizer.ContainsTest
Parameters:
context - the context EdgeRealizer
bends - the current BendList
path - the current GeneralPath

containsSeg

public int containsSeg(EdgeRealizer context,
                       BendList bends,
                       java.awt.geom.GeneralPath path,
                       double x,
                       double y)
Description copied from interface: GenericEdgeRealizer.ContainsTest
Callback method for EdgeRealizer.containsSeg(double, double).

Specified by:
containsSeg in interface GenericEdgeRealizer.ContainsTest
Parameters:
context - the context EdgeRealizer
bends - the current BendList
path - the current GeneralPath

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