diff --git a/doc/ver.xml b/doc/ver.xml index 8ea7930..e5bc2a6 100644 --- a/doc/ver.xml +++ b/doc/ver.xml @@ -4,6 +4,9 @@
@note tag allows the annotation of elements with comments.
(Suggested by Sébastien Pierre.)
diff --git a/src/org/umlgraph/doclet/ClassGraph.java b/src/org/umlgraph/doclet/ClassGraph.java
index 242526c..feacc89 100644
--- a/src/org/umlgraph/doclet/ClassGraph.java
+++ b/src/org/umlgraph/doclet/ClassGraph.java
@@ -471,8 +471,29 @@ class ClassGraph {
w.println("\t// " + r);
// Create label
w.print("\t" + ci.name + " [label=");
+
+ boolean showMembers =
+ (opt.showAttributes && c.fields().length > 0) ||
+ (c.isEnum() && opt.showEnumConstants && c.enumConstants().length > 0) ||
+ (opt.showOperations && c.methods().length > 0) ||
+ (opt.showConstructors && c.constructors().length > 0);
+
externalTableStart(opt, c.qualifiedName(), classToUrl(c, rootClass));
- innerTableStart();
+
+ // Calculate the number of innerTable rows we will emmit
+ int nRows = 1;
+ if (showMembers) {
+ if (opt.showAttributes)
+ nRows++;
+ else if(!c.isEnum() && (opt.showConstructors || opt.showOperations))
+ nRows++;
+ if (c.isEnum() && opt.showEnumConstants)
+ nRows++;
+ if (!c.isEnum() && (opt.showConstructors || opt.showOperations))
+ nRows++;
+ }
+
+ firstInnerTableStart(opt, nRows);
if (c.isInterface())
tableLine(Align.CENTER, guilWrap(opt, "interface"));
if (c.isEnum())
@@ -497,14 +518,13 @@ class ClassGraph {
tableLine(Align.CENTER, escape(qualifiedName), opt, font);
}
tagvalue(opt, c);
- innerTableEnd();
-
- boolean showMembers =
- (opt.showAttributes && c.fields().length > 0) ||
- (c.isEnum() && opt.showEnumConstants && c.enumConstants().length > 0) ||
- (opt.showOperations && c.methods().length > 0) ||
- (opt.showConstructors && c.constructors().length > 0);
+ firstInnerTableEnd(opt, nRows);
+ /*
+ * Warning: The boolean expressions guarding innerTableStart()
+ * in this block, should match those in the code block above
+ * marked: "Calculate the number of innerTable rows we will emmit"
+ */
if (showMembers) {
if (opt.showAttributes) {
innerTableStart();
@@ -1109,8 +1129,8 @@ class ClassGraph {
if (url != null)
href = " href=\"" + url + "\"";
- w.print("<