From c58aaf1aa45b7aaf14eb7657fbf0a40f0c25e539 Mon Sep 17 00:00:00 2001 From: Diomidis Spinellis Date: Fri, 20 Sep 2002 11:17:32 +0000 Subject: [PATCH] Support for additional options for fonts and colors. --- index.html | 39 ++++++++++++-- .../spinellis/umlgraph/doclet/ClassGraph.java | 51 +++++++++++++++++-- .../spinellis/umlgraph/doclet/ClassInfo.java | 51 +++++++++++++++++-- src/gr/spinellis/umlgraph/doclet/Options.java | 51 +++++++++++++++++-- .../spinellis/umlgraph/doclet/StringUtil.java | 51 +++++++++++++++++-- .../spinellis/umlgraph/doclet/UmlGraph.java | 51 +++++++++++++++++-- src/org/umlgraph/doclet/ClassGraph.java | 51 +++++++++++++++++-- src/org/umlgraph/doclet/ClassInfo.java | 51 +++++++++++++++++-- src/org/umlgraph/doclet/Options.java | 51 +++++++++++++++++-- src/org/umlgraph/doclet/StringUtil.java | 51 +++++++++++++++++-- src/org/umlgraph/doclet/UmlGraph.java | 51 +++++++++++++++++-- web/index.html | 39 ++++++++++++-- 12 files changed, 532 insertions(+), 56 deletions(-) diff --git a/index.html b/index.html index ac7ca46..c47bb26 100644 --- a/index.html +++ b/index.html @@ -164,14 +164,29 @@ visibility (private, public, protected) -visibility -types
-nodefillcolor
Specify the color to use to fill the shapes. -The color can be either a symbolic name (e.g. blue), +
-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. + +

+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. @@ -202,6 +217,18 @@ You can download it in source and compiled format from the following links:

Version History

+
Version 1.19 2002/09/20
+New options: +nodefontname, +nodefontabstractname, +nodefontsize, +nodefontcolor, +edgefontname, +edgefontsize, +edgefontcolor, +edgecolor, +bgcolor. +
Version 1.18 2002/08/26
  • Can now specify class-local options. @@ -501,17 +528,23 @@ class ActionQueue { Download the declarative specification, the generated dot code. -

    Global and Local Options

    +

    Colors, Global and Local Options

     /**
    + * @opt edgecolor "yellow"
    + * @opt nodefontname "Times" 
    + * @opt bgcolor ".7 .9 1" 
      * @opt nodefillcolor "#a0a0a0" 
    + * @opt nodefontsize 14
      * @hidden
      */
     class UMLOptions{}
     
     /** 
    + * @opt nodefontname "Helvetica-Bold" 
    + * @opt nodefontcolor "white"
      * @composed - - - Red
      * @composed - - - Green
      * @composed - - - Blue
    diff --git a/src/gr/spinellis/umlgraph/doclet/ClassGraph.java b/src/gr/spinellis/umlgraph/doclet/ClassGraph.java
    index e86c7e2..8d47494 100644
    --- a/src/gr/spinellis/umlgraph/doclet/ClassGraph.java
    +++ b/src/gr/spinellis/umlgraph/doclet/ClassGraph.java
    @@ -36,11 +36,14 @@ class Options implements Cloneable {
     	boolean showType;
     	String edgeFontName;
     	String edgeFontColor;
    +	String edgeColor;
     	double edgeFontSize;
     	String nodeFontName;
    +	String nodeFontAbstractName;
     	String nodeFontColor;
     	double nodeFontSize;
     	String nodeFillColor;
    +	String bgColor;
     
     	Options() {
     		showQualified = false;
    @@ -49,12 +52,14 @@ class Options implements Cloneable {
     		showVisibility = false;
     		showType = false;
     		edgeFontName = "Helvetica";
    -		edgeFontColor = null;
    +		edgeFontColor = "black";
    +		edgeColor = "black";
     		edgeFontSize = 10;
    -		nodeFontName = "Helvetica";
    -		nodeFontColor = null;
    +		nodeFontAbstractName = "Helvetica-Oblique";
    +		nodeFontColor = "black";
     		nodeFontSize = 10;
     		nodeFillColor = null;
    +		bgColor = null;
     	}
     
     	public Object clone() 
    @@ -92,6 +97,24 @@ class Options implements Cloneable {
     			showType = true;
     		} else if(opt[0].equals("-all")) {
     			setAll();
    +		} else if(opt[0].equals("-bgcolor")) {
    +			bgColor = opt[1];
    +		} else if(opt[0].equals("-edgecolor")) {
    +			edgeColor = opt[1];
    +		} else if(opt[0].equals("-edgefontcolor")) {
    +			edgeFontColor = opt[1];
    +		} else if(opt[0].equals("-edgefontname")) {
    +			edgeFontName = opt[1];
    +		} else if(opt[0].equals("-edgefontsize")) {
    +			edgeFontSize = Integer.parseInt(opt[1]);
    +		} else if(opt[0].equals("-nodefontcolor")) {
    +			nodeFontColor = opt[1];
    +		} else if(opt[0].equals("-nodefontname")) {
    +			nodeFontName = opt[1];
    +		} else if(opt[0].equals("-nodefontabstractname")) {
    +			nodeFontAbstractName = opt[1];
    +		} else if(opt[0].equals("-nodefontsize")) {
    +			nodeFontSize = Integer.parseInt(opt[1]);
     		} else if(opt[0].equals("-nodefillcolor")) {
     			nodeFillColor = opt[1];
     		}
    @@ -380,9 +403,12 @@ class ClassGraph {
     				opt.w.print("}\"");
     			// Use ariali for gif output
     			if (c.isAbstract())
    -				opt.w.print(", fontname=\"Helvetica-Oblique\"");
    +				opt.w.print(", fontname=\"" + opt.nodeFontAbstractName + "\"");
     			if (opt.nodeFillColor != null)
     				opt.w.print(", style=filled, fillcolor=\"" + opt.nodeFillColor + "\"");
    +			opt.w.print(", fontname=\"" + opt.nodeFontName + "\"");
    +			opt.w.print(", fontcolor=\"" + opt.nodeFontColor + "\"");
    +			opt.w.print(", fontsize=" + opt.nodeFontSize);
     			opt.w.println("];");
     			ci.nodePrinted = true;
     		}
    @@ -408,6 +434,10 @@ class ClassGraph {
     				"taillabel=\"" + t[0] + "\", " + 
     				"label=\"" + StringFuns.guillemize(t[1]) + "\", " + 
     				"headlabel=\"" + t[2] + "\", " + 
    +				"fontname=\"" + opt.edgeFontName + "\", " + 
    +				"fontcolor=\"" + opt.edgeFontColor + "\", " + 
    +				"fontsize=" + opt.edgeFontSize + ", " + 
    +				"color=\"" + opt.edgeColor + "\", " + 
     				edgetype + "]"
     			);
     		}
    @@ -476,7 +506,16 @@ public class UmlGraph {
     		   option.equals("-types") ||
     		   option.equals("-all"))
     			return 1;
    -		else if(option.equals("-nodefillcolor"))
    +		else if(option.equals("-nodefillcolor") ||
    +		   option.equals("-nodefontcolor") ||
    +		   option.equals("-nodefontsize") ||
    +		   option.equals("-nodefontname") ||
    +		   option.equals("-nodefontabstractname") ||
    +		   option.equals("-edgefontcolor") ||
    +		   option.equals("-edgecolor") ||
    +		   option.equals("-edgefontsize") ||
    +		   option.equals("-edgefontname") ||
    +		   option.equals("-bgcolor"))
     			return 2;
     		else
     			return 0;
    @@ -497,6 +536,8 @@ public class UmlGraph {
     		);
     		if (opt.horizontal)
     			opt.w.println("\trankdir=LR;\n\tranksep=1;");
    +		if (opt.bgColor != null)
    +			opt.w.println("\tbgcolor=\"" + opt.bgColor + "\";\n");
     	}
     
     	/** Dot epilogue */
    diff --git a/src/gr/spinellis/umlgraph/doclet/ClassInfo.java b/src/gr/spinellis/umlgraph/doclet/ClassInfo.java
    index e86c7e2..8d47494 100644
    --- a/src/gr/spinellis/umlgraph/doclet/ClassInfo.java
    +++ b/src/gr/spinellis/umlgraph/doclet/ClassInfo.java
    @@ -36,11 +36,14 @@ class Options implements Cloneable {
     	boolean showType;
     	String edgeFontName;
     	String edgeFontColor;
    +	String edgeColor;
     	double edgeFontSize;
     	String nodeFontName;
    +	String nodeFontAbstractName;
     	String nodeFontColor;
     	double nodeFontSize;
     	String nodeFillColor;
    +	String bgColor;
     
     	Options() {
     		showQualified = false;
    @@ -49,12 +52,14 @@ class Options implements Cloneable {
     		showVisibility = false;
     		showType = false;
     		edgeFontName = "Helvetica";
    -		edgeFontColor = null;
    +		edgeFontColor = "black";
    +		edgeColor = "black";
     		edgeFontSize = 10;
    -		nodeFontName = "Helvetica";
    -		nodeFontColor = null;
    +		nodeFontAbstractName = "Helvetica-Oblique";
    +		nodeFontColor = "black";
     		nodeFontSize = 10;
     		nodeFillColor = null;
    +		bgColor = null;
     	}
     
     	public Object clone() 
    @@ -92,6 +97,24 @@ class Options implements Cloneable {
     			showType = true;
     		} else if(opt[0].equals("-all")) {
     			setAll();
    +		} else if(opt[0].equals("-bgcolor")) {
    +			bgColor = opt[1];
    +		} else if(opt[0].equals("-edgecolor")) {
    +			edgeColor = opt[1];
    +		} else if(opt[0].equals("-edgefontcolor")) {
    +			edgeFontColor = opt[1];
    +		} else if(opt[0].equals("-edgefontname")) {
    +			edgeFontName = opt[1];
    +		} else if(opt[0].equals("-edgefontsize")) {
    +			edgeFontSize = Integer.parseInt(opt[1]);
    +		} else if(opt[0].equals("-nodefontcolor")) {
    +			nodeFontColor = opt[1];
    +		} else if(opt[0].equals("-nodefontname")) {
    +			nodeFontName = opt[1];
    +		} else if(opt[0].equals("-nodefontabstractname")) {
    +			nodeFontAbstractName = opt[1];
    +		} else if(opt[0].equals("-nodefontsize")) {
    +			nodeFontSize = Integer.parseInt(opt[1]);
     		} else if(opt[0].equals("-nodefillcolor")) {
     			nodeFillColor = opt[1];
     		}
    @@ -380,9 +403,12 @@ class ClassGraph {
     				opt.w.print("}\"");
     			// Use ariali for gif output
     			if (c.isAbstract())
    -				opt.w.print(", fontname=\"Helvetica-Oblique\"");
    +				opt.w.print(", fontname=\"" + opt.nodeFontAbstractName + "\"");
     			if (opt.nodeFillColor != null)
     				opt.w.print(", style=filled, fillcolor=\"" + opt.nodeFillColor + "\"");
    +			opt.w.print(", fontname=\"" + opt.nodeFontName + "\"");
    +			opt.w.print(", fontcolor=\"" + opt.nodeFontColor + "\"");
    +			opt.w.print(", fontsize=" + opt.nodeFontSize);
     			opt.w.println("];");
     			ci.nodePrinted = true;
     		}
    @@ -408,6 +434,10 @@ class ClassGraph {
     				"taillabel=\"" + t[0] + "\", " + 
     				"label=\"" + StringFuns.guillemize(t[1]) + "\", " + 
     				"headlabel=\"" + t[2] + "\", " + 
    +				"fontname=\"" + opt.edgeFontName + "\", " + 
    +				"fontcolor=\"" + opt.edgeFontColor + "\", " + 
    +				"fontsize=" + opt.edgeFontSize + ", " + 
    +				"color=\"" + opt.edgeColor + "\", " + 
     				edgetype + "]"
     			);
     		}
    @@ -476,7 +506,16 @@ public class UmlGraph {
     		   option.equals("-types") ||
     		   option.equals("-all"))
     			return 1;
    -		else if(option.equals("-nodefillcolor"))
    +		else if(option.equals("-nodefillcolor") ||
    +		   option.equals("-nodefontcolor") ||
    +		   option.equals("-nodefontsize") ||
    +		   option.equals("-nodefontname") ||
    +		   option.equals("-nodefontabstractname") ||
    +		   option.equals("-edgefontcolor") ||
    +		   option.equals("-edgecolor") ||
    +		   option.equals("-edgefontsize") ||
    +		   option.equals("-edgefontname") ||
    +		   option.equals("-bgcolor"))
     			return 2;
     		else
     			return 0;
    @@ -497,6 +536,8 @@ public class UmlGraph {
     		);
     		if (opt.horizontal)
     			opt.w.println("\trankdir=LR;\n\tranksep=1;");
    +		if (opt.bgColor != null)
    +			opt.w.println("\tbgcolor=\"" + opt.bgColor + "\";\n");
     	}
     
     	/** Dot epilogue */
    diff --git a/src/gr/spinellis/umlgraph/doclet/Options.java b/src/gr/spinellis/umlgraph/doclet/Options.java
    index e86c7e2..8d47494 100644
    --- a/src/gr/spinellis/umlgraph/doclet/Options.java
    +++ b/src/gr/spinellis/umlgraph/doclet/Options.java
    @@ -36,11 +36,14 @@ class Options implements Cloneable {
     	boolean showType;
     	String edgeFontName;
     	String edgeFontColor;
    +	String edgeColor;
     	double edgeFontSize;
     	String nodeFontName;
    +	String nodeFontAbstractName;
     	String nodeFontColor;
     	double nodeFontSize;
     	String nodeFillColor;
    +	String bgColor;
     
     	Options() {
     		showQualified = false;
    @@ -49,12 +52,14 @@ class Options implements Cloneable {
     		showVisibility = false;
     		showType = false;
     		edgeFontName = "Helvetica";
    -		edgeFontColor = null;
    +		edgeFontColor = "black";
    +		edgeColor = "black";
     		edgeFontSize = 10;
    -		nodeFontName = "Helvetica";
    -		nodeFontColor = null;
    +		nodeFontAbstractName = "Helvetica-Oblique";
    +		nodeFontColor = "black";
     		nodeFontSize = 10;
     		nodeFillColor = null;
    +		bgColor = null;
     	}
     
     	public Object clone() 
    @@ -92,6 +97,24 @@ class Options implements Cloneable {
     			showType = true;
     		} else if(opt[0].equals("-all")) {
     			setAll();
    +		} else if(opt[0].equals("-bgcolor")) {
    +			bgColor = opt[1];
    +		} else if(opt[0].equals("-edgecolor")) {
    +			edgeColor = opt[1];
    +		} else if(opt[0].equals("-edgefontcolor")) {
    +			edgeFontColor = opt[1];
    +		} else if(opt[0].equals("-edgefontname")) {
    +			edgeFontName = opt[1];
    +		} else if(opt[0].equals("-edgefontsize")) {
    +			edgeFontSize = Integer.parseInt(opt[1]);
    +		} else if(opt[0].equals("-nodefontcolor")) {
    +			nodeFontColor = opt[1];
    +		} else if(opt[0].equals("-nodefontname")) {
    +			nodeFontName = opt[1];
    +		} else if(opt[0].equals("-nodefontabstractname")) {
    +			nodeFontAbstractName = opt[1];
    +		} else if(opt[0].equals("-nodefontsize")) {
    +			nodeFontSize = Integer.parseInt(opt[1]);
     		} else if(opt[0].equals("-nodefillcolor")) {
     			nodeFillColor = opt[1];
     		}
    @@ -380,9 +403,12 @@ class ClassGraph {
     				opt.w.print("}\"");
     			// Use ariali for gif output
     			if (c.isAbstract())
    -				opt.w.print(", fontname=\"Helvetica-Oblique\"");
    +				opt.w.print(", fontname=\"" + opt.nodeFontAbstractName + "\"");
     			if (opt.nodeFillColor != null)
     				opt.w.print(", style=filled, fillcolor=\"" + opt.nodeFillColor + "\"");
    +			opt.w.print(", fontname=\"" + opt.nodeFontName + "\"");
    +			opt.w.print(", fontcolor=\"" + opt.nodeFontColor + "\"");
    +			opt.w.print(", fontsize=" + opt.nodeFontSize);
     			opt.w.println("];");
     			ci.nodePrinted = true;
     		}
    @@ -408,6 +434,10 @@ class ClassGraph {
     				"taillabel=\"" + t[0] + "\", " + 
     				"label=\"" + StringFuns.guillemize(t[1]) + "\", " + 
     				"headlabel=\"" + t[2] + "\", " + 
    +				"fontname=\"" + opt.edgeFontName + "\", " + 
    +				"fontcolor=\"" + opt.edgeFontColor + "\", " + 
    +				"fontsize=" + opt.edgeFontSize + ", " + 
    +				"color=\"" + opt.edgeColor + "\", " + 
     				edgetype + "]"
     			);
     		}
    @@ -476,7 +506,16 @@ public class UmlGraph {
     		   option.equals("-types") ||
     		   option.equals("-all"))
     			return 1;
    -		else if(option.equals("-nodefillcolor"))
    +		else if(option.equals("-nodefillcolor") ||
    +		   option.equals("-nodefontcolor") ||
    +		   option.equals("-nodefontsize") ||
    +		   option.equals("-nodefontname") ||
    +		   option.equals("-nodefontabstractname") ||
    +		   option.equals("-edgefontcolor") ||
    +		   option.equals("-edgecolor") ||
    +		   option.equals("-edgefontsize") ||
    +		   option.equals("-edgefontname") ||
    +		   option.equals("-bgcolor"))
     			return 2;
     		else
     			return 0;
    @@ -497,6 +536,8 @@ public class UmlGraph {
     		);
     		if (opt.horizontal)
     			opt.w.println("\trankdir=LR;\n\tranksep=1;");
    +		if (opt.bgColor != null)
    +			opt.w.println("\tbgcolor=\"" + opt.bgColor + "\";\n");
     	}
     
     	/** Dot epilogue */
    diff --git a/src/gr/spinellis/umlgraph/doclet/StringUtil.java b/src/gr/spinellis/umlgraph/doclet/StringUtil.java
    index e86c7e2..8d47494 100644
    --- a/src/gr/spinellis/umlgraph/doclet/StringUtil.java
    +++ b/src/gr/spinellis/umlgraph/doclet/StringUtil.java
    @@ -36,11 +36,14 @@ class Options implements Cloneable {
     	boolean showType;
     	String edgeFontName;
     	String edgeFontColor;
    +	String edgeColor;
     	double edgeFontSize;
     	String nodeFontName;
    +	String nodeFontAbstractName;
     	String nodeFontColor;
     	double nodeFontSize;
     	String nodeFillColor;
    +	String bgColor;
     
     	Options() {
     		showQualified = false;
    @@ -49,12 +52,14 @@ class Options implements Cloneable {
     		showVisibility = false;
     		showType = false;
     		edgeFontName = "Helvetica";
    -		edgeFontColor = null;
    +		edgeFontColor = "black";
    +		edgeColor = "black";
     		edgeFontSize = 10;
    -		nodeFontName = "Helvetica";
    -		nodeFontColor = null;
    +		nodeFontAbstractName = "Helvetica-Oblique";
    +		nodeFontColor = "black";
     		nodeFontSize = 10;
     		nodeFillColor = null;
    +		bgColor = null;
     	}
     
     	public Object clone() 
    @@ -92,6 +97,24 @@ class Options implements Cloneable {
     			showType = true;
     		} else if(opt[0].equals("-all")) {
     			setAll();
    +		} else if(opt[0].equals("-bgcolor")) {
    +			bgColor = opt[1];
    +		} else if(opt[0].equals("-edgecolor")) {
    +			edgeColor = opt[1];
    +		} else if(opt[0].equals("-edgefontcolor")) {
    +			edgeFontColor = opt[1];
    +		} else if(opt[0].equals("-edgefontname")) {
    +			edgeFontName = opt[1];
    +		} else if(opt[0].equals("-edgefontsize")) {
    +			edgeFontSize = Integer.parseInt(opt[1]);
    +		} else if(opt[0].equals("-nodefontcolor")) {
    +			nodeFontColor = opt[1];
    +		} else if(opt[0].equals("-nodefontname")) {
    +			nodeFontName = opt[1];
    +		} else if(opt[0].equals("-nodefontabstractname")) {
    +			nodeFontAbstractName = opt[1];
    +		} else if(opt[0].equals("-nodefontsize")) {
    +			nodeFontSize = Integer.parseInt(opt[1]);
     		} else if(opt[0].equals("-nodefillcolor")) {
     			nodeFillColor = opt[1];
     		}
    @@ -380,9 +403,12 @@ class ClassGraph {
     				opt.w.print("}\"");
     			// Use ariali for gif output
     			if (c.isAbstract())
    -				opt.w.print(", fontname=\"Helvetica-Oblique\"");
    +				opt.w.print(", fontname=\"" + opt.nodeFontAbstractName + "\"");
     			if (opt.nodeFillColor != null)
     				opt.w.print(", style=filled, fillcolor=\"" + opt.nodeFillColor + "\"");
    +			opt.w.print(", fontname=\"" + opt.nodeFontName + "\"");
    +			opt.w.print(", fontcolor=\"" + opt.nodeFontColor + "\"");
    +			opt.w.print(", fontsize=" + opt.nodeFontSize);
     			opt.w.println("];");
     			ci.nodePrinted = true;
     		}
    @@ -408,6 +434,10 @@ class ClassGraph {
     				"taillabel=\"" + t[0] + "\", " + 
     				"label=\"" + StringFuns.guillemize(t[1]) + "\", " + 
     				"headlabel=\"" + t[2] + "\", " + 
    +				"fontname=\"" + opt.edgeFontName + "\", " + 
    +				"fontcolor=\"" + opt.edgeFontColor + "\", " + 
    +				"fontsize=" + opt.edgeFontSize + ", " + 
    +				"color=\"" + opt.edgeColor + "\", " + 
     				edgetype + "]"
     			);
     		}
    @@ -476,7 +506,16 @@ public class UmlGraph {
     		   option.equals("-types") ||
     		   option.equals("-all"))
     			return 1;
    -		else if(option.equals("-nodefillcolor"))
    +		else if(option.equals("-nodefillcolor") ||
    +		   option.equals("-nodefontcolor") ||
    +		   option.equals("-nodefontsize") ||
    +		   option.equals("-nodefontname") ||
    +		   option.equals("-nodefontabstractname") ||
    +		   option.equals("-edgefontcolor") ||
    +		   option.equals("-edgecolor") ||
    +		   option.equals("-edgefontsize") ||
    +		   option.equals("-edgefontname") ||
    +		   option.equals("-bgcolor"))
     			return 2;
     		else
     			return 0;
    @@ -497,6 +536,8 @@ public class UmlGraph {
     		);
     		if (opt.horizontal)
     			opt.w.println("\trankdir=LR;\n\tranksep=1;");
    +		if (opt.bgColor != null)
    +			opt.w.println("\tbgcolor=\"" + opt.bgColor + "\";\n");
     	}
     
     	/** Dot epilogue */
    diff --git a/src/gr/spinellis/umlgraph/doclet/UmlGraph.java b/src/gr/spinellis/umlgraph/doclet/UmlGraph.java
    index e86c7e2..8d47494 100644
    --- a/src/gr/spinellis/umlgraph/doclet/UmlGraph.java
    +++ b/src/gr/spinellis/umlgraph/doclet/UmlGraph.java
    @@ -36,11 +36,14 @@ class Options implements Cloneable {
     	boolean showType;
     	String edgeFontName;
     	String edgeFontColor;
    +	String edgeColor;
     	double edgeFontSize;
     	String nodeFontName;
    +	String nodeFontAbstractName;
     	String nodeFontColor;
     	double nodeFontSize;
     	String nodeFillColor;
    +	String bgColor;
     
     	Options() {
     		showQualified = false;
    @@ -49,12 +52,14 @@ class Options implements Cloneable {
     		showVisibility = false;
     		showType = false;
     		edgeFontName = "Helvetica";
    -		edgeFontColor = null;
    +		edgeFontColor = "black";
    +		edgeColor = "black";
     		edgeFontSize = 10;
    -		nodeFontName = "Helvetica";
    -		nodeFontColor = null;
    +		nodeFontAbstractName = "Helvetica-Oblique";
    +		nodeFontColor = "black";
     		nodeFontSize = 10;
     		nodeFillColor = null;
    +		bgColor = null;
     	}
     
     	public Object clone() 
    @@ -92,6 +97,24 @@ class Options implements Cloneable {
     			showType = true;
     		} else if(opt[0].equals("-all")) {
     			setAll();
    +		} else if(opt[0].equals("-bgcolor")) {
    +			bgColor = opt[1];
    +		} else if(opt[0].equals("-edgecolor")) {
    +			edgeColor = opt[1];
    +		} else if(opt[0].equals("-edgefontcolor")) {
    +			edgeFontColor = opt[1];
    +		} else if(opt[0].equals("-edgefontname")) {
    +			edgeFontName = opt[1];
    +		} else if(opt[0].equals("-edgefontsize")) {
    +			edgeFontSize = Integer.parseInt(opt[1]);
    +		} else if(opt[0].equals("-nodefontcolor")) {
    +			nodeFontColor = opt[1];
    +		} else if(opt[0].equals("-nodefontname")) {
    +			nodeFontName = opt[1];
    +		} else if(opt[0].equals("-nodefontabstractname")) {
    +			nodeFontAbstractName = opt[1];
    +		} else if(opt[0].equals("-nodefontsize")) {
    +			nodeFontSize = Integer.parseInt(opt[1]);
     		} else if(opt[0].equals("-nodefillcolor")) {
     			nodeFillColor = opt[1];
     		}
    @@ -380,9 +403,12 @@ class ClassGraph {
     				opt.w.print("}\"");
     			// Use ariali for gif output
     			if (c.isAbstract())
    -				opt.w.print(", fontname=\"Helvetica-Oblique\"");
    +				opt.w.print(", fontname=\"" + opt.nodeFontAbstractName + "\"");
     			if (opt.nodeFillColor != null)
     				opt.w.print(", style=filled, fillcolor=\"" + opt.nodeFillColor + "\"");
    +			opt.w.print(", fontname=\"" + opt.nodeFontName + "\"");
    +			opt.w.print(", fontcolor=\"" + opt.nodeFontColor + "\"");
    +			opt.w.print(", fontsize=" + opt.nodeFontSize);
     			opt.w.println("];");
     			ci.nodePrinted = true;
     		}
    @@ -408,6 +434,10 @@ class ClassGraph {
     				"taillabel=\"" + t[0] + "\", " + 
     				"label=\"" + StringFuns.guillemize(t[1]) + "\", " + 
     				"headlabel=\"" + t[2] + "\", " + 
    +				"fontname=\"" + opt.edgeFontName + "\", " + 
    +				"fontcolor=\"" + opt.edgeFontColor + "\", " + 
    +				"fontsize=" + opt.edgeFontSize + ", " + 
    +				"color=\"" + opt.edgeColor + "\", " + 
     				edgetype + "]"
     			);
     		}
    @@ -476,7 +506,16 @@ public class UmlGraph {
     		   option.equals("-types") ||
     		   option.equals("-all"))
     			return 1;
    -		else if(option.equals("-nodefillcolor"))
    +		else if(option.equals("-nodefillcolor") ||
    +		   option.equals("-nodefontcolor") ||
    +		   option.equals("-nodefontsize") ||
    +		   option.equals("-nodefontname") ||
    +		   option.equals("-nodefontabstractname") ||
    +		   option.equals("-edgefontcolor") ||
    +		   option.equals("-edgecolor") ||
    +		   option.equals("-edgefontsize") ||
    +		   option.equals("-edgefontname") ||
    +		   option.equals("-bgcolor"))
     			return 2;
     		else
     			return 0;
    @@ -497,6 +536,8 @@ public class UmlGraph {
     		);
     		if (opt.horizontal)
     			opt.w.println("\trankdir=LR;\n\tranksep=1;");
    +		if (opt.bgColor != null)
    +			opt.w.println("\tbgcolor=\"" + opt.bgColor + "\";\n");
     	}
     
     	/** Dot epilogue */
    diff --git a/src/org/umlgraph/doclet/ClassGraph.java b/src/org/umlgraph/doclet/ClassGraph.java
    index e86c7e2..8d47494 100644
    --- a/src/org/umlgraph/doclet/ClassGraph.java
    +++ b/src/org/umlgraph/doclet/ClassGraph.java
    @@ -36,11 +36,14 @@ class Options implements Cloneable {
     	boolean showType;
     	String edgeFontName;
     	String edgeFontColor;
    +	String edgeColor;
     	double edgeFontSize;
     	String nodeFontName;
    +	String nodeFontAbstractName;
     	String nodeFontColor;
     	double nodeFontSize;
     	String nodeFillColor;
    +	String bgColor;
     
     	Options() {
     		showQualified = false;
    @@ -49,12 +52,14 @@ class Options implements Cloneable {
     		showVisibility = false;
     		showType = false;
     		edgeFontName = "Helvetica";
    -		edgeFontColor = null;
    +		edgeFontColor = "black";
    +		edgeColor = "black";
     		edgeFontSize = 10;
    -		nodeFontName = "Helvetica";
    -		nodeFontColor = null;
    +		nodeFontAbstractName = "Helvetica-Oblique";
    +		nodeFontColor = "black";
     		nodeFontSize = 10;
     		nodeFillColor = null;
    +		bgColor = null;
     	}
     
     	public Object clone() 
    @@ -92,6 +97,24 @@ class Options implements Cloneable {
     			showType = true;
     		} else if(opt[0].equals("-all")) {
     			setAll();
    +		} else if(opt[0].equals("-bgcolor")) {
    +			bgColor = opt[1];
    +		} else if(opt[0].equals("-edgecolor")) {
    +			edgeColor = opt[1];
    +		} else if(opt[0].equals("-edgefontcolor")) {
    +			edgeFontColor = opt[1];
    +		} else if(opt[0].equals("-edgefontname")) {
    +			edgeFontName = opt[1];
    +		} else if(opt[0].equals("-edgefontsize")) {
    +			edgeFontSize = Integer.parseInt(opt[1]);
    +		} else if(opt[0].equals("-nodefontcolor")) {
    +			nodeFontColor = opt[1];
    +		} else if(opt[0].equals("-nodefontname")) {
    +			nodeFontName = opt[1];
    +		} else if(opt[0].equals("-nodefontabstractname")) {
    +			nodeFontAbstractName = opt[1];
    +		} else if(opt[0].equals("-nodefontsize")) {
    +			nodeFontSize = Integer.parseInt(opt[1]);
     		} else if(opt[0].equals("-nodefillcolor")) {
     			nodeFillColor = opt[1];
     		}
    @@ -380,9 +403,12 @@ class ClassGraph {
     				opt.w.print("}\"");
     			// Use ariali for gif output
     			if (c.isAbstract())
    -				opt.w.print(", fontname=\"Helvetica-Oblique\"");
    +				opt.w.print(", fontname=\"" + opt.nodeFontAbstractName + "\"");
     			if (opt.nodeFillColor != null)
     				opt.w.print(", style=filled, fillcolor=\"" + opt.nodeFillColor + "\"");
    +			opt.w.print(", fontname=\"" + opt.nodeFontName + "\"");
    +			opt.w.print(", fontcolor=\"" + opt.nodeFontColor + "\"");
    +			opt.w.print(", fontsize=" + opt.nodeFontSize);
     			opt.w.println("];");
     			ci.nodePrinted = true;
     		}
    @@ -408,6 +434,10 @@ class ClassGraph {
     				"taillabel=\"" + t[0] + "\", " + 
     				"label=\"" + StringFuns.guillemize(t[1]) + "\", " + 
     				"headlabel=\"" + t[2] + "\", " + 
    +				"fontname=\"" + opt.edgeFontName + "\", " + 
    +				"fontcolor=\"" + opt.edgeFontColor + "\", " + 
    +				"fontsize=" + opt.edgeFontSize + ", " + 
    +				"color=\"" + opt.edgeColor + "\", " + 
     				edgetype + "]"
     			);
     		}
    @@ -476,7 +506,16 @@ public class UmlGraph {
     		   option.equals("-types") ||
     		   option.equals("-all"))
     			return 1;
    -		else if(option.equals("-nodefillcolor"))
    +		else if(option.equals("-nodefillcolor") ||
    +		   option.equals("-nodefontcolor") ||
    +		   option.equals("-nodefontsize") ||
    +		   option.equals("-nodefontname") ||
    +		   option.equals("-nodefontabstractname") ||
    +		   option.equals("-edgefontcolor") ||
    +		   option.equals("-edgecolor") ||
    +		   option.equals("-edgefontsize") ||
    +		   option.equals("-edgefontname") ||
    +		   option.equals("-bgcolor"))
     			return 2;
     		else
     			return 0;
    @@ -497,6 +536,8 @@ public class UmlGraph {
     		);
     		if (opt.horizontal)
     			opt.w.println("\trankdir=LR;\n\tranksep=1;");
    +		if (opt.bgColor != null)
    +			opt.w.println("\tbgcolor=\"" + opt.bgColor + "\";\n");
     	}
     
     	/** Dot epilogue */
    diff --git a/src/org/umlgraph/doclet/ClassInfo.java b/src/org/umlgraph/doclet/ClassInfo.java
    index e86c7e2..8d47494 100644
    --- a/src/org/umlgraph/doclet/ClassInfo.java
    +++ b/src/org/umlgraph/doclet/ClassInfo.java
    @@ -36,11 +36,14 @@ class Options implements Cloneable {
     	boolean showType;
     	String edgeFontName;
     	String edgeFontColor;
    +	String edgeColor;
     	double edgeFontSize;
     	String nodeFontName;
    +	String nodeFontAbstractName;
     	String nodeFontColor;
     	double nodeFontSize;
     	String nodeFillColor;
    +	String bgColor;
     
     	Options() {
     		showQualified = false;
    @@ -49,12 +52,14 @@ class Options implements Cloneable {
     		showVisibility = false;
     		showType = false;
     		edgeFontName = "Helvetica";
    -		edgeFontColor = null;
    +		edgeFontColor = "black";
    +		edgeColor = "black";
     		edgeFontSize = 10;
    -		nodeFontName = "Helvetica";
    -		nodeFontColor = null;
    +		nodeFontAbstractName = "Helvetica-Oblique";
    +		nodeFontColor = "black";
     		nodeFontSize = 10;
     		nodeFillColor = null;
    +		bgColor = null;
     	}
     
     	public Object clone() 
    @@ -92,6 +97,24 @@ class Options implements Cloneable {
     			showType = true;
     		} else if(opt[0].equals("-all")) {
     			setAll();
    +		} else if(opt[0].equals("-bgcolor")) {
    +			bgColor = opt[1];
    +		} else if(opt[0].equals("-edgecolor")) {
    +			edgeColor = opt[1];
    +		} else if(opt[0].equals("-edgefontcolor")) {
    +			edgeFontColor = opt[1];
    +		} else if(opt[0].equals("-edgefontname")) {
    +			edgeFontName = opt[1];
    +		} else if(opt[0].equals("-edgefontsize")) {
    +			edgeFontSize = Integer.parseInt(opt[1]);
    +		} else if(opt[0].equals("-nodefontcolor")) {
    +			nodeFontColor = opt[1];
    +		} else if(opt[0].equals("-nodefontname")) {
    +			nodeFontName = opt[1];
    +		} else if(opt[0].equals("-nodefontabstractname")) {
    +			nodeFontAbstractName = opt[1];
    +		} else if(opt[0].equals("-nodefontsize")) {
    +			nodeFontSize = Integer.parseInt(opt[1]);
     		} else if(opt[0].equals("-nodefillcolor")) {
     			nodeFillColor = opt[1];
     		}
    @@ -380,9 +403,12 @@ class ClassGraph {
     				opt.w.print("}\"");
     			// Use ariali for gif output
     			if (c.isAbstract())
    -				opt.w.print(", fontname=\"Helvetica-Oblique\"");
    +				opt.w.print(", fontname=\"" + opt.nodeFontAbstractName + "\"");
     			if (opt.nodeFillColor != null)
     				opt.w.print(", style=filled, fillcolor=\"" + opt.nodeFillColor + "\"");
    +			opt.w.print(", fontname=\"" + opt.nodeFontName + "\"");
    +			opt.w.print(", fontcolor=\"" + opt.nodeFontColor + "\"");
    +			opt.w.print(", fontsize=" + opt.nodeFontSize);
     			opt.w.println("];");
     			ci.nodePrinted = true;
     		}
    @@ -408,6 +434,10 @@ class ClassGraph {
     				"taillabel=\"" + t[0] + "\", " + 
     				"label=\"" + StringFuns.guillemize(t[1]) + "\", " + 
     				"headlabel=\"" + t[2] + "\", " + 
    +				"fontname=\"" + opt.edgeFontName + "\", " + 
    +				"fontcolor=\"" + opt.edgeFontColor + "\", " + 
    +				"fontsize=" + opt.edgeFontSize + ", " + 
    +				"color=\"" + opt.edgeColor + "\", " + 
     				edgetype + "]"
     			);
     		}
    @@ -476,7 +506,16 @@ public class UmlGraph {
     		   option.equals("-types") ||
     		   option.equals("-all"))
     			return 1;
    -		else if(option.equals("-nodefillcolor"))
    +		else if(option.equals("-nodefillcolor") ||
    +		   option.equals("-nodefontcolor") ||
    +		   option.equals("-nodefontsize") ||
    +		   option.equals("-nodefontname") ||
    +		   option.equals("-nodefontabstractname") ||
    +		   option.equals("-edgefontcolor") ||
    +		   option.equals("-edgecolor") ||
    +		   option.equals("-edgefontsize") ||
    +		   option.equals("-edgefontname") ||
    +		   option.equals("-bgcolor"))
     			return 2;
     		else
     			return 0;
    @@ -497,6 +536,8 @@ public class UmlGraph {
     		);
     		if (opt.horizontal)
     			opt.w.println("\trankdir=LR;\n\tranksep=1;");
    +		if (opt.bgColor != null)
    +			opt.w.println("\tbgcolor=\"" + opt.bgColor + "\";\n");
     	}
     
     	/** Dot epilogue */
    diff --git a/src/org/umlgraph/doclet/Options.java b/src/org/umlgraph/doclet/Options.java
    index e86c7e2..8d47494 100644
    --- a/src/org/umlgraph/doclet/Options.java
    +++ b/src/org/umlgraph/doclet/Options.java
    @@ -36,11 +36,14 @@ class Options implements Cloneable {
     	boolean showType;
     	String edgeFontName;
     	String edgeFontColor;
    +	String edgeColor;
     	double edgeFontSize;
     	String nodeFontName;
    +	String nodeFontAbstractName;
     	String nodeFontColor;
     	double nodeFontSize;
     	String nodeFillColor;
    +	String bgColor;
     
     	Options() {
     		showQualified = false;
    @@ -49,12 +52,14 @@ class Options implements Cloneable {
     		showVisibility = false;
     		showType = false;
     		edgeFontName = "Helvetica";
    -		edgeFontColor = null;
    +		edgeFontColor = "black";
    +		edgeColor = "black";
     		edgeFontSize = 10;
    -		nodeFontName = "Helvetica";
    -		nodeFontColor = null;
    +		nodeFontAbstractName = "Helvetica-Oblique";
    +		nodeFontColor = "black";
     		nodeFontSize = 10;
     		nodeFillColor = null;
    +		bgColor = null;
     	}
     
     	public Object clone() 
    @@ -92,6 +97,24 @@ class Options implements Cloneable {
     			showType = true;
     		} else if(opt[0].equals("-all")) {
     			setAll();
    +		} else if(opt[0].equals("-bgcolor")) {
    +			bgColor = opt[1];
    +		} else if(opt[0].equals("-edgecolor")) {
    +			edgeColor = opt[1];
    +		} else if(opt[0].equals("-edgefontcolor")) {
    +			edgeFontColor = opt[1];
    +		} else if(opt[0].equals("-edgefontname")) {
    +			edgeFontName = opt[1];
    +		} else if(opt[0].equals("-edgefontsize")) {
    +			edgeFontSize = Integer.parseInt(opt[1]);
    +		} else if(opt[0].equals("-nodefontcolor")) {
    +			nodeFontColor = opt[1];
    +		} else if(opt[0].equals("-nodefontname")) {
    +			nodeFontName = opt[1];
    +		} else if(opt[0].equals("-nodefontabstractname")) {
    +			nodeFontAbstractName = opt[1];
    +		} else if(opt[0].equals("-nodefontsize")) {
    +			nodeFontSize = Integer.parseInt(opt[1]);
     		} else if(opt[0].equals("-nodefillcolor")) {
     			nodeFillColor = opt[1];
     		}
    @@ -380,9 +403,12 @@ class ClassGraph {
     				opt.w.print("}\"");
     			// Use ariali for gif output
     			if (c.isAbstract())
    -				opt.w.print(", fontname=\"Helvetica-Oblique\"");
    +				opt.w.print(", fontname=\"" + opt.nodeFontAbstractName + "\"");
     			if (opt.nodeFillColor != null)
     				opt.w.print(", style=filled, fillcolor=\"" + opt.nodeFillColor + "\"");
    +			opt.w.print(", fontname=\"" + opt.nodeFontName + "\"");
    +			opt.w.print(", fontcolor=\"" + opt.nodeFontColor + "\"");
    +			opt.w.print(", fontsize=" + opt.nodeFontSize);
     			opt.w.println("];");
     			ci.nodePrinted = true;
     		}
    @@ -408,6 +434,10 @@ class ClassGraph {
     				"taillabel=\"" + t[0] + "\", " + 
     				"label=\"" + StringFuns.guillemize(t[1]) + "\", " + 
     				"headlabel=\"" + t[2] + "\", " + 
    +				"fontname=\"" + opt.edgeFontName + "\", " + 
    +				"fontcolor=\"" + opt.edgeFontColor + "\", " + 
    +				"fontsize=" + opt.edgeFontSize + ", " + 
    +				"color=\"" + opt.edgeColor + "\", " + 
     				edgetype + "]"
     			);
     		}
    @@ -476,7 +506,16 @@ public class UmlGraph {
     		   option.equals("-types") ||
     		   option.equals("-all"))
     			return 1;
    -		else if(option.equals("-nodefillcolor"))
    +		else if(option.equals("-nodefillcolor") ||
    +		   option.equals("-nodefontcolor") ||
    +		   option.equals("-nodefontsize") ||
    +		   option.equals("-nodefontname") ||
    +		   option.equals("-nodefontabstractname") ||
    +		   option.equals("-edgefontcolor") ||
    +		   option.equals("-edgecolor") ||
    +		   option.equals("-edgefontsize") ||
    +		   option.equals("-edgefontname") ||
    +		   option.equals("-bgcolor"))
     			return 2;
     		else
     			return 0;
    @@ -497,6 +536,8 @@ public class UmlGraph {
     		);
     		if (opt.horizontal)
     			opt.w.println("\trankdir=LR;\n\tranksep=1;");
    +		if (opt.bgColor != null)
    +			opt.w.println("\tbgcolor=\"" + opt.bgColor + "\";\n");
     	}
     
     	/** Dot epilogue */
    diff --git a/src/org/umlgraph/doclet/StringUtil.java b/src/org/umlgraph/doclet/StringUtil.java
    index e86c7e2..8d47494 100644
    --- a/src/org/umlgraph/doclet/StringUtil.java
    +++ b/src/org/umlgraph/doclet/StringUtil.java
    @@ -36,11 +36,14 @@ class Options implements Cloneable {
     	boolean showType;
     	String edgeFontName;
     	String edgeFontColor;
    +	String edgeColor;
     	double edgeFontSize;
     	String nodeFontName;
    +	String nodeFontAbstractName;
     	String nodeFontColor;
     	double nodeFontSize;
     	String nodeFillColor;
    +	String bgColor;
     
     	Options() {
     		showQualified = false;
    @@ -49,12 +52,14 @@ class Options implements Cloneable {
     		showVisibility = false;
     		showType = false;
     		edgeFontName = "Helvetica";
    -		edgeFontColor = null;
    +		edgeFontColor = "black";
    +		edgeColor = "black";
     		edgeFontSize = 10;
    -		nodeFontName = "Helvetica";
    -		nodeFontColor = null;
    +		nodeFontAbstractName = "Helvetica-Oblique";
    +		nodeFontColor = "black";
     		nodeFontSize = 10;
     		nodeFillColor = null;
    +		bgColor = null;
     	}
     
     	public Object clone() 
    @@ -92,6 +97,24 @@ class Options implements Cloneable {
     			showType = true;
     		} else if(opt[0].equals("-all")) {
     			setAll();
    +		} else if(opt[0].equals("-bgcolor")) {
    +			bgColor = opt[1];
    +		} else if(opt[0].equals("-edgecolor")) {
    +			edgeColor = opt[1];
    +		} else if(opt[0].equals("-edgefontcolor")) {
    +			edgeFontColor = opt[1];
    +		} else if(opt[0].equals("-edgefontname")) {
    +			edgeFontName = opt[1];
    +		} else if(opt[0].equals("-edgefontsize")) {
    +			edgeFontSize = Integer.parseInt(opt[1]);
    +		} else if(opt[0].equals("-nodefontcolor")) {
    +			nodeFontColor = opt[1];
    +		} else if(opt[0].equals("-nodefontname")) {
    +			nodeFontName = opt[1];
    +		} else if(opt[0].equals("-nodefontabstractname")) {
    +			nodeFontAbstractName = opt[1];
    +		} else if(opt[0].equals("-nodefontsize")) {
    +			nodeFontSize = Integer.parseInt(opt[1]);
     		} else if(opt[0].equals("-nodefillcolor")) {
     			nodeFillColor = opt[1];
     		}
    @@ -380,9 +403,12 @@ class ClassGraph {
     				opt.w.print("}\"");
     			// Use ariali for gif output
     			if (c.isAbstract())
    -				opt.w.print(", fontname=\"Helvetica-Oblique\"");
    +				opt.w.print(", fontname=\"" + opt.nodeFontAbstractName + "\"");
     			if (opt.nodeFillColor != null)
     				opt.w.print(", style=filled, fillcolor=\"" + opt.nodeFillColor + "\"");
    +			opt.w.print(", fontname=\"" + opt.nodeFontName + "\"");
    +			opt.w.print(", fontcolor=\"" + opt.nodeFontColor + "\"");
    +			opt.w.print(", fontsize=" + opt.nodeFontSize);
     			opt.w.println("];");
     			ci.nodePrinted = true;
     		}
    @@ -408,6 +434,10 @@ class ClassGraph {
     				"taillabel=\"" + t[0] + "\", " + 
     				"label=\"" + StringFuns.guillemize(t[1]) + "\", " + 
     				"headlabel=\"" + t[2] + "\", " + 
    +				"fontname=\"" + opt.edgeFontName + "\", " + 
    +				"fontcolor=\"" + opt.edgeFontColor + "\", " + 
    +				"fontsize=" + opt.edgeFontSize + ", " + 
    +				"color=\"" + opt.edgeColor + "\", " + 
     				edgetype + "]"
     			);
     		}
    @@ -476,7 +506,16 @@ public class UmlGraph {
     		   option.equals("-types") ||
     		   option.equals("-all"))
     			return 1;
    -		else if(option.equals("-nodefillcolor"))
    +		else if(option.equals("-nodefillcolor") ||
    +		   option.equals("-nodefontcolor") ||
    +		   option.equals("-nodefontsize") ||
    +		   option.equals("-nodefontname") ||
    +		   option.equals("-nodefontabstractname") ||
    +		   option.equals("-edgefontcolor") ||
    +		   option.equals("-edgecolor") ||
    +		   option.equals("-edgefontsize") ||
    +		   option.equals("-edgefontname") ||
    +		   option.equals("-bgcolor"))
     			return 2;
     		else
     			return 0;
    @@ -497,6 +536,8 @@ public class UmlGraph {
     		);
     		if (opt.horizontal)
     			opt.w.println("\trankdir=LR;\n\tranksep=1;");
    +		if (opt.bgColor != null)
    +			opt.w.println("\tbgcolor=\"" + opt.bgColor + "\";\n");
     	}
     
     	/** Dot epilogue */
    diff --git a/src/org/umlgraph/doclet/UmlGraph.java b/src/org/umlgraph/doclet/UmlGraph.java
    index e86c7e2..8d47494 100644
    --- a/src/org/umlgraph/doclet/UmlGraph.java
    +++ b/src/org/umlgraph/doclet/UmlGraph.java
    @@ -36,11 +36,14 @@ class Options implements Cloneable {
     	boolean showType;
     	String edgeFontName;
     	String edgeFontColor;
    +	String edgeColor;
     	double edgeFontSize;
     	String nodeFontName;
    +	String nodeFontAbstractName;
     	String nodeFontColor;
     	double nodeFontSize;
     	String nodeFillColor;
    +	String bgColor;
     
     	Options() {
     		showQualified = false;
    @@ -49,12 +52,14 @@ class Options implements Cloneable {
     		showVisibility = false;
     		showType = false;
     		edgeFontName = "Helvetica";
    -		edgeFontColor = null;
    +		edgeFontColor = "black";
    +		edgeColor = "black";
     		edgeFontSize = 10;
    -		nodeFontName = "Helvetica";
    -		nodeFontColor = null;
    +		nodeFontAbstractName = "Helvetica-Oblique";
    +		nodeFontColor = "black";
     		nodeFontSize = 10;
     		nodeFillColor = null;
    +		bgColor = null;
     	}
     
     	public Object clone() 
    @@ -92,6 +97,24 @@ class Options implements Cloneable {
     			showType = true;
     		} else if(opt[0].equals("-all")) {
     			setAll();
    +		} else if(opt[0].equals("-bgcolor")) {
    +			bgColor = opt[1];
    +		} else if(opt[0].equals("-edgecolor")) {
    +			edgeColor = opt[1];
    +		} else if(opt[0].equals("-edgefontcolor")) {
    +			edgeFontColor = opt[1];
    +		} else if(opt[0].equals("-edgefontname")) {
    +			edgeFontName = opt[1];
    +		} else if(opt[0].equals("-edgefontsize")) {
    +			edgeFontSize = Integer.parseInt(opt[1]);
    +		} else if(opt[0].equals("-nodefontcolor")) {
    +			nodeFontColor = opt[1];
    +		} else if(opt[0].equals("-nodefontname")) {
    +			nodeFontName = opt[1];
    +		} else if(opt[0].equals("-nodefontabstractname")) {
    +			nodeFontAbstractName = opt[1];
    +		} else if(opt[0].equals("-nodefontsize")) {
    +			nodeFontSize = Integer.parseInt(opt[1]);
     		} else if(opt[0].equals("-nodefillcolor")) {
     			nodeFillColor = opt[1];
     		}
    @@ -380,9 +403,12 @@ class ClassGraph {
     				opt.w.print("}\"");
     			// Use ariali for gif output
     			if (c.isAbstract())
    -				opt.w.print(", fontname=\"Helvetica-Oblique\"");
    +				opt.w.print(", fontname=\"" + opt.nodeFontAbstractName + "\"");
     			if (opt.nodeFillColor != null)
     				opt.w.print(", style=filled, fillcolor=\"" + opt.nodeFillColor + "\"");
    +			opt.w.print(", fontname=\"" + opt.nodeFontName + "\"");
    +			opt.w.print(", fontcolor=\"" + opt.nodeFontColor + "\"");
    +			opt.w.print(", fontsize=" + opt.nodeFontSize);
     			opt.w.println("];");
     			ci.nodePrinted = true;
     		}
    @@ -408,6 +434,10 @@ class ClassGraph {
     				"taillabel=\"" + t[0] + "\", " + 
     				"label=\"" + StringFuns.guillemize(t[1]) + "\", " + 
     				"headlabel=\"" + t[2] + "\", " + 
    +				"fontname=\"" + opt.edgeFontName + "\", " + 
    +				"fontcolor=\"" + opt.edgeFontColor + "\", " + 
    +				"fontsize=" + opt.edgeFontSize + ", " + 
    +				"color=\"" + opt.edgeColor + "\", " + 
     				edgetype + "]"
     			);
     		}
    @@ -476,7 +506,16 @@ public class UmlGraph {
     		   option.equals("-types") ||
     		   option.equals("-all"))
     			return 1;
    -		else if(option.equals("-nodefillcolor"))
    +		else if(option.equals("-nodefillcolor") ||
    +		   option.equals("-nodefontcolor") ||
    +		   option.equals("-nodefontsize") ||
    +		   option.equals("-nodefontname") ||
    +		   option.equals("-nodefontabstractname") ||
    +		   option.equals("-edgefontcolor") ||
    +		   option.equals("-edgecolor") ||
    +		   option.equals("-edgefontsize") ||
    +		   option.equals("-edgefontname") ||
    +		   option.equals("-bgcolor"))
     			return 2;
     		else
     			return 0;
    @@ -497,6 +536,8 @@ public class UmlGraph {
     		);
     		if (opt.horizontal)
     			opt.w.println("\trankdir=LR;\n\tranksep=1;");
    +		if (opt.bgColor != null)
    +			opt.w.println("\tbgcolor=\"" + opt.bgColor + "\";\n");
     	}
     
     	/** Dot epilogue */
    diff --git a/web/index.html b/web/index.html
    index ac7ca46..c47bb26 100644
    --- a/web/index.html
    +++ b/web/index.html
    @@ -164,14 +164,29 @@ visibility (private, public, protected)
     -visibility
     -types
     
    -nodefillcolor
    Specify the color to use to fill the shapes. -The color can be either a symbolic name (e.g. blue), +
    -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. + +

    +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. @@ -202,6 +217,18 @@ You can download it in source and compiled format from the following links:

    Version History

    +
    Version 1.19 2002/09/20
    +New options: +nodefontname, +nodefontabstractname, +nodefontsize, +nodefontcolor, +edgefontname, +edgefontsize, +edgefontcolor, +edgecolor, +bgcolor. +
    Version 1.18 2002/08/26
    • Can now specify class-local options. @@ -501,17 +528,23 @@ class ActionQueue {
    Download the declarative specification, the generated dot code. -

    Global and Local Options

    +

    Colors, Global and Local Options

     /**
    + * @opt edgecolor "yellow"
    + * @opt nodefontname "Times" 
    + * @opt bgcolor ".7 .9 1" 
      * @opt nodefillcolor "#a0a0a0" 
    + * @opt nodefontsize 14
      * @hidden
      */
     class UMLOptions{}
     
     /** 
    + * @opt nodefontname "Helvetica-Bold" 
    + * @opt nodefontcolor "white"
      * @composed - - - Red
      * @composed - - - Green
      * @composed - - - Blue