UML Diagrams

jGRASP can produce a UML diagram for Java code. The diagram is generated for classes in the source, class, and jar files in the current project. These diagrams are generated directly from the class (or jar) files, so source files must first be compiled.


 
 

UML Window

This window displays the UML diagram.


 
 

Print Menu

Print - print the diagram. The scale of the printout is based on the scale of the image. 100 pixels of image will be 1 inch on the printout.

Print Preview - preview the printout. The preview should be a close approximation of the printed result, but there may be minor differences because of scaling.

Print Settings - opens a print settings dialog for global or project level settings, and selects the "UML" tab.


 
 

Layout Menu

Tree Down - lays out selected objects, dependents of selected objects, or all objects in a vertically oriented tree. Only inheritance links are considered.

Tree Right - lays out selected objects, dependents of selected objects, or all objects in a horizontally oriented tree. Only inheritance links are considered.

Spring - lays out selected objects or all objects using a spring embedding layout algorithm. All links are considered.


 
 

Edit Menu

Delete Selected Edge Bends - the tree layout algorithms will insert bends in inheritance edges. This will delete them.

Remove From Project - removes selected or unselected files from the project. That is, for each selected or unselected object in the diagram, the source file from which that object was generated will be removed from the project. Note that external objects do not have a corresponding source file.

Add To Project - add selected or unselected external object files to the project. All package root directories for files in the project will be searched, and if exactly one source file for a particular external object is found, that file will be added to the project.

Select - extend the current selection by selecting any objects related in a particular way to the currently selected objects. For example, "Recursive Relations" will select all objects directly or indirectly related in any way to the currently selected objects.

Settings - brings up the UML settings dialog.


 
 

View Menu

Visible Objects - controls the types of objects that are shown. For example, you can hide non-public objects, or external objects (objects that are not in the project).

Visible Dependencies - controls the types of dependencies that are shown. For example, you can limit the view to inheritance dependency edges only.

Hide - hide selected or unselected objects, or show all objects. This is only temporary, on the next update, all objects will be shown.

Legend - controls various properties of the legend display.


 
 

Diagram Display

This window displays the UML diagram. A legend shows the meanings of the various object colors and edge styles and colors.

A scroller window at the upper left allows the view to be scrolled quickly.

A scale control allows the magnification of the view to be changed. Due to uneven scaling of fonts, the spacing between objects may change slightly as the scale is changed.

Objects can be selected using the mouse. Left click on an object to select it. Left click and drag a selection rectangle in the window to select multiple objects. Hold down the shift key while selecting to add to the current selection.

Objects can be moved by selecting then dragging them with the left mouse button.

You can move an edge bend by selecting the edge, then left clicking and dragging the bend. Hitting the delete key while dragging will remove the bend.


 
 

UML Settings Dialog

Settings for the UML diagram. All of these settings take effect when the diagram is updated.

Exclude By Type of Use - external objects (dependencies of objects in the project that are not themselves in the project) can be left out of the diagram.

Exclude By Name - JDK classes and interfaces, or just the class java.lang.Object, can be left out of the diagram.

New Node Layout - specifies which layout is applied to objects as they are added to the project.