JGraphpad - Diagram Editor and Source code examples (c) 2001-2005 JGraph.com

A collection of source code examples forming a diagram editor based on JGraph

Gaudenz Alder


TABLE OF CONTENTS
*****************

1. Disclaimer
2. Installation
   2.1 Requirements
   2.2 Compiling from CVS
   2.3 Compiling from Source
   2.4 Installing JGraphpad
3. What is it?
   3.1 Purpose
   3.2 Features
4. Obtaining JGraphpad
   4.1 Binaries
   4.2 Source Code
5. Misc
   5.1 Tips and tricks
   5.2 Showcase


1. Disclaimer
-------------

JGraphpad is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

2. Installation
---------------

2.1 Requirements
----------------
JGraphpad is available in different flavors that require the following 
downloads:
o Web Start: JavaTM Web Start (http://java.sun.com/products/javawebstart/) or 
o Application: SDK or JRE 1.4 or 1.5 (http://java.sun.com/j2se/) or 
o Applet: JavaTM Plug-In (http://java.sun.com/getjava/)
We recommend Web Start. The most recent version of Java can be obtained 
from http://java.sun.com/j2se/
To build JGraphpad a copy of Ant is required. Ant is available at
http://ant.apache.org/

2.2 Compiling from CVS
----------------------
The CVS repository/source distribution has the following directory structure:

lib/      JGraph Component and Ant
src/      Source Root
test/     Test Root

JGraphpad uses Ant to build. See build.xml for more information.
You require the following Jar files: ant.jar, jgraph.jar

The files are expected to be located in the lib/ directory, which must be
created.

To build JGraphpad, you must ensure that the JAVA_HOME environment variable
is properly set.

Note:- If you are using an IDE like eclipse under Windows it's possible to get
the line endings wrong on the CVS check out and JGraphpad fail to run.  Under
Window->Preferences->Team->CVS on Eclipse 3.0, for example, you will see a
tickbox entitled : Convert text files to use platform line ending.  This must
not be enabled ( but it is by default ).Please do all JGraph development
work using Unix line endings,

2.3 Libraries used
------------------

The following libraries were used to build this version of JGraphpad. Next to the
libraries is indicated where the source files to that library may be obtained.
The CVS tree for this version of JGraphpad is called JGraphpad3.

JGraph 5.5.1 - Source available at sourceforge download page
			http://sourceforge.net/project/showfiles.php?group_id=43118
			
Additional libraries used are tagged in the JGraphpad3 CVS tree under /lib by
the jgraphpapd-5_5_1_1 tag. Their sources are available from:

EPS Graphics library - http://www.jibble.org/epsgraphics/
iText PDF library - http://www.lowagie.com/iText/
PMD Java source checker - http://pmd.sourceforge.net/


2.4 Installing JGraphpad
------------------------
1. Install Java on your machine 
2. Download the application at http://sourceforge.net/project/showfiles.php?group_id=43118&package_id=65494
3. Select the directory where you want to download the application 
4. Go to the directory where the application was downloaded 
5. Doubleclick the application icon, or type the following at the command 
   prompt: java -jar jgraphpad.jar 



3. What is it?
--------------
JGraphpad is a collection of source code examples based on JGraph. It is currently 
available in English, French and German. JGraphpad is provided as an example 
for the JGraph Swing component (http://www.jgraph.com).

3.1 Purpose
-----------
With JGraphpad, you can create flow charts, maps, UML diagrams, and many 
other diagrams. 

3.2 Features
------------
o Export to XML and JPG
o Built-in Object Library
o Overview
o Interactive Layout
o Print Support
o Page View
o Automatic Zoom
o Grid
o Drag and Drop
o Search
o Minimum Spanning Tree
o Shortest Path
o Component Count
o Background Image

Plus all the features from JGraph such as Layers, Grouping, "Step-Into" 
Groups, Command History, Clipboard with Multiple Transfer Formats, Grid, 
Anti-Alias, In-Place Editing, Pluggable Look-and-Feel, Undo/Redo, 
and more.



4. Obtaining JGraphpad
----------------------
The Home Page of JGraphpad can be found at http://www.jgraph.com/jgraphpad.html

4.1 Binaries
------------
The Binaries of JGraphpad are distributed on 
http://sourceforge.net/project/showfiles.php?group_id=43118&package_id=65494

4.2 Source code
---------------
The sources of JGraphpad are placed under the GPL.
They are available via anonymous CVS or as zip files at 
http://sourceforge.net/project/showfiles.php?group_id=43118&package_id=65494
JGraphpad's SourceForge.net CVS repository can be checked out through
anonymous (pserver) CVS with the following instruction:
cvs -d:pserver:anonymous@cvs.jgraph.sourceforge.net:/cvsroot/jgraph co jgraphpad3
Updates from within the module's directory do not need the -d parameter.



5. Misc
-------

5.1 Tips and Tricks
-------------------
To create multiline labels you can use HTML. Here is an example:
<html>first line<br>second line</html>
The following key bindings are supported by default: 
o Alt-Drag: Force marquee selection
o Shift-Select: Extend selection
o Control-Select: Toggle selection
o Control-Drag: Clones selection
o Shift-Drag: Constrained drag
To add and remove bends (edge points) you can press the right mouse button 
while holding down the Shift key. To use the quadratic and bezier line style 
the edge must have 1 and 2 intermediate points respectively.


For more information please visit
http://www.jgraph.com

5.2 Packages

org.jgraph.algebra - Various simple graph algebra utilities

org.jgraph.cellview - example cell views for various shapes
See JGraphpad source code for example of how to integrate
new cellviews into an application. For example grep/search
for ellipse in the JGraphpad source code to see where the
ellipse view is integrated in.

org.jgraph.layout - various graph layout algorithms.
See JGraphpad source code for example of how to integrae
layouts into an application. Look in
org.jgraph.utils.gui.LayoutDialog.

org.jgraph.utils - Various utility and input/output
functionality. Examples of usage can mostly be found
in JGraphpad.

5.3 JGraph Layout Pro
-----------------
If you require commercial grade layouts for JGraph along with full support
please see the JGraph Layout Pro product at
http://www.jgraph.com/layout.html


5.4 License
-------
For legal and licensing issues, please read the LICENSE file.


5.5 Support
-------
A community forum for JGraphpad is available at http://www.jgraph.com/forum
