Rogue Wave JViews Diagrammer Code Example: Diagrammer Applet
Description
![]() |
This sample shows how to create a simple applet with a diagram component.
How to Use the Code Example
- You can click a node or link to select it. Double-click to see the properties of the object.
- The left toolbar lets you zoom and pan the view, show or hide the tree view of the diagram, the overview, and the table view.
- The top toolbar lets you edit the diagram (you have to select the Allow Editing menu item in the Options menu first). For example, click on the Create Node button to create new nodes. Note that you are not allowed to save your work from the applet.
- The menu bar contains more actions to control the diagram component.
How to Run the Code Example as an Application
This code example can also be run as an application. The installation directory contains an executable JAR file, diagrammer-applet.jar
, that allows you to execute the code example with a double click from a file browser. Note that if you are using Internet Explorer, you can open the installation directory and execute the JAR file from the browser. This technique may not work in other Web browsers.
Alternatively, you can run the code example application from the command line. First check that the Ant utility is properly configured. If not, see the instructions on how to configure Ant for Rogue Wave JViews.
Then, go to the installation directory of the code example and type:
ant run
Topics Covered
- Create a Swing applet using a diagram component.
Detailed Description
This sample shows how to create a simple applet with a diagram component.
The applet displays a sample graph using the IlvDiagrammer
component.
The applet is based on the class IlvDiagrammerApplication
, which is a predefined, ready-to-use application or applet for displaying diagrams.
Installation Directory
The Diagrammer Applet code example is installed here.
Classes Involved
-
ilog.views.diagrammer.IlvDiagrammer
The main class of the diagram component.
-
ilog.views.diagrammer.application.IlvDiagrammerApplication
The predefined applet class for displayoing diagrams.
Source Files
-
DiagrammerApplet
The entry point of the sample.