y.view
Class PolyLineContainsTest
java.lang.Object
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 PolyLineEdgeRealizer
s.
-
-
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 |
PolyLineContainsTest
public PolyLineContainsTest()
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 EdgeRealizerbends
- the current BendListpath
- 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 EdgeRealizerbends
- the current BendListpath
- the current GeneralPath