public static interface PortCandidateSet.ICandidateMatcher
PortCandidateSet.ICandidateMatcher
retrieves the best matching entries
from a PortCandidateSet
.
How well a candidate is matching can be decided based on its cost, its currently available capacity, its offsets or whether or not its direction is consistent with the desired one.
To use custom implementations of this interface, method PortCandidateSet.createMatcher()
should be overridden.
Modifier and Type | Method and Description |
---|---|
PortCandidateSet.IEntry |
findMatchingCandidate()
Returns the next best matching
PortCandidateSet.IEntry . |
PortCandidateSet.IEntry |
findMatchingCandidate(Edge edge,
boolean source,
double xOffset,
double yOffset,
PortDirections directionMask)
Returns the next best matching
PortCandidateSet.IEntry for the given parameters. |
PortCandidateSet.IEntry |
findMatchingCandidate(Edge edge,
boolean source,
PortDirections directionMask)
Returns the next best matching
PortCandidateSet.IEntry for the given parameters. |
PortCandidateSet.IEntry findMatchingCandidate()
PortCandidateSet.IEntry
.PortCandidateSet.IEntry
instancePortCandidateSet.IEntry findMatchingCandidate(Edge edge, boolean source, double xOffset, double yOffset, PortDirections directionMask)
PortCandidateSet.IEntry
for the given parameters.edge
- the edge for which to find a candidatesource
- true
if the given edge connects to its source node, false
otherwisexOffset
- the preferred X-offset of the port relative to the center of the nodeyOffset
- the preferred Y-offset of the port relative to the center of the nodedirectionMask
- any combination of default directions defined in PortCandidate
PortCandidateSet.IEntry
instancePortCandidateSet.IEntry findMatchingCandidate(Edge edge, boolean source, PortDirections directionMask)
PortCandidateSet.IEntry
for the given parameters.edge
- the edge for which to find a candidatesource
- true
if the given edge connects to its source node, false
otherwisedirectionMask
- any combination of default directions defined in PortCandidate
PortCandidateSet.IEntry
instance