Class Diagram Options

A number of command-line options contol the operation of UMLGraph class diagram generator:
-output
Specify the output file name (default graph.dot).
-outputencoding
Specify the output encoding character set (default ISO-8859-1). When using dot to generate SVG diagrams you should specify UTF-8 as the output encoding, to have guillemots correctly appearing in the resulting SVG.
-qualify
Produce fully-qualified class names.
-horizontal
Layout the graph in the horizontal direction.
-attributes
Show class attributes (Java fields)
-operations
Show class operations (Java methods)
-constructors
Show a class's constructors
-visibility
Adorn class elements according to their visibility (private, public, protected)
-types
Add type information to attributes and operations
-all
Same as -attributes -operations -visibility -types
-nodefillcolor
Specify the color to use to fill the shapes.
-nodefontname
Specify the font name to use inside nodes.
-nodefontabstractname
Specify the font name to use inside abstract class nodes.
-nodefontsize
Specify the font size to use inside nodes.
-nodefontcolor
Specify the font color to use inside nodes.
-edgefontname
Specify the font name to use for edge labels.
-edgefontsize
Specify the font size to use for edge labels.
-edgefontcolor
Specify the font color to use for edge labels.
-edgecolor
Specify the color for drawing edges.
-bgcolor
Specify the graph's background color.
-hide
Specify entities to hide from the graph. Matching is done against the end of each entity's name. For instance, "-hide Widget" would hide "com.foo.widgets.Widget" and "com.foo.widgets.BigWidget".
-apidocroot
Specify the URL that should be used as the "root" for local classes. This URL will be used as a prefix, to which the page name for the local class or package will be appended (following the JavaDoc convention). For example, if the value http://www.acme.org/apidocs is provided, the class org.acme.util.MyClass will be mapped to the URL http://www.acme.org/apidocs/org/acme/util/MyClass.html. This URL will then be added to .dot diagram and can be surfaced in the final class diagram by setting the output to SVG, or by creating an HTML page that associates the diagram static image (a .gif or .png) with a client-side image map.
-apidocmap
Specify the file name of the URL mapping table. The is a standard Java property file, where the property name is a regular expression (as defined in the java.util.regex package) and the property value is an URL "root" as described above. This table is used to resolved external class names (class names that do not belong to the current package being processed by UMLGraph). If no file is provided, external classes will just be mapped to the on-line Java API documentation.
-noguillemot
Specify that guillemot characters should not be used to denote special terms like "interface" and stereotype names. This is used on some platforms to circumvent problems associated with displaying non-ASCII characters.

All colors can be either a symbolic name (e.g. blue), a tripple specifying hue-saturation-brightness as values 0-1 (e.g. ".13 0.9 1"), or a tripple specifying red-green-blue values as hexadecimal digits prefixed by a # (e.g. "#ff8020"). The symbolic color names are derived from the X Windows System; you can find a complete list in the Graphviz documentation.

Font names are passed directly to the dot graph generation back-end. In general the Postcript standard names Times, Helvetica, Courier, and Symbol are safe to use.

Since the options are really a part of the generated graph you want in many cases to include them in the diagram specification. You can do that by adding javadoc @opt tags in front of a class named UMLOptions, as in the following example:

/**
 * @opt horizontal
 * @opt all
 * @hidden
 */
class UMLOptions {}
You can also change the UMLGraph operation on a per-class basis by using @opt attributes on individual classes. In this case the @opt specification temporarily overrides the particular global setting for the class being processed.