|
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.klafbang.tincpn.gui.sheet.Sheet
dk.klafbang.tincpn.animation.AnimationSheet
dk.klafbang.tincpn.animation.plugin.Graph
@Note(value="This was previously called GraphSheet") public class Graph
Graph is meant to draw 2D graphs.
This feature is used to visualise state-spaces, but the interface is general enough, it can be used for other things as well.
You may also want to take a look at this animation object's 3D counterpart,
Graph3D
Graph3D
Constructor Summary | |
---|---|
Graph(java.lang.String name,
java.lang.String id)
Constructs a Graph object. |
Method Summary | |
---|---|
javax.swing.JComponent |
createAnimation()
|
void |
createEdge(java.lang.String source,
java.lang.String target,
java.lang.String label)
Create a new edge from source to target with the specified label. |
void |
createEdge2(java.lang.String source,
java.lang.String target)
Create a new edge from source to target with no label. |
void |
createEdges(java.lang.String[] sources,
java.lang.String[] targets,
java.lang.String[] labels)
|
void |
createEdges2(java.lang.String[] sources,
java.lang.String[] targets)
|
void |
createVertex(java.lang.String name)
Create a new vertex with the given name. |
void |
createVertexes(java.lang.String[] names)
|
void |
doLayout()
Layout the graph. |
java.awt.Dimension |
getPreferredSize()
|
Methods inherited from class dk.klafbang.tincpn.animation.AnimationSheet |
---|
canCoexistWith, getComponentImpl |
Methods inherited from class dk.klafbang.tincpn.gui.sheet.Sheet |
---|
addSheetHook, getComponent, getIndexNode, getText, removeComponent, setText |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Graph(java.lang.String name, java.lang.String id)
name
- name of the Graphid
- Method Detail |
---|
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class dk.klafbang.tincpn.gui.sheet.Sheet
Sheet.getPreferredSize()
public javax.swing.JComponent createAnimation()
createAnimation
in class dk.klafbang.tincpn.animation.AnimationSheet
AnimationSheet.createAnimation()
public void createVertex(java.lang.String name)
name
- the namepublic void createVertexes(java.lang.String[] names)
names
- public void createEdge(java.lang.String source, java.lang.String target, java.lang.String label) throws java.lang.Exception
source
- the sourcetarget
- the targetlabel
- the label
java.lang.Exception
public void createEdges(java.lang.String[] sources, java.lang.String[] targets, java.lang.String[] labels) throws java.lang.Exception
sources
- targets
- labels
-
java.lang.Exception
public void createEdge2(java.lang.String source, java.lang.String target)
source
- the sourcetarget
- the targetpublic void createEdges2(java.lang.String[] sources, java.lang.String[] targets) throws java.lang.Exception
sources
- targets
-
java.lang.Exception
public void doLayout()
|
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |