y.layout.grouping
Class FixedGroupLayoutStage

java.lang.Object
  |
  +--y.layout.AbstractLayoutStage
        |
        +--y.layout.grouping.FixedGroupLayoutStage
All Implemented Interfaces:
Layouter, LayoutStage

public class FixedGroupLayoutStage
extends AbstractLayoutStage

A layout stage for hierarchically grouped graphs. Activating this stage guarantees that a core layouter will keep the relative positions of nodes within the same group. Also, this stage is responsible for routing edges that connect nodes belonging to hierarchically unrelated groups.


Field Summary
static byte ROUTING_STYLE_ADOPT
          Inter-edge routing style specifier.
static byte ROUTING_STYLE_ORTHOGONAL
          Inter-edge routing style specifier.
static byte ROUTING_STYLE_STRAIGHTLINE
          Inter-edge routing style specifier.
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
FixedGroupLayoutStage()
          Creates a new instance of FixedGroupLayoutStage
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Returns true iff the given graph can be layed out by this algorithm.
 void doLayout(LayoutGraph graph)
          Assigns a new graph layout to the given layout graph.
 byte getInterEdgeroutingStyle()
          Returns the inter-edge routing style used by this layouter.
 Layouter getOrthogonalEdgeRouter()
          Returns the orthogonal edge router instance used to route the inter-edges orthogonally.
 void setInterEdgeRoutingStyle(byte routingStyle)
          Sets the inter-edge routing style used by this layouter.
 void setOrthogonalEdgeRouter(Layouter edgeRouter)
          Sets the orthogonal edge router instance used to route the inter-edges orthogonally.
 
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

ROUTING_STYLE_ADOPT

public static byte ROUTING_STYLE_ADOPT
Inter-edge routing style specifier. Adopts the edge layout from the core layouter.


ROUTING_STYLE_ORTHOGONAL

public static byte ROUTING_STYLE_ORTHOGONAL
Inter-edge routing style specifier. Routes the inter-edges in an orthogonal style.

See Also:
FixedGroupLayoutStage.getOrthogonalEdgeRouter()

ROUTING_STYLE_STRAIGHTLINE

public static byte ROUTING_STYLE_STRAIGHTLINE
Inter-edge routing style specifier. Routes the inter-edges as a straight line.

Constructor Detail

FixedGroupLayoutStage

public FixedGroupLayoutStage()
Creates a new instance of FixedGroupLayoutStage

Method Detail

setInterEdgeRoutingStyle

public void setInterEdgeRoutingStyle(byte routingStyle)
Sets the inter-edge routing style used by this layouter.


getInterEdgeroutingStyle

public byte getInterEdgeroutingStyle()
Returns the inter-edge routing style used by this layouter.


setOrthogonalEdgeRouter

public void setOrthogonalEdgeRouter(Layouter edgeRouter)
Sets the orthogonal edge router instance used to route the inter-edges orthogonally.


getOrthogonalEdgeRouter

public Layouter getOrthogonalEdgeRouter()
Returns the orthogonal edge router instance used to route the inter-edges orthogonally.


canLayout

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


doLayout

public void doLayout(LayoutGraph graph)
Description copied from interface: Layouter
Assigns a new graph layout to the given layout graph.


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

2003