Search this API

y.layout.router
Class CollinearBendHider

java.lang.Object
  extended by y.layout.AbstractLayoutStage
      extended by y.layout.router.CollinearBendHider
All Implemented Interfaces:
Layouter, LayoutStage

public class CollinearBendHider
extends AbstractLayoutStage

CollinearBendHider temporarily hides collinear bends on edge paths.

The bends are hidden before invoking the core layout algorith and reinserted afterwards. This may be necessary to keep an EdgeLayout fixed without having the collinear bends influencing the layout.

 

Field Summary
static java.lang.Object SELECTED_EDGES
          A DataProvider key for selecting edges whose bends will be temporarily hidden If there is no DataProvider registered with this key, all edges are considered.
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_NODES
 
Constructor Summary
CollinearBendHider(Layouter coreLayouter)
          Creates a new instance of CollinearBendHider using the given core layout algorithm.
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Accepts all general graphs.
 void doLayout(LayoutGraph graph)
          Hides collinear bends of the selected edges before invoking the core layout algorithm.
 
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
 

Field Detail

SELECTED_EDGES

public static final java.lang.Object SELECTED_EDGES
A DataProvider key for selecting edges whose bends will be temporarily hidden

If there is no DataProvider registered with this key, all edges are considered.

Constructor Detail

CollinearBendHider

public CollinearBendHider(Layouter coreLayouter)
Creates a new instance of CollinearBendHider using the given core layout algorithm.

Parameters:
coreLayouter - the core layout algorithm
Method Detail

canLayout

public boolean canLayout(LayoutGraph graph)
Accepts all general graphs.

Parameters:
graph - the input graph
Returns:
true for all input graphs
See Also:
Layouter.doLayout(LayoutGraph)

doLayout

public void doLayout(LayoutGraph graph)
Hides collinear bends of the selected edges before invoking the core layout algorithm. The temporarily hidden bends are reinserted afterwards.

Parameters:
graph - the input graph
See Also:
Layouter.canLayout(LayoutGraph)

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