Rogue Wave JViews Diagrammer Sample: Creating Diagrams without CSS


Description

This sample shows a simple diagram with simple interactions and does not use CSS at all.

How to Use the Sample

How to Run the Sample as an Application

This sample can also be run as an application. The installation directory contains an executable JAR file, diagrammer-nocss.jar, that allows you to execute the sample 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 sample 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 sample and type:

ant run

Topics Covered

Detailed Description

The JViews Diagrammer model is defined and created through the API. Instead of loading a CSS file, a custom renderer is set. This renderer simulates the styling engine. It creates nodes and links, and updates the graphic objects when selected or when property change events occur. Given the simplicity of this application, CSS is quite unneccessary. Here the custom renderer represents a comfortable alternative that remains in the pure Java world, and simplifies user extension of the application. Note that all SDM services (maps, subgraph, graph layout, info balloon, and so on...) are no longer available without CSS support.

Installation Directory

The Creating Diagrams without CSS sample is installed here.

Classes Involved

Source Files

Copyright © Rogue Wave Software, Inc. 1997, 2015. All rights reserved. Legal terms.