| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uci.ics.jung.algorithms.layout.AbstractLayout<V,E>
edu.uci.ics.jung.algorithms.layout.KKLayout<V,E>
public class KKLayout<V,E>
Implements the Kamada-Kawai algorithm for node layout. Does not respect filter calls, and sometimes crashes when the view changes to it.
| Field Summary | |
|---|---|
| protected  double | diameterThe diameter of the visible graph. | 
| protected  Distance<V> | distanceRetrieves graph distances between vertices of the visible graph | 
| Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout | 
|---|
| graph, initialized, locations, size | 
| Constructor Summary | |
|---|---|
| KKLayout(Graph<V,E> g)Creates an instance for the specified graph. | |
| KKLayout(Graph<V,E> g,
         Distance<V> distance)Creates an instance for the specified graph and distance metric. | |
| Method Summary | |
|---|---|
|  void | adjustForGravity()Shift all vertices so that the center of gravity is located at the center of the screen. | 
|  boolean | done()Returns true once the current iteration has passed the maximum count. | 
|  boolean | getAdjustForGravity()Returns true if gravity point adjusting is enabled. | 
|  boolean | getExchangeVertices()Returns true if the local minimum escape technique by exchanging vertices is enabled. | 
|  String | getStatus()Returns a string with information about the current status of the algorithm. | 
|  void | initialize()Initializes fields in the node that may not have been set during the constructor. | 
|  boolean | isIncremental()This one is an incremental visualization. | 
|  void | reset() | 
|  void | setAdjustForGravity(boolean on)Enable or disable gravity point adjusting. | 
|  void | setDisconnectedDistanceMultiplier(double disconnected_multiplier)Sets a multiplicative factor that specifies the fraction of the graph's diameter to be used as the inter-vertex distance between disconnected vertices. | 
|  void | setExchangeVertices(boolean on)Enable or disable the local minimum escape technique by exchanging vertices. | 
|  void | setLengthFactor(double length_factor)Sets a multiplicative factor which partly specifies the "preferred" length of an edge (L). | 
|  void | setMaxIterations(int maxIterations)Sets the maximum number of iterations. | 
|  void | setSize(Dimension size)When a visualization is resized, it presumably wants to fix the locations of the vertices and possibly to reinitialize its data. | 
|  void | step()Advances one step. | 
| Methods inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout | 
|---|
| getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, transform | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected Distance<V> distance
protected double diameter
| Constructor Detail | 
|---|
public KKLayout(Graph<V,E> g)
public KKLayout(Graph<V,E> g,
                Distance<V> distance)
| Method Detail | 
|---|
public void setLengthFactor(double length_factor)
public void setDisconnectedDistanceMultiplier(double disconnected_multiplier)
public String getStatus()
public void setMaxIterations(int maxIterations)
public boolean isIncremental()
public boolean done()
done in interface IterativeContextpublic void initialize()
Layout
initialize in interface Layout<V,E>public void step()
IterativeContext
step in interface IterativeContextpublic void adjustForGravity()
public void setSize(Dimension size)
AbstractLayout
setSize in interface Layout<V,E>setSize in class AbstractLayout<V,E>public void setAdjustForGravity(boolean on)
public boolean getAdjustForGravity()
public void setExchangeVertices(boolean on)
public boolean getExchangeVertices()
public void reset()
reset in interface Layout<V,E>| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||