Search this API

y.layout
Class PartitionLayouter.ChannelInterEdgeRouter

java.lang.Object
  extended by y.layout.PartitionLayouter.ChannelInterEdgeRouter
All Implemented Interfaces:
PartitionLayouter.InterEdgeRouter
Enclosing class:
PartitionLayouter

public static class PartitionLayouter.ChannelInterEdgeRouter
extends java.lang.Object
implements PartitionLayouter.InterEdgeRouter

PartitionLayouter.ChannelInterEdgeRouter routes inter-edges using ChannelEdgeRouter.

 

Constructor Summary
PartitionLayouter.ChannelInterEdgeRouter()
          Creates a new PartitionLayouter.ChannelInterEdgeRouter instance with default settings.
 
Method Summary
 ChannelEdgeRouter getChannelEdgeRouter()
          Returns the ChannelEdgeRouter instance used for inter-edge routing.
 java.lang.Object getInterEdgeDPKey()
          Returns the DataProvider key which is used for registering the inter-edge DataProvider passed to routeInterEdges(LayoutGraph, DataProvider, DataProvider) with the given graph.
 double getMargin()
          Returns the maximum relative distance between an edge and its closest node for edges that are routed outside the bounding box of all graph nodes.
 boolean isRouteInterEdgesOnly()
          Returns whether or not to route inter-edges only.
 void routeInterEdges(LayoutGraph graph, DataProvider partitionIDDP, DataProvider interEdgeDP)
          Routes inter-edges of the partitioned graph.
 void setChannelEdgeRouter(ChannelEdgeRouter router)
          Specifies the ChannelEdgeRouter instance used for inter-edge routing.
 void setInterEdgeDPKey(java.lang.Object key)
          Specifies the DataProvider key which is used for registering the inter-edge DataProvider passed to routeInterEdges(LayoutGraph, DataProvider, DataProvider) with the given graph.
 void setMargin(double margin)
          Specifies the maximum relative distance between an edge and its closest node for edges that are routed outside the bounding box of all graph nodes.
 void setRouteInterEdgesOnly(boolean b)
          Specifies whether or not to route inter-edges only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartitionLayouter.ChannelInterEdgeRouter

public PartitionLayouter.ChannelInterEdgeRouter()
Creates a new PartitionLayouter.ChannelInterEdgeRouter instance with default settings.

Method Detail

isRouteInterEdgesOnly

public boolean isRouteInterEdgesOnly()
Returns whether or not to route inter-edges only.

Inter-edges are edges that connect nodes from different partitions. If this feature is disabled, all edges are routed by this routing algorithm.

Returns:
true if only inter-edges are routed, false otherwise
See Also:
setRouteInterEdgesOnly(boolean), routeInterEdges(LayoutGraph, DataProvider, DataProvider)

setRouteInterEdgesOnly

public void setRouteInterEdgesOnly(boolean b)
Specifies whether or not to route inter-edges only.

Inter-edges are edges that connect nodes from different partitions. If this feature is disabled, all edges are routed by this routing algorithm.

Default Value:
The default value is false. All edges are routed.
Parameters:
b - true if only inter-edges should be routed, false otherwise
See Also:
routeInterEdges(LayoutGraph, DataProvider, DataProvider)

getInterEdgeDPKey

public java.lang.Object getInterEdgeDPKey()
Returns the DataProvider key which is used for registering the inter-edge DataProvider passed to routeInterEdges(LayoutGraph, DataProvider, DataProvider) with the given graph.

Returns:
the DataProvider key used for registering the inter-edge DataProvider
See Also:
setInterEdgeDPKey(Object)

setInterEdgeDPKey

public void setInterEdgeDPKey(java.lang.Object key)
Specifies the DataProvider key which is used for registering the inter-edge DataProvider passed to routeInterEdges(LayoutGraph, DataProvider, DataProvider) with the given graph.

Default Value:
The default value is Layouter.SELECTED_EDGES
Parameters:
key - the DataProvider key used for registering the inter-edge DataProvider

getChannelEdgeRouter

public ChannelEdgeRouter getChannelEdgeRouter()
Returns the ChannelEdgeRouter instance used for inter-edge routing.

Returns:
the edge routing algorithm that is used
See Also:
setChannelEdgeRouter(ChannelEdgeRouter)

setChannelEdgeRouter

public void setChannelEdgeRouter(ChannelEdgeRouter router)
Specifies the ChannelEdgeRouter instance used for inter-edge routing.

Default Value:
The default value is ChannelEdgeRouter. A ChannelEdgeRouter with default settings is used.
Parameters:
router - the edge routing algorithm that should be used

getMargin

public double getMargin()
Returns the maximum relative distance between an edge and its closest node for edges that are routed outside the bounding box of all graph nodes. The value is relative in the way that edges to the left or right of the nodes' bounding box must satisfy dist(edge, bounding box) <= (bounding box width) * margin and edges above or below the nodes' bounding box must satisfy dist(edge, bounding box) <= (bounding box height) * margin. Specifying a negative margin value effectively allows edges to be arbitrarily far from their closest nodes.

Returns:
the maximum relative distance between edge and closest node
See Also:
setMargin(double)

setMargin

public void setMargin(double margin)
Specifies the maximum relative distance between an edge and its closest node for edges that are routed outside the bounding box of all graph nodes. The value is relative in the way that edges to the left or right of the nodes' bounding box must satisfy dist(edge, bounding box) <= (bounding box width) * margin and edges above or below the nodes' bounding box must satisfy dist(edge, bounding box) <= (bounding box height) * margin. Specifying a negative margin value effectively allows edges to be arbitrarily far from their closest nodes.

Default Value:
The default value is -1.0.
Parameters:
margin - the maximum relative distance between an edge and its closest node

routeInterEdges

public void routeInterEdges(LayoutGraph graph,
                            DataProvider partitionIDDP,
                            DataProvider interEdgeDP)
Routes inter-edges of the partitioned graph.

Specified by:
routeInterEdges in interface PartitionLayouter.InterEdgeRouter
Parameters:
graph - the input graph
partitionIDDP - the partition ID for each node in the graph
interEdgeDP - the map that marks inter-edges
See Also:
getInterEdgeDPKey(), setInterEdgeDPKey(Object)

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