Search this API

y.layout.router.polyline
Class PathRequest

java.lang.Object
  extended by y.layout.router.polyline.PathRequest

public class PathRequest
extends java.lang.Object

A PathRequest describes a routing request from a source obstacle to a target obstacle which is handled and considered during a PathSearch.

The path that is searched for an edge is potentially split into multiple requests. The path finding algorithm finds a path for each request and, finally, the results are put together to a final, full path for the actual edge. Multiple request are introduced, for example, to model intermediate routing points.

See Also:
PathSearchExtension.initializeCurrentPathRequest(PathSearchContext), PathSearchExtension.cancelCurrentPathRequest(PathSearchContext)
 

Method Summary
 EdgeLayoutDescriptor getDescriptor()
          Returns the EdgeLayoutDescriptor that describes routing settings for this path request.
 Path getFoundPath()
          Returns the path that was found for this path request.
 Obstacle getSource()
          Returns the source obstacle describing the area where this request starts.
 java.util.Collection getSourcePortCandidates()
          Returns the source PortCandidates associated with this path request and describing how the path must connect to the source obstacle.
 Obstacle getTarget()
          Returns the target obstacle describing the area where this request ends.
 java.util.Collection getTargetPortCandidates()
          Returns the target PortCandidates associated with this path request and describing how the path must connect to the target obstacle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSource

public Obstacle getSource()
Returns the source obstacle describing the area where this request starts.

Returns:
the source obstacle of this request

getTarget

public Obstacle getTarget()
Returns the target obstacle describing the area where this request ends.

Returns:
the target obstacle of this request

getDescriptor

public EdgeLayoutDescriptor getDescriptor()
Returns the EdgeLayoutDescriptor that describes routing settings for this path request.

When implementing PathSearchExtensions and using descriptor settings, always this descriptor belonging to the current request should be queried. It may be different from the one originally registered for the edge when there are multiple PathRequests for an edge.

Returns:
the EdgeLayoutDescriptor of this path request

getSourcePortCandidates

public java.util.Collection getSourcePortCandidates()
Returns the source PortCandidates associated with this path request and describing how the path must connect to the source obstacle.

Returns:
the source PortCandidates of this request

getTargetPortCandidates

public java.util.Collection getTargetPortCandidates()
Returns the target PortCandidates associated with this path request and describing how the path must connect to the target obstacle.

Returns:
the target PortCandidates of this request

getFoundPath

public Path getFoundPath()
Returns the path that was found for this path request.

Returns:
the path found for this request or null if none was found yet

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