Search this API

y.view
Interface NodePort.IntersectionTest

All Known Implementing Classes:
PortConfigurationAdapter, ShapePortConfiguration
Enclosing class:
NodePort

public static interface NodePort.IntersectionTest

This interface is used by NodePort to delegate the work of the NodePort.findIntersection(double, double, double, double, java.awt.geom.Point2D) method to.

Classes implementing this interface should query the given context port instance for the necessary information each time the methods are called since instances of this interface will be shared for multiple NodePort instances.

 

Method Summary
 boolean findIntersection(NodePort port, double ix, double iy, double ox, double oy, java.awt.geom.Point2D result)
          Returns true if the point i=(ix,iy) lies inside and the point o=(ox,oy) lies outside the specified port and false< otherwise.
 

Method Detail

findIntersection

boolean findIntersection(NodePort port,
                         double ix,
                         double iy,
                         double ox,
                         double oy,
                         java.awt.geom.Point2D result)
Returns true if the point i=(ix,iy) lies inside and the point o=(ox,oy) lies outside the specified port and false< otherwise.

Callback method for NodePort.findIntersection(double, double, double, double, java.awt.geom.Point2D).

Parameters:
port - the port instance to check.
ix - the x-coordinate of the point that has to lie inside the port.
iy - the y-coordinate of the point that has to lie inside the port.
ox - the x-coordinate of the point that has to lie outside the port.
oy - the y-coordinate of the point that has to lie outside the port.
result - an output parameter to store the intersection of the line segment through i and o and the port. If this method returns false, the value of this parameter is undefined.
Returns:
true if (ix,iy) lies inside and (ox,oy) lies outside the specified port and false< otherwise.

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