mirror of https://github.com/dspinellis/UMLGraph
Support for additional options for fonts and colors.
This commit is contained in:
parent
6790e887fb
commit
c58aaf1aa4
39
index.html
39
index.html
|
|
@ -164,14 +164,29 @@ visibility (private, public, protected)
|
|||
<code>-visibility</code>
|
||||
<code>-types</code>
|
||||
<dt>-nodefillcolor<dd>Specify the color to use to fill the shapes.
|
||||
The color can be either a symbolic name (e.g. blue),
|
||||
<dt>-nodefontname<dd>Specify the font name to use inside nodes.
|
||||
<dt>-nodefontabstractname<dd>Specify the font name to use
|
||||
inside abstract class nodes.
|
||||
<dt>-nodefontsize<dd>Specify the font size to use inside nodes.
|
||||
<dt>-nodefontcolor<dd>Specify the font color to use inside nodes.
|
||||
<dt>-edgefontname<dd>Specify the font name to use for edge labels.
|
||||
<dt>-edgefontsize<dd>Specify the font size to use for edge labels.
|
||||
<dt>-edgefontcolor<dd>Specify the font color to use for edge labels.
|
||||
<dt>-edgecolor<dd>Specify the color for drawing edges.
|
||||
<dt>-bgcolor<dd>Specify the graph's background color.
|
||||
</dl>
|
||||
<p>
|
||||
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.
|
||||
</dl>
|
||||
<p>
|
||||
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.
|
||||
<p>
|
||||
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:
|
|||
|
||||
<h3>Version History</h3> <!-- {{{1 -->
|
||||
<dl>
|
||||
<dt>Version 1.19 2002/09/20<dd>
|
||||
New options:
|
||||
nodefontname,
|
||||
nodefontabstractname,
|
||||
nodefontsize,
|
||||
nodefontcolor,
|
||||
edgefontname,
|
||||
edgefontsize,
|
||||
edgefontcolor,
|
||||
edgecolor,
|
||||
bgcolor.
|
||||
|
||||
<dt>Version 1.18 2002/08/26<dd>
|
||||
<ul>
|
||||
<li> Can now specify class-local options.
|
||||
|
|
@ -501,17 +528,23 @@ class ActionQueue {
|
|||
<img src="classadd.gif">
|
||||
</tr></table>
|
||||
Download the <a href="classadd.java">declarative specification</a>, the generated <a href="classadd.dot">dot code</a>.
|
||||
<h3>Global and Local Options</h3> <!-- {{{2 -->
|
||||
<h3>Colors, Global and Local Options</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
<tr><td>
|
||||
<pre>
|
||||
/**
|
||||
* @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
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -164,14 +164,29 @@ visibility (private, public, protected)
|
|||
<code>-visibility</code>
|
||||
<code>-types</code>
|
||||
<dt>-nodefillcolor<dd>Specify the color to use to fill the shapes.
|
||||
The color can be either a symbolic name (e.g. blue),
|
||||
<dt>-nodefontname<dd>Specify the font name to use inside nodes.
|
||||
<dt>-nodefontabstractname<dd>Specify the font name to use
|
||||
inside abstract class nodes.
|
||||
<dt>-nodefontsize<dd>Specify the font size to use inside nodes.
|
||||
<dt>-nodefontcolor<dd>Specify the font color to use inside nodes.
|
||||
<dt>-edgefontname<dd>Specify the font name to use for edge labels.
|
||||
<dt>-edgefontsize<dd>Specify the font size to use for edge labels.
|
||||
<dt>-edgefontcolor<dd>Specify the font color to use for edge labels.
|
||||
<dt>-edgecolor<dd>Specify the color for drawing edges.
|
||||
<dt>-bgcolor<dd>Specify the graph's background color.
|
||||
</dl>
|
||||
<p>
|
||||
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.
|
||||
</dl>
|
||||
<p>
|
||||
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.
|
||||
<p>
|
||||
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:
|
|||
|
||||
<h3>Version History</h3> <!-- {{{1 -->
|
||||
<dl>
|
||||
<dt>Version 1.19 2002/09/20<dd>
|
||||
New options:
|
||||
nodefontname,
|
||||
nodefontabstractname,
|
||||
nodefontsize,
|
||||
nodefontcolor,
|
||||
edgefontname,
|
||||
edgefontsize,
|
||||
edgefontcolor,
|
||||
edgecolor,
|
||||
bgcolor.
|
||||
|
||||
<dt>Version 1.18 2002/08/26<dd>
|
||||
<ul>
|
||||
<li> Can now specify class-local options.
|
||||
|
|
@ -501,17 +528,23 @@ class ActionQueue {
|
|||
<img src="classadd.gif">
|
||||
</tr></table>
|
||||
Download the <a href="classadd.java">declarative specification</a>, the generated <a href="classadd.dot">dot code</a>.
|
||||
<h3>Global and Local Options</h3> <!-- {{{2 -->
|
||||
<h3>Colors, Global and Local Options</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
<tr><td>
|
||||
<pre>
|
||||
/**
|
||||
* @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
|
||||
|
|
|
|||
Loading…
Reference in New Issue