|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.hierarchic.WeightedLayerer
This class implements the first phase of the hierarchic layouter. It first makes the directed graph acyclic by topological sorting. It then assigns the layers such that edge weights are respected A weight defines a minimal distance between the two endpoints of an edge.
Field Summary | |
protected Object |
key
|
protected DataProvider |
weight
|
Constructor Summary | |
WeightedLayerer()
Creates a new weighted layerer. |
|
WeightedLayerer(Object k)
Creates a new weighted layerer. |
Method Summary | |
int |
assignLayers(Graph g,
NodeMap layer)
|
int |
assignLayersFast(Graph g,
NodeMap layer)
Assign the layers to the nodes. |
int |
assignNodeLayer(LayoutGraph g,
NodeMap layer,
EdgeList reversedEdges)
This method assigns the nodes in the graph to layers. |
int |
assignNodeLayer(LayoutGraph g,
NodeMap layer,
EdgeList reversedEdges,
DataProvider w)
This method assigns the nodes in the graph to layers. |
protected void |
downShiftNodes(Graph g,
NodeMap LAYER_KEY,
int maxLayer)
Pushes the nodes down, drawings seems then to be nicer. |
void |
makeDFSAcyclic(LayoutGraph g,
EdgeList reversedEdges)
Uses dfs to remove cycles from the graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected DataProvider weight
protected Object key
Constructor Detail |
public WeightedLayerer()
public WeightedLayerer(Object k)
k
- the key to access the weights.Method Detail |
public int assignNodeLayer(LayoutGraph g, NodeMap layer, EdgeList reversedEdges)
assignNodeLayer
in interface Layerer
g
- the graph for which the layers are determined.layer
- here the layers are storedreversedEdges
- here the edges are stored which had been reversed.
public int assignNodeLayer(LayoutGraph g, NodeMap layer, EdgeList reversedEdges, DataProvider w)
g
- the graph for which the layers are determined.layer
- here the layers are storedreversedEdges
- here the edges are stored which had been reversed.
public void makeDFSAcyclic(LayoutGraph g, EdgeList reversedEdges)
public int assignLayers(Graph g, NodeMap layer)
public int assignLayersFast(Graph g, NodeMap layer)
protected void downShiftNodes(Graph g, NodeMap LAYER_KEY, int maxLayer)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |