Skip navigation

Commands

How to embed ZGRViewer - Applet in an HTML page

If using ZGRViewer 0.9.0 or later (requires Java 1.5):

<Applet code="net.claribole.zgrviewer.ZGRApplet.class" archive="zvtm-0.10.1-SNAPSHOT.jar,zvtm-svg-0.1.1-SNAPSHOT.jar,zgrviewer-0.9.0-SNAPSHOT.jar,timingframework-1.0.jar" width="720" height="480"> <param name="type" value="application/x-java-Applet;version=1.5" /> <param name="scriptable" value="false" /> <param name="width" value="720" /> <param name="height" value="480" /> <param name="svgURL" value="http://zvtm.sourceforge.net/zgrviewer/Applet/test1.svg" /> <param name="title" value="zgrviewer - Applet" /> <param name="appletBackgroundColor" value="#DDD" /> <param name="graphBackgroundColor" value="#DDD" /> <param name="highlightColor" value="red" /> <param name="displayOverview" value="true" /> <param name="focusNodeMagFactor" value="2.0" /> </Applet>

If using ZGRViewer 0.8.2 or earlier (requires Java 1.4):

<Applet code="net.claribole.zgrviewer.ZGRApplet.class" archive="zvtm-0.9.8jar,zgrviewer-0.8.2.jar" width="720" height="480"> <param name="type" value="application/x-java-Applet;version=1.4" /> <param name="scriptable" value="false" /> <param name="width" value="720" /> <param name="height" value="480" /> <param name="svgURL" value="http://zvtm.sourceforge.net/zgrviewer/Applet/test1.svg" /> <param name="title" value="zgrviewer - Applet" /> <param name="appletBackgroundColor" value="#DDD" /> <param name="graphBackgroundColor" value="#DDD" /> <param name="highlightColor" value="red" /> <param name="displayOverview" value="true" /> <param name="focusNodeMagFactor" value="2.0" /> </Applet>

The JAR files are the ones taken from any zgrviewer release starting from 0.7.0.

ZGRViewer - Applet v0.9.0 requires Java 1.5.0 or later to be installed on the client computer and available to the browser.

ZGRViewer - Applet v0.8.2 requires Java 1.4.0 or later to be installed on the client computer and available to the browser.

No local setup of Graphviz is required, as the result SVG document is produced by Graphviz tools on the server's side.

For security reasons, the SVG file must be on the same server as the Applet itself. The width and height of the Applet can be parameterized. Be sure to assign the same values to the Applet element's width attribute and the param element's width attribute. Same thing for height. The two JAR files can be located anywhere on the server. Just be sure to indicate absolute paths to these files, separated by commas.

The value of the svgURL parameter can of course be generated on the fly. It must point to the SVG file generated by a Graphviz tool such as dot, neato or twopi (server side).

Parameters

NameValue/PurposeExamplesRequiredSince
widthAn integer number, in pixels720yesv0.7.0
heightAn integer number, in pixels480yesv0.7.0
svgURLThe URL of the SVG document generated by GraphVizhttp://zvtm.sourceforge.net/zgrviewer/Applet/test1.svgyes
titleTitle appearing in the surrounding borderzgrviewer - Appletnov0.7.0
showNavControlsDisplay navigation/search controlstrue, falsenov0.7.0
showFCPaletteDisplay tool palette (focus+context navigation tools)true, falsenov0.8.0
appletBackgroundColorApplet background color (*)#FFF, #E6F4AA, red, rgb(255,98,2), rgb(10%,24%,98%)nov0.7.0
graphBackgroundColorGraph background color (*)#FFF, #E6F4AA, red, rgb(255,98,2), rgb(10%,24%,98%)nov0.7.0
cursorColorMouse cursor color in graph window (*)#FFF, #E6F4AA, red, rgb(255,98,2), rgb(10%,24%,98%)nov0.7.0
highlightColorColor of label highlighted by the search feature (*)#FFF, #E6F4AA, red, rgb(255,98,2), rgb(10%,24%,98%)nov0.7.0
antialiasedRender the graph with antialiasing (better quality)true, falsenov0.7.0
centerOnLabelInitial view of the graph will be centered on the first label in the graph that contains the string given as value of this parameter. If multiple labels match this string, there is no guarantee about which one will be selected by the Applet, and this behaviour is not predictable. Case-insensitive.test47nov0.7.0
displayOverviewDisplay an overview of the graph in the upper right cornertrue, falsenov0.8.1
targetSpecify where to open links (new window, same window, etc.). See Java's AppletContext API for more information._self, _parent, _top, _blanknov0.8.0
focusNodeMagFactorMagnification factor when focusing on a node1.0, 5.0nov0.9.0

(*) Colors can be represented using any of the syntaxes defined by the CSS/SVG specifications.

Hosted by SourceForge.net Logo