Search this API

y.layout.router
Class ChannelEdgeRouter.OrthogonalShortestPathPathFinder

java.lang.Object
  extended by y.layout.AbstractLayoutStage
      extended by y.layout.router.OrthogonalEdgeRouter
          extended by y.layout.router.ChannelEdgeRouter.OrthogonalShortestPathPathFinder
All Implemented Interfaces:
Layouter, LayoutStage
Enclosing class:
ChannelEdgeRouter

public static class ChannelEdgeRouter.OrthogonalShortestPathPathFinder
extends OrthogonalEdgeRouter

This routing algorithm is a special version of class OrthogonalEdgeRouter that can be used as a path finding strategy for the ChannelEdgeRouter.

This strategy takes a bit longer than the one implemented by class OrthogonalPatternEdgeRouter but it guarantees that there are no crossings between nodes and edges.

 
Your browser does not support SVG content.

Field Summary
 
Fields inherited from class y.layout.router.OrthogonalEdgeRouter
MONOTONIC_BOTH, MONOTONIC_HORIZONTAL, MONOTONIC_NONE, MONOTONIC_VERTICAL, ROUTE_ALL_EDGES, ROUTE_EDGES_AT_SELECTED_NODES, ROUTE_SELECTED_EDGES, STYLE_ADHOC, STYLE_BALANCED, STYLE_PREFERMIDDLE, STYLE_SHORTPATH
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
ChannelEdgeRouter.OrthogonalShortestPathPathFinder()
          Creates a new instance of ChannelEdgeRouter.OrthogonalShortestPathPathFinder.
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Checks whether or not the given graph can be handled by this class.
 void doLayout(LayoutGraph graph)
          Performs the path finding for the edges of the input graph.
 java.lang.Object getAffectedEdgesDPKey()
          Returns the DataProvider key to look up the selection state of the edges.
 void setAffectedEdgesDPKey(java.lang.Object key)
          Specifies the DataProvider key to look up the selection state of the edges.
 
Methods inherited from class y.layout.router.OrthogonalEdgeRouter
checkGroupNodeSize, checkNodeSize, getBadOrthogonal, getCenterToSpaceRatio, getCoupledDistances, getCrossingCost, getCustomBorderCapacity, getCustomBorderCapacityEnabled, getGridOrigin, getGridSpacing, getMinimumDistance, getMinimumDistanceToNode, getMonotonicPathRestriction, getRoutingStyle, getSelectedEdgesDpKey, getSelectedNodesDpKey, getSphereOfAction, isConsiderNodeLabelsEnabled, isEnforceMonotonicPathRestrictions, isGridRoutingEnabled, isInnerPortsEnabled, isLocalCrossingMinimizationEnabled, isReroutingEnabled, setBadOrthogonal, setCenterToSpaceRatio, setConsiderNodeLabelsEnabled, setCoupledDistances, setCrossingCost, setCustomBorderCapacity, setCustomBorderCapacityEnabled, setEnforceMonotonicPathRestrictions, setGridOrigin, setGridRoutingEnabled, setGridSpacing, setInnerPortsEnabled, setLocalCrossingMinimizationEnabled, setMinimumDistance, setMinimumDistanceToNode, setMonotonicPathRestriction, setReroutingEnabled, setRoutingStyle, setSelectedEdgesDpKey, setSelectedNodesDpKey, setSphereOfAction
 
Methods inherited from class y.layout.AbstractLayoutStage
canLayoutCore, doLayoutCore, getCoreLayouter, setCoreLayouter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelEdgeRouter.OrthogonalShortestPathPathFinder

public ChannelEdgeRouter.OrthogonalShortestPathPathFinder()
Creates a new instance of ChannelEdgeRouter.OrthogonalShortestPathPathFinder.

Method Detail

canLayout

public boolean canLayout(LayoutGraph graph)
Checks whether or not the given graph can be handled by this class. This is always true unless the user specifies a core layout algorithm that cannot handle this graph.

Specified by:
canLayout in interface Layouter
Overrides:
canLayout in class OrthogonalEdgeRouter
Parameters:
graph - the input graph
Returns:
true if the input graph can be handled by this class, false otherwise
See Also:
Layouter.doLayout(LayoutGraph)

doLayout

public void doLayout(LayoutGraph graph)
Performs the path finding for the edges of the input graph.

Specified by:
doLayout in interface Layouter
Overrides:
doLayout in class OrthogonalEdgeRouter
 
The given graph will not be copied during the edge routing process and the result will be immediately applied to the input graph.
Parameters:
graph - the input graph
See Also:
Layouter.canLayout(LayoutGraph)

setAffectedEdgesDPKey

public void setAffectedEdgesDPKey(java.lang.Object key)
Specifies the DataProvider key to look up the selection state of the edges.

If a DataProvider is registered with this key, only the selected edges will be routed by this edge routing algorithm, while all other edges will be considered to have fixed routes.

Default Value:
The default value is ChannelEdgeRouter.AFFECTED_EDGES
Parameters:
key - the DataProvider key for edge selection
Throws:
java.lang.IllegalArgumentException - if the specified DataProvider key is null

getAffectedEdgesDPKey

public java.lang.Object getAffectedEdgesDPKey()
Returns the DataProvider key to look up the selection state of the edges.

If a DataProvider is registered with this key, only the selected edges will be routed by this edge routing algorithm, while all other edges will be considered to have fixed routes.

Returns:
the DataProvider key for edge selection
See Also:
(Object)

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