info.aduna.linkmap.layout
Class LinkGraphLayoutManager

java.lang.Object
  extended by info.aduna.linkmap.layout.GraphLayoutManager
      extended by info.aduna.linkmap.layout.SubgraphRelocationManager
          extended by info.aduna.linkmap.layout.LinkGraphLayoutManager
All Implemented Interfaces:
Runnable

public class LinkGraphLayoutManager
extends SubgraphRelocationManager

LinkGraphLayoutManager gives a layout to a LinkGraph based on the spring embedder and the subgraph relocation algorithms. It uses a LinkSubgraphLayoutManager for calculating the layout of the connected subgraphs of the total graph.


Field Summary
static long DEFAULT_RANDOM_SEED
          The default seed used for randomizing the layout.
 
Fields inherited from class info.aduna.linkmap.layout.SubgraphRelocationManager
DEFAULT_BASELINE_INTERVAL, DEFAULT_SUBGRAPH_PADDING
 
Constructor Summary
LinkGraphLayoutManager()
          Create a new LinkGraphLayoutManager that will use a LinkSubgraphLayoutManager for calculating the layouts of the individual subgraphs.
 
Method Summary
 long getRandomSeed()
           
 void randomizeCoordinates()
          Gives the whole graph a random layout using the indicates seed for the random number generator.
 void resetAttributes()
          Uses the LinkSubgraphLayoutManager for resetting the layout attributes inside the whole graph.
 void setGraph(Graph graph)
          Overrides GraphLayoutManager and additionally randomizes the coordinates of the vertices, using the LinkSubgraphLayoutManager, when this is indeed a new Graph.
 void setRandomSeed(long seed)
           
 
Methods inherited from class info.aduna.linkmap.layout.SubgraphRelocationManager
addSubgraphRelocationListener, createLayoutConverter, doLayout, getBaselineInterval, getGraphRenderer, getSubgraphLayoutManager, getSubgraphPadding, initialize, removeSubgraphRelocationListener, setBaselineInterval, setGraphRenderer, setSubgraphLayoutManager, setSubgraphPadding, stop
 
Methods inherited from class info.aduna.linkmap.layout.GraphLayoutManager
getGraph, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RANDOM_SEED

public static final long DEFAULT_RANDOM_SEED
The default seed used for randomizing the layout.

See Also:
Constant Field Values
Constructor Detail

LinkGraphLayoutManager

public LinkGraphLayoutManager()
Create a new LinkGraphLayoutManager that will use a LinkSubgraphLayoutManager for calculating the layouts of the individual subgraphs.

Method Detail

setGraph

public void setGraph(Graph graph)
Overrides GraphLayoutManager and additionally randomizes the coordinates of the vertices, using the LinkSubgraphLayoutManager, when this is indeed a new Graph.

Overrides:
setGraph in class GraphLayoutManager

setRandomSeed

public void setRandomSeed(long seed)

getRandomSeed

public long getRandomSeed()

randomizeCoordinates

public void randomizeCoordinates()
Gives the whole graph a random layout using the indicates seed for the random number generator. Note that, before a new doLayout is issued, resetAttributes propably also needs to be invoked.


resetAttributes

public void resetAttributes()
Uses the LinkSubgraphLayoutManager for resetting the layout attributes inside the whole graph. Together with the randomization of the coordinates, as done in randomizeCoordinates, this ensures that a subsequent invocation of the layout algorithm will yield the same result.



Copyright © 1997-2008 Aduna. All Rights Reserved.