|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.hierarchic.GivenLayersLayerer
public class GivenLayersLayerer
This layerer implementation layers the nodes by given layer IDs. The layer IDs are given by a DataProvider that returns the integral layer ID of each node in the graph.
| Field Summary | |
|---|---|
static Object |
LAYER_ID_KEY
The key used by this class to query a graph for a DataProvider that yields the layerID for each node in the graph. |
| Constructor Summary | |
|---|---|
GivenLayersLayerer()
|
|
| Method Summary | |
|---|---|
int |
assignNodeLayer(LayoutGraph g,
NodeMap layerMap,
EdgeList reversedEdges)
Assigns layers to the graph that were given by the DataProvider g.getDataProvider(LAYER_ID_KEY). |
int |
normalize(Graph g,
DataProvider layerId,
DataAcceptor normalizedLayerId)
Convenience method which removes empty layers and ensures that the smallest layer has value 0. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Object LAYER_ID_KEY
| Constructor Detail |
|---|
public GivenLayersLayerer()
| Method Detail |
|---|
public int normalize(Graph g,
DataProvider layerId,
DataAcceptor normalizedLayerId)
layerId - provides the current layer ids for nodes in gnormalizedLayerId - accepts the new layer ids that result after normalization.
public int assignNodeLayer(LayoutGraph g,
NodeMap layerMap,
EdgeList reversedEdges)
g.getDataProvider(LAYER_ID_KEY).
The returned layerMap will be a normalized variant of
the user given data provider. A normalized variant has
no empty layers and a minimum layerID 0.
assignNodeLayer in interface Layererg - the graph for which the layers are determined.layerMap - here the layers are storedreversedEdges - here the edges are stored which had been reversed.
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||