Search this API

y.layout.partial
Class PartialLayouter.StraightLineEdgeRouter

java.lang.Object
  extended by y.layout.partial.PartialLayouter.StraightLineEdgeRouter
All Implemented Interfaces:
Layouter
Enclosing class:
PartialLayouter

public static class PartialLayouter.StraightLineEdgeRouter
extends Object
implements Layouter

Simple Edge Router that draws edges straight-line.


Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
PartialLayouter.StraightLineEdgeRouter()
           
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Returns true iff the given graph can be laid out by this algorithm.
 void doLayout(LayoutGraph graph)
          Main layout routine that assigns new layout information to the given graph.
 Object getSelectedEdgesDpKey()
          Returns the DataProvider key to mark edges as selected.
 void setSelectedEdgesDpKey(Object key)
          Specifies the DataProvider key to mark edges as selected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartialLayouter.StraightLineEdgeRouter

public PartialLayouter.StraightLineEdgeRouter()
Method Detail

getSelectedEdgesDpKey

public Object getSelectedEdgesDpKey()
Returns the DataProvider key to mark edges as selected.

By default, Layouter.SELECTED_EDGES is used.

Returns:
the DataProvider key to mark edges as selected.
See Also:
setSelectedEdgesDpKey(Object)

setSelectedEdgesDpKey

public void setSelectedEdgesDpKey(Object key)
Specifies the DataProvider key to mark edges as selected.

By default, Layouter.SELECTED_EDGES is used.

Throws:
IllegalArgumentException - if the specified key is null.
Parameters:
key - DataProvider key.
See Also:
getSelectedEdgesDpKey()

canLayout

public boolean canLayout(LayoutGraph graph)
Description copied from interface: Layouter
Returns true iff the given graph can be laid out by this algorithm. Calling doLayout with the given graph as its argument will only success if this method returns true.

Specified by:
canLayout in interface Layouter

doLayout

public void doLayout(LayoutGraph graph)
Description copied from interface: Layouter
Main layout routine that assigns new layout information to the given graph.

Specified by:
doLayout in interface Layouter

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