|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.comp.tool.DotDump
Static methods to visualize JavaSim component connections as a directed graph. Only components which have not-hidden ports are shown. "Normal" ports are displayed in blue, shadow ports in green (including shadow connections). If there is a blue arrow from port1 to port2 it means, that a message sent at port1 is delivered to port2. (except unexplainable loops from a port to itself) The class uses the "dot" program from the graphviz package (http://www.graphviz.org) for graph creation. It must be installed and in the path.
| Field Summary | |
java.lang.String |
INDENT
|
java.lang.String |
REAL_CONNECTION_COLOR
|
java.lang.String |
SHADOW_CONNECTION_COLOR
|
| Constructor Summary | |
DotDump()
|
|
DotDump(Component root_)
|
|
| Method Summary | |
java.awt.Image |
createComponentImage()
Calls the dot program with the description generated by the dumpComponents(PrintStream) method as input and creates
a Java image object from its output. |
void |
dumpComponents(java.io.PrintStream out)
Dumps a graph description sutiable for the graphviz package of all components to the given PrintStream. |
static void |
example()
|
Component |
getRoot()
|
java.lang.String |
info()
|
boolean |
isShowBarePortEnabled()
|
boolean |
isShowRootEnabled()
|
static void |
main(java.lang.String[] args)
|
void |
reset()
Automatically called before each rendering. |
void |
run()
|
void |
setRoot(Component root_)
|
void |
setShowBarePortEnabled(boolean s)
Enables/disables showing ports that have no connection. |
void |
setShowRootEnabled(boolean s)
Enables/disables showing the root component. |
void |
show()
Runs _showComponents() in a separate thread. |
boolean |
showing(Component c)
This method calls #_showing(Component) and takes care of
bookkeeping blocked components. |
boolean |
showing(Port p)
This method returns true if the host component of the port is not blocked and #_showing(Port) returns true. |
void |
toFile(java.lang.String fileName_)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.lang.String INDENT
public java.lang.String SHADOW_CONNECTION_COLOR
public java.lang.String REAL_CONNECTION_COLOR
| Constructor Detail |
public DotDump()
public DotDump(Component root_)
| Method Detail |
public void setRoot(Component root_)
public Component getRoot()
public void reset()
public void setShowBarePortEnabled(boolean s)
public boolean isShowBarePortEnabled()
public void setShowRootEnabled(boolean s)
public boolean isShowRootEnabled()
public void dumpComponents(java.io.PrintStream out)
public final boolean showing(Component c)
#_showing(Component) and takes care of
bookkeeping blocked components.
public final boolean showing(Port p)
#_showing(Port) returns true.
public java.awt.Image createComponentImage()
throws java.io.IOException
dumpComponents(PrintStream) method as input and creates
a Java image object from its output.
java.io.IOExceptionpublic void run()
run in interface java.lang.Runnablepublic void show()
public void toFile(java.lang.String fileName_)
public static void example()
public java.lang.String info()
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||