|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wilmascope.graphgen.GraphGenerator
public abstract class GraphGenerator
Boilerplate class for graph generators. Extend this class to create classes that generate random or example graphs.
Constructor Summary | |
---|---|
GraphGenerator()
|
Method Summary | |
---|---|
protected GraphControl.Node |
addRandomNode(GraphControl.Cluster root,
boolean threeD)
Create a randomly coloured, randomly positioned node with the default style |
abstract void |
generate(GraphControl gc)
This method will do the work of actually creating the graph. |
protected java.lang.String |
getEdgeView()
|
protected java.lang.String |
getNodeView()
Get the NodeView style |
void |
setView(java.lang.String nodeView,
java.lang.String edgeView)
Set the glyph style for the generated graph |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.wilmascope.util.Plugin |
---|
getControls, getName |
Constructor Detail |
---|
public GraphGenerator()
Method Detail |
---|
public abstract void generate(GraphControl gc)
gc
- the instance of GraphControl inwhich the graph will be generatedpublic void setView(java.lang.String nodeView, java.lang.String edgeView)
nodeView
- node view styleedgeView
- edge view styleprotected GraphControl.Node addRandomNode(GraphControl.Cluster root, boolean threeD)
root
- cluster to add the node tothreeD
- use 3D positions
protected java.lang.String getNodeView()
protected java.lang.String getEdgeView()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |