|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wilmascope.graph.LayoutEngine<N,E>
public abstract class LayoutEngine<N extends NodeLayout,E extends EdgeLayout>
Classes which determine layout for a particular cluster must implement this interface.
Constructor Summary | |
---|---|
LayoutEngine()
|
Method Summary | |
---|---|
abstract boolean |
applyLayout()
apply the changes calculated by calculateLayout() |
void |
calculateLayout()
calculate the changes required to move the graph to a nicer layout. |
abstract E |
createEdgeLayout(Edge e)
Factory method to create a new EdgeLayout implementation compatible with the layout engine implementing this interface. |
abstract N |
createNodeLayout(Node n)
Factory method to create a new NodeLayout implementation compatible with the layout engine implementing this interface. |
abstract javax.swing.JPanel |
getControls()
|
abstract java.lang.String |
getName()
Return a string descriptor for the layout engine type. |
java.util.Properties |
getProperties()
If you want custom properties for your layout you will need to override this method but be sure to super.getProperties() |
Cluster |
getRoot()
|
void |
init(Cluster root)
The LayoutEngine should have no constructor. |
boolean |
isIterative()
The iterationsPerFrameSlider should be enabled for iterative layouts (like force directed) and disabled for layouts that complete in a single step (sugiyama) |
void |
resetProperties()
process your custom properties by overriding this method, but, again call super.resetProperties in your overriding implementation |
void |
setProperties(java.util.Properties p)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LayoutEngine()
Method Detail |
---|
public void calculateLayout()
applyLayout()
method. Potentially, this means that
the caller can calculate new positions (stored in the NodeLayouts), then opt not to
apply the changes if it does not lead to an improvement.
In practice this has not yet been utilised and such
decisions are usually made internally to the layout engine.
public abstract boolean applyLayout()
calculateLayout()
public abstract java.lang.String getName()
public abstract N createNodeLayout(Node n)
public abstract E createEdgeLayout(Edge e)
public java.util.Properties getProperties()
public final void setProperties(java.util.Properties p)
public void resetProperties()
public abstract javax.swing.JPanel getControls()
public void init(Cluster root)
public Cluster getRoot()
public boolean isIterative()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |