|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.visualization.AbstractLayout
edu.uci.ics.jung.visualization.contrib.KKLayout
Implements the Kamada-Kawai algorithm for node layout. Does not respect filter calls, and sometimes crashes when the view changes to it.
Constructor Summary | |
KKLayout(Graph g)
|
Method Summary | |
void |
adjustForGravity()
Shift all vertices so that the center of gravity is located at the center of the screen. |
void |
advancePositions()
Implementors must override this method in order to create a Layout. |
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. |
java.lang.String |
getStatus()
Returns the current status of the sytem, or null if there is no particular status to report. Useful for reporting things like number of iterations passed, temperature, and so on.By default, an AbstractLayout returns null for its status.By default, an AbstractLayout returns null for its status. |
boolean |
incrementsAreDone()
Returns true once the current iteration has passed the maximum count. |
boolean |
isIncremental()
This one is an incremental visualization. |
void |
setAdjustForGravity(boolean on)
Enable or disable gravity point adjusting. |
void |
setExchangeVertices(boolean on)
Enable or disable the local minimum escape technique by exchanging vertices. |
void |
setMaxIterations(int maxIterations)
|
Methods inherited from class edu.uci.ics.jung.visualization.AbstractLayout |
applyFilter, dontMove, forceMove, getBaseKey, getCoordinates, getCurrentSize, getEdge, getEdge, getGraph, getVertex, getVertex, getVisibleEdges, getVisibleVertices, getX, getY, initialize, lockVertex, resize, restart, unlockVertex |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KKLayout(Graph g)
Method Detail |
public java.lang.String getStatus()
AbstractLayout
getStatus
in interface Layout
getStatus
in class AbstractLayout
public void setMaxIterations(int maxIterations)
public boolean isIncremental()
public boolean incrementsAreDone()
public void advancePositions()
AbstractLayout
Note that "locked" vertices are not to be moved; however, it is the policy of the visualization to decide how to handle them, and what to do with the vertices around them. Prototypical code might include a clipping like
for (Iterator i = getVertices().iterator(); i.hasNext() ) { Vertex v = (Vertex) i.next(); if (! dontmove.contains( v ) ) { ... // handle the node } else { // ignore the node } }
advancePositions
in interface Layout
advancePositions
in class AbstractLayout
Layout.advancePositions()
public void adjustForGravity()
public void setAdjustForGravity(boolean on)
public boolean getAdjustForGravity()
public void setExchangeVertices(boolean on)
public boolean getExchangeVertices()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |