src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java

changeset 766
90af8d87741f
parent 554
9d9f26857129
child 798
4868a36f6fd8
     1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Tue Nov 30 09:38:48 2010 -0800
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Wed Dec 01 11:02:38 2010 -0800
     1.3 @@ -25,10 +25,12 @@
     1.4  
     1.5  package com.sun.tools.doclets.formats.html;
     1.6  
     1.7 -import com.sun.tools.doclets.internal.toolkit.util.*;
     1.8 -import com.sun.javadoc.*;
     1.9  import java.io.*;
    1.10  import java.util.*;
    1.11 +import com.sun.javadoc.*;
    1.12 +import com.sun.tools.doclets.internal.toolkit.util.*;
    1.13 +import com.sun.tools.doclets.formats.html.markup.*;
    1.14 +import com.sun.tools.doclets.internal.toolkit.*;
    1.15  
    1.16  /**
    1.17   * Generate class usage information.
    1.18 @@ -207,257 +209,301 @@
    1.19      }
    1.20  
    1.21      /**
    1.22 -     * Print the class use list.
    1.23 +     * Generate the class use list.
    1.24       */
    1.25      protected void generateClassUseFile() throws IOException {
    1.26 -
    1.27 -        printClassUseHeader();
    1.28 -
    1.29 +        Content body = getClassUseHeader();
    1.30 +        HtmlTree div = new HtmlTree(HtmlTag.DIV);
    1.31 +        div.addStyle(HtmlStyle.classUseContainer);
    1.32          if (pkgSet.size() > 0) {
    1.33 -            generateClassUse();
    1.34 +            addClassUse(div);
    1.35          } else {
    1.36 -            printText("doclet.ClassUse_No.usage.of.0",
    1.37 -                      classdoc.qualifiedName());
    1.38 -            p();
    1.39 +            div.addContent(getResource("doclet.ClassUse_No.usage.of.0",
    1.40 +                    classdoc.qualifiedName()));
    1.41          }
    1.42 -
    1.43 -        printClassUseFooter();
    1.44 -    }
    1.45 -
    1.46 -    protected void generateClassUse() throws IOException {
    1.47 -        if (configuration.packages.length > 1) {
    1.48 -            generatePackageList();
    1.49 -            generatePackageAnnotationList();
    1.50 -        }
    1.51 -        generateClassList();
    1.52 -    }
    1.53 -
    1.54 -    protected void generatePackageList() throws IOException {
    1.55 -        tableIndexSummary(useTableSummary);
    1.56 -        tableCaptionStart();
    1.57 -        printText("doclet.ClassUse_Packages.that.use.0",
    1.58 -            getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
    1.59 -                false)));
    1.60 -        tableCaptionEnd();
    1.61 -        summaryTableHeader(packageTableHeader, "col");
    1.62 -
    1.63 -        for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
    1.64 -            PackageDoc pkg = it.next();
    1.65 -            generatePackageUse(pkg);
    1.66 -        }
    1.67 -        tableEnd();
    1.68 -        space();
    1.69 -        p();
    1.70 -    }
    1.71 -
    1.72 -    protected void generatePackageAnnotationList() throws IOException {
    1.73 -        if ((! classdoc.isAnnotationType()) ||
    1.74 -               pkgToPackageAnnotations == null ||
    1.75 -               pkgToPackageAnnotations.size() == 0)
    1.76 -            return;
    1.77 -        tableIndexSummary(useTableSummary);
    1.78 -        tableCaptionStart();
    1.79 -        printText("doclet.ClassUse_PackageAnnotation",
    1.80 -            getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
    1.81 -                false)));
    1.82 -        tableCaptionEnd();
    1.83 -        summaryTableHeader(packageTableHeader, "col");
    1.84 -        for (Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator(); it.hasNext();) {
    1.85 -            PackageDoc pkg = it.next();
    1.86 -            trBgcolorStyle("white", "TableRowColor");
    1.87 -            summaryRow(0);
    1.88 -            //Just want an anchor here.
    1.89 -            printPackageLink(pkg, pkg.name(), true);
    1.90 -            summaryRowEnd();
    1.91 -            summaryRow(0);
    1.92 -            printSummaryComment(pkg);
    1.93 -            space();
    1.94 -            summaryRowEnd();
    1.95 -            trEnd();
    1.96 -        }
    1.97 -        tableEnd();
    1.98 -        space();
    1.99 -        p();
   1.100 -    }
   1.101 -
   1.102 -    protected void generateClassList() throws IOException {
   1.103 -        for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
   1.104 -            PackageDoc pkg = it.next();
   1.105 -            anchor(pkg.name());
   1.106 -            tableIndexSummary();
   1.107 -            tableHeaderStart("#CCCCFF");
   1.108 -            printText("doclet.ClassUse_Uses.of.0.in.1",
   1.109 -                getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER,
   1.110 -                    classdoc, false)),
   1.111 -                getPackageLink(pkg, Util.getPackageName(pkg), false));
   1.112 -            tableHeaderEnd();
   1.113 -            tableEnd();
   1.114 -            space();
   1.115 -            p();
   1.116 -            generateClassUse(pkg);
   1.117 -        }
   1.118 +        body.addContent(div);
   1.119 +        addNavLinks(false, body);
   1.120 +        addBottom(body);
   1.121 +        printHtmlDocument(null, true, body);
   1.122      }
   1.123  
   1.124      /**
   1.125 -     * Print the package use list.
   1.126 +     * Add the class use documentation.
   1.127 +     *
   1.128 +     * @param contentTree the content tree to which the class use information will be added
   1.129       */
   1.130 -    protected void generatePackageUse(PackageDoc pkg) throws IOException {
   1.131 -        trBgcolorStyle("white", "TableRowColor");
   1.132 -        summaryRow(0);
   1.133 -        //Just want an anchor here.
   1.134 -        printHyperLink("", pkg.name(), Util.getPackageName(pkg), true);
   1.135 -        summaryRowEnd();
   1.136 -        summaryRow(0);
   1.137 -        printSummaryComment(pkg);
   1.138 -        space();
   1.139 -        summaryRowEnd();
   1.140 -        trEnd();
   1.141 +    protected void addClassUse(Content contentTree) throws IOException {
   1.142 +        HtmlTree ul = new HtmlTree(HtmlTag.UL);
   1.143 +        ul.addStyle(HtmlStyle.blockList);
   1.144 +        if (configuration.packages.length > 1) {
   1.145 +            addPackageList(ul);
   1.146 +            addPackageAnnotationList(ul);
   1.147 +        }
   1.148 +        addClassList(ul);
   1.149 +        contentTree.addContent(ul);
   1.150      }
   1.151  
   1.152      /**
   1.153 -     * Print the class use list.
   1.154 +     * Add the packages list that use the given class.
   1.155 +     *
   1.156 +     * @param contentTree the content tree to which the packages list will be added
   1.157       */
   1.158 -    protected void generateClassUse(PackageDoc pkg) throws IOException {
   1.159 -        String classLink = getLink(new LinkInfoImpl(
   1.160 -            LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, false));
   1.161 -        String pkgLink = getPackageLink(pkg, Util.getPackageName(pkg), false);
   1.162 -        classSubWriter.printUseInfo(pkgToClassAnnotations.get(pkg.name()),
   1.163 -                configuration.getText("doclet.ClassUse_Annotation", classLink,
   1.164 -                pkgLink), classUseTableSummary);
   1.165 -        classSubWriter.printUseInfo(pkgToClassTypeParameter.get(pkg.name()),
   1.166 -                configuration.getText("doclet.ClassUse_TypeParameter", classLink,
   1.167 -                pkgLink), classUseTableSummary);
   1.168 -        classSubWriter.printUseInfo(pkgToSubclass.get(pkg.name()),
   1.169 -                configuration.getText("doclet.ClassUse_Subclass", classLink,
   1.170 -                pkgLink), subclassUseTableSummary);
   1.171 -        classSubWriter.printUseInfo(pkgToSubinterface.get(pkg.name()),
   1.172 -                configuration.getText("doclet.ClassUse_Subinterface", classLink,
   1.173 -                pkgLink), subinterfaceUseTableSummary);
   1.174 -        classSubWriter.printUseInfo(pkgToImplementingClass.get(pkg.name()),
   1.175 -                configuration.getText("doclet.ClassUse_ImplementingClass", classLink,
   1.176 -                pkgLink), classUseTableSummary);
   1.177 -        fieldSubWriter.printUseInfo(pkgToField.get(pkg.name()),
   1.178 -                configuration.getText("doclet.ClassUse_Field", classLink,
   1.179 -                pkgLink), fieldUseTableSummary);
   1.180 -        fieldSubWriter.printUseInfo(pkgToFieldAnnotations.get(pkg.name()),
   1.181 -                configuration.getText("doclet.ClassUse_FieldAnnotations", classLink,
   1.182 -                pkgLink), fieldUseTableSummary);
   1.183 -        fieldSubWriter.printUseInfo(pkgToFieldTypeParameter.get(pkg.name()),
   1.184 -                configuration.getText("doclet.ClassUse_FieldTypeParameter", classLink,
   1.185 -                pkgLink), fieldUseTableSummary);
   1.186 -        methodSubWriter.printUseInfo(pkgToMethodAnnotations.get(pkg.name()),
   1.187 -                configuration.getText("doclet.ClassUse_MethodAnnotations", classLink,
   1.188 -                pkgLink), methodUseTableSummary);
   1.189 -        methodSubWriter.printUseInfo(pkgToMethodParameterAnnotations.get(pkg.name()),
   1.190 -                configuration.getText("doclet.ClassUse_MethodParameterAnnotations", classLink,
   1.191 -                pkgLink), methodUseTableSummary);
   1.192 -        methodSubWriter.printUseInfo(pkgToMethodTypeParameter.get(pkg.name()),
   1.193 -                configuration.getText("doclet.ClassUse_MethodTypeParameter", classLink,
   1.194 -                pkgLink), methodUseTableSummary);
   1.195 -        methodSubWriter.printUseInfo(pkgToMethodReturn.get(pkg.name()),
   1.196 -                configuration.getText("doclet.ClassUse_MethodReturn", classLink,
   1.197 -                pkgLink), methodUseTableSummary);
   1.198 -        methodSubWriter.printUseInfo(pkgToMethodReturnTypeParameter.get(pkg.name()),
   1.199 -                configuration.getText("doclet.ClassUse_MethodReturnTypeParameter", classLink,
   1.200 -                pkgLink), methodUseTableSummary);
   1.201 -        methodSubWriter.printUseInfo(pkgToMethodArgs.get(pkg.name()),
   1.202 -                configuration.getText("doclet.ClassUse_MethodArgs", classLink,
   1.203 -                pkgLink), methodUseTableSummary);
   1.204 -        methodSubWriter.printUseInfo(pkgToMethodArgTypeParameter.get(pkg.name()),
   1.205 -                configuration.getText("doclet.ClassUse_MethodArgsTypeParameters", classLink,
   1.206 -                pkgLink), methodUseTableSummary);
   1.207 -        methodSubWriter.printUseInfo(pkgToMethodThrows.get(pkg.name()),
   1.208 -                configuration.getText("doclet.ClassUse_MethodThrows", classLink,
   1.209 -                pkgLink), methodUseTableSummary);
   1.210 -        constrSubWriter.printUseInfo(pkgToConstructorAnnotations.get(pkg.name()),
   1.211 -                configuration.getText("doclet.ClassUse_ConstructorAnnotations", classLink,
   1.212 -                pkgLink), constructorUseTableSummary);
   1.213 -        constrSubWriter.printUseInfo(pkgToConstructorParameterAnnotations.get(pkg.name()),
   1.214 -                configuration.getText("doclet.ClassUse_ConstructorParameterAnnotations", classLink,
   1.215 -                pkgLink), constructorUseTableSummary);
   1.216 -        constrSubWriter.printUseInfo(pkgToConstructorArgs.get(pkg.name()),
   1.217 -                configuration.getText("doclet.ClassUse_ConstructorArgs", classLink,
   1.218 -                pkgLink), constructorUseTableSummary);
   1.219 -        constrSubWriter.printUseInfo(pkgToConstructorArgTypeParameter.get(pkg.name()),
   1.220 -                configuration.getText("doclet.ClassUse_ConstructorArgsTypeParameters", classLink,
   1.221 -                pkgLink), constructorUseTableSummary);
   1.222 -        constrSubWriter.printUseInfo(pkgToConstructorThrows.get(pkg.name()),
   1.223 -                configuration.getText("doclet.ClassUse_ConstructorThrows", classLink,
   1.224 -                pkgLink), constructorUseTableSummary);
   1.225 +    protected void addPackageList(Content contentTree) throws IOException {
   1.226 +        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
   1.227 +                getTableCaption(configuration().getText(
   1.228 +                "doclet.ClassUse_Packages.that.use.0",
   1.229 +                getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
   1.230 +                false)))));
   1.231 +        table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
   1.232 +        Content tbody = new HtmlTree(HtmlTag.TBODY);
   1.233 +        Iterator<PackageDoc> it = pkgSet.iterator();
   1.234 +        for (int i = 0; it.hasNext(); i++) {
   1.235 +            PackageDoc pkg = it.next();
   1.236 +            HtmlTree tr = new HtmlTree(HtmlTag.TR);
   1.237 +            if (i % 2 == 0) {
   1.238 +                tr.addStyle(HtmlStyle.altColor);
   1.239 +            } else {
   1.240 +                tr.addStyle(HtmlStyle.rowColor);
   1.241 +            }
   1.242 +            addPackageUse(pkg, tr);
   1.243 +            tbody.addContent(tr);
   1.244 +        }
   1.245 +        table.addContent(tbody);
   1.246 +        Content li = HtmlTree.LI(HtmlStyle.blockList, table);
   1.247 +        contentTree.addContent(li);
   1.248      }
   1.249  
   1.250      /**
   1.251 -     * Print the header for the class use Listing.
   1.252 +     * Add the package annotation list.
   1.253 +     *
   1.254 +     * @param contentTree the content tree to which the package annotation list will be added
   1.255       */
   1.256 -    protected void printClassUseHeader() {
   1.257 -        String cltype = configuration.getText(classdoc.isInterface()?
   1.258 -                                    "doclet.Interface":
   1.259 -                                    "doclet.Class");
   1.260 -        String clname = classdoc.qualifiedName();
   1.261 -        printHtmlHeader(configuration.getText("doclet.Window_ClassUse_Header",
   1.262 -                            cltype, clname), null, true);
   1.263 -        printTop();
   1.264 -        navLinks(true);
   1.265 -        hr();
   1.266 -        center();
   1.267 -        h2();
   1.268 -        strongText("doclet.ClassUse_Title", cltype, clname);
   1.269 -        h2End();
   1.270 -        centerEnd();
   1.271 +    protected void addPackageAnnotationList(Content contentTree) throws IOException {
   1.272 +        if ((!classdoc.isAnnotationType()) ||
   1.273 +                pkgToPackageAnnotations == null ||
   1.274 +                pkgToPackageAnnotations.size() == 0) {
   1.275 +            return;
   1.276 +        }
   1.277 +        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
   1.278 +                getTableCaption(configuration().getText(
   1.279 +                "doclet.ClassUse_PackageAnnotation",
   1.280 +                getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
   1.281 +                false)))));
   1.282 +        table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
   1.283 +        Content tbody = new HtmlTree(HtmlTag.TBODY);
   1.284 +        Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator();
   1.285 +        for (int i = 0; it.hasNext(); i++) {
   1.286 +            PackageDoc pkg = it.next();
   1.287 +            HtmlTree tr = new HtmlTree(HtmlTag.TR);
   1.288 +            if (i % 2 == 0) {
   1.289 +                tr.addStyle(HtmlStyle.altColor);
   1.290 +            } else {
   1.291 +                tr.addStyle(HtmlStyle.rowColor);
   1.292 +            }
   1.293 +            Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst,
   1.294 +                    getPackageLink(pkg, new StringContent(pkg.name())));
   1.295 +            tr.addContent(tdFirst);
   1.296 +            HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
   1.297 +            tdLast.addStyle(HtmlStyle.colLast);
   1.298 +            if (pkg != null) {
   1.299 +                addSummaryComment(pkg, tdLast);
   1.300 +            } else {
   1.301 +                tdLast.addContent(getSpace());
   1.302 +            }
   1.303 +            tr.addContent(tdLast);
   1.304 +            tbody.addContent(tr);
   1.305 +        }
   1.306 +        table.addContent(tbody);
   1.307 +        Content li = HtmlTree.LI(HtmlStyle.blockList, table);
   1.308 +        contentTree.addContent(li);
   1.309      }
   1.310  
   1.311      /**
   1.312 -     * Print the footer for the class use Listing.
   1.313 +     * Add the class list that use the given class.
   1.314 +     *
   1.315 +     * @param contentTree the content tree to which the class list will be added
   1.316       */
   1.317 -    protected void printClassUseFooter() {
   1.318 -        hr();
   1.319 -        navLinks(false);
   1.320 -        printBottom();
   1.321 -        printBodyHtmlEnd();
   1.322 -    }
   1.323 -
   1.324 -
   1.325 -    /**
   1.326 -     * Print this package link
   1.327 -     */
   1.328 -    protected void navLinkPackage() {
   1.329 -        navCellStart();
   1.330 -        printHyperLink("../package-summary.html", "",
   1.331 -                       configuration.getText("doclet.Package"), true, "NavBarFont1");
   1.332 -        navCellEnd();
   1.333 +    protected void addClassList(Content contentTree) throws IOException {
   1.334 +        HtmlTree ul = new HtmlTree(HtmlTag.UL);
   1.335 +        ul.addStyle(HtmlStyle.blockList);
   1.336 +        for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
   1.337 +            PackageDoc pkg = it.next();
   1.338 +            Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(pkg.name()));
   1.339 +            Content link = new RawHtml(
   1.340 +                    configuration.getText("doclet.ClassUse_Uses.of.0.in.1",
   1.341 +                    getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER,
   1.342 +                    classdoc, false)),
   1.343 +                    getPackageLinkString(pkg, Util.getPackageName(pkg), false)));
   1.344 +            Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link);
   1.345 +            li.addContent(heading);
   1.346 +            addClassUse(pkg, li);
   1.347 +            ul.addContent(li);
   1.348 +        }
   1.349 +        Content li = HtmlTree.LI(HtmlStyle.blockList, ul);
   1.350 +        contentTree.addContent(li);
   1.351      }
   1.352  
   1.353      /**
   1.354 -     * Print class page indicator
   1.355 +     * Add the package use information.
   1.356 +     *
   1.357 +     * @param pkg the package that uses the given class
   1.358 +     * @param contentTree the content tree to which the package use information will be added
   1.359       */
   1.360 -    protected void navLinkClass() {
   1.361 -        navCellStart();
   1.362 -        printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, "",
   1.363 -            configuration.getText("doclet.Class"), true, "NavBarFont1"));
   1.364 -        navCellEnd();
   1.365 +    protected void addPackageUse(PackageDoc pkg, Content contentTree) throws IOException {
   1.366 +        Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst,
   1.367 +                getHyperLink("", pkg.name(), new StringContent(Util.getPackageName(pkg))));
   1.368 +        contentTree.addContent(tdFirst);
   1.369 +        HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
   1.370 +        tdLast.addStyle(HtmlStyle.colLast);
   1.371 +        if (pkg != null)
   1.372 +            addSummaryComment(pkg, tdLast);
   1.373 +        else
   1.374 +            tdLast.addContent(getSpace());
   1.375 +        contentTree.addContent(tdLast);
   1.376      }
   1.377  
   1.378      /**
   1.379 -     * Print class use link
   1.380 +     * Add the class use information.
   1.381 +     *
   1.382 +     * @param pkg the package that uses the given class
   1.383 +     * @param contentTree the content tree to which the class use information will be added
   1.384       */
   1.385 -    protected void navLinkClassUse() {
   1.386 -        navCellRevStart();
   1.387 -        fontStyle("NavBarFont1Rev");
   1.388 -        strongText("doclet.navClassUse");
   1.389 -        fontEnd();
   1.390 -        navCellEnd();
   1.391 +    protected void addClassUse(PackageDoc pkg, Content contentTree) throws IOException {
   1.392 +        String classLink = getLink(new LinkInfoImpl(
   1.393 +            LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, false));
   1.394 +        String pkgLink = getPackageLinkString(pkg, Util.getPackageName(pkg), false);
   1.395 +        classSubWriter.addUseInfo(pkgToClassAnnotations.get(pkg.name()),
   1.396 +                configuration.getText("doclet.ClassUse_Annotation", classLink,
   1.397 +                pkgLink), classUseTableSummary, contentTree);
   1.398 +        classSubWriter.addUseInfo(pkgToClassTypeParameter.get(pkg.name()),
   1.399 +                configuration.getText("doclet.ClassUse_TypeParameter", classLink,
   1.400 +                pkgLink), classUseTableSummary, contentTree);
   1.401 +        classSubWriter.addUseInfo(pkgToSubclass.get(pkg.name()),
   1.402 +                configuration.getText("doclet.ClassUse_Subclass", classLink,
   1.403 +                pkgLink), subclassUseTableSummary, contentTree);
   1.404 +        classSubWriter.addUseInfo(pkgToSubinterface.get(pkg.name()),
   1.405 +                configuration.getText("doclet.ClassUse_Subinterface", classLink,
   1.406 +                pkgLink), subinterfaceUseTableSummary, contentTree);
   1.407 +        classSubWriter.addUseInfo(pkgToImplementingClass.get(pkg.name()),
   1.408 +                configuration.getText("doclet.ClassUse_ImplementingClass", classLink,
   1.409 +                pkgLink), classUseTableSummary, contentTree);
   1.410 +        fieldSubWriter.addUseInfo(pkgToField.get(pkg.name()),
   1.411 +                configuration.getText("doclet.ClassUse_Field", classLink,
   1.412 +                pkgLink), fieldUseTableSummary, contentTree);
   1.413 +        fieldSubWriter.addUseInfo(pkgToFieldAnnotations.get(pkg.name()),
   1.414 +                configuration.getText("doclet.ClassUse_FieldAnnotations", classLink,
   1.415 +                pkgLink), fieldUseTableSummary, contentTree);
   1.416 +        fieldSubWriter.addUseInfo(pkgToFieldTypeParameter.get(pkg.name()),
   1.417 +                configuration.getText("doclet.ClassUse_FieldTypeParameter", classLink,
   1.418 +                pkgLink), fieldUseTableSummary, contentTree);
   1.419 +        methodSubWriter.addUseInfo(pkgToMethodAnnotations.get(pkg.name()),
   1.420 +                configuration.getText("doclet.ClassUse_MethodAnnotations", classLink,
   1.421 +                pkgLink), methodUseTableSummary, contentTree);
   1.422 +        methodSubWriter.addUseInfo(pkgToMethodParameterAnnotations.get(pkg.name()),
   1.423 +                configuration.getText("doclet.ClassUse_MethodParameterAnnotations", classLink,
   1.424 +                pkgLink), methodUseTableSummary, contentTree);
   1.425 +        methodSubWriter.addUseInfo(pkgToMethodTypeParameter.get(pkg.name()),
   1.426 +                configuration.getText("doclet.ClassUse_MethodTypeParameter", classLink,
   1.427 +                pkgLink), methodUseTableSummary, contentTree);
   1.428 +        methodSubWriter.addUseInfo(pkgToMethodReturn.get(pkg.name()),
   1.429 +                configuration.getText("doclet.ClassUse_MethodReturn", classLink,
   1.430 +                pkgLink), methodUseTableSummary, contentTree);
   1.431 +        methodSubWriter.addUseInfo(pkgToMethodReturnTypeParameter.get(pkg.name()),
   1.432 +                configuration.getText("doclet.ClassUse_MethodReturnTypeParameter", classLink,
   1.433 +                pkgLink), methodUseTableSummary, contentTree);
   1.434 +        methodSubWriter.addUseInfo(pkgToMethodArgs.get(pkg.name()),
   1.435 +                configuration.getText("doclet.ClassUse_MethodArgs", classLink,
   1.436 +                pkgLink), methodUseTableSummary, contentTree);
   1.437 +        methodSubWriter.addUseInfo(pkgToMethodArgTypeParameter.get(pkg.name()),
   1.438 +                configuration.getText("doclet.ClassUse_MethodArgsTypeParameters", classLink,
   1.439 +                pkgLink), methodUseTableSummary, contentTree);
   1.440 +        methodSubWriter.addUseInfo(pkgToMethodThrows.get(pkg.name()),
   1.441 +                configuration.getText("doclet.ClassUse_MethodThrows", classLink,
   1.442 +                pkgLink), methodUseTableSummary, contentTree);
   1.443 +        constrSubWriter.addUseInfo(pkgToConstructorAnnotations.get(pkg.name()),
   1.444 +                configuration.getText("doclet.ClassUse_ConstructorAnnotations", classLink,
   1.445 +                pkgLink), constructorUseTableSummary, contentTree);
   1.446 +        constrSubWriter.addUseInfo(pkgToConstructorParameterAnnotations.get(pkg.name()),
   1.447 +                configuration.getText("doclet.ClassUse_ConstructorParameterAnnotations", classLink,
   1.448 +                pkgLink), constructorUseTableSummary, contentTree);
   1.449 +        constrSubWriter.addUseInfo(pkgToConstructorArgs.get(pkg.name()),
   1.450 +                configuration.getText("doclet.ClassUse_ConstructorArgs", classLink,
   1.451 +                pkgLink), constructorUseTableSummary, contentTree);
   1.452 +        constrSubWriter.addUseInfo(pkgToConstructorArgTypeParameter.get(pkg.name()),
   1.453 +                configuration.getText("doclet.ClassUse_ConstructorArgsTypeParameters", classLink,
   1.454 +                pkgLink), constructorUseTableSummary, contentTree);
   1.455 +        constrSubWriter.addUseInfo(pkgToConstructorThrows.get(pkg.name()),
   1.456 +                configuration.getText("doclet.ClassUse_ConstructorThrows", classLink,
   1.457 +                pkgLink), constructorUseTableSummary, contentTree);
   1.458      }
   1.459  
   1.460 -    protected void navLinkTree() {
   1.461 -        navCellStart();
   1.462 -        if (classdoc.containingPackage().isIncluded()) {
   1.463 -            printHyperLink("../package-tree.html", "",
   1.464 -                configuration.getText("doclet.Tree"), true, "NavBarFont1");
   1.465 -        } else {
   1.466 -            printHyperLink(relativePath + "overview-tree.html", "",
   1.467 -                configuration.getText("doclet.Tree"), true, "NavBarFont1");
   1.468 -        }
   1.469 -        navCellEnd();
   1.470 +    /**
   1.471 +     * Get the header for the class use Listing.
   1.472 +     *
   1.473 +     * @return a content tree representing the class use header
   1.474 +     */
   1.475 +    protected Content getClassUseHeader() {
   1.476 +        String cltype = configuration.getText(classdoc.isInterface()?
   1.477 +            "doclet.Interface":"doclet.Class");
   1.478 +        String clname = classdoc.qualifiedName();
   1.479 +        String title = configuration.getText("doclet.Window_ClassUse_Header",
   1.480 +                cltype, clname);
   1.481 +        Content bodyTree = getBody(true, getWindowTitle(title));
   1.482 +        addTop(bodyTree);
   1.483 +        addNavLinks(true, bodyTree);
   1.484 +        Content headContent = getResource("doclet.ClassUse_Title", cltype, clname);
   1.485 +        Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
   1.486 +                true, HtmlStyle.title, headContent);
   1.487 +        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
   1.488 +        bodyTree.addContent(div);
   1.489 +        return bodyTree;
   1.490      }
   1.491  
   1.492 +    /**
   1.493 +     * Get this package link.
   1.494 +     *
   1.495 +     * @return a content tree for the package link
   1.496 +     */
   1.497 +    protected Content getNavLinkPackage() {
   1.498 +        Content linkContent = getHyperLink("../package-summary.html", "",
   1.499 +                packageLabel);
   1.500 +        Content li = HtmlTree.LI(linkContent);
   1.501 +        return li;
   1.502 +    }
   1.503 +
   1.504 +    /**
   1.505 +     * Get class page link.
   1.506 +     *
   1.507 +     * @return a content tree for the class page link
   1.508 +     */
   1.509 +    protected Content getNavLinkClass() {
   1.510 +        Content linkContent = new RawHtml(getLink(new LinkInfoImpl(
   1.511 +                LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, "",
   1.512 +                configuration.getText("doclet.Class"), false)));
   1.513 +        Content li = HtmlTree.LI(linkContent);
   1.514 +        return li;
   1.515 +    }
   1.516 +
   1.517 +    /**
   1.518 +     * Get the use link.
   1.519 +     *
   1.520 +     * @return a content tree for the use link
   1.521 +     */
   1.522 +    protected Content getNavLinkClassUse() {
   1.523 +        Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, useLabel);
   1.524 +        return li;
   1.525 +    }
   1.526 +
   1.527 +    /**
   1.528 +     * Get the tree link.
   1.529 +     *
   1.530 +     * @return a content tree for the tree link
   1.531 +     */
   1.532 +    protected Content getNavLinkTree() {
   1.533 +        Content linkContent = classdoc.containingPackage().isIncluded() ?
   1.534 +            getHyperLink("../package-tree.html", "", treeLabel) :
   1.535 +            getHyperLink(relativePath + "overview-tree.html", "", treeLabel);
   1.536 +        Content li = HtmlTree.LI(linkContent);
   1.537 +        return li;
   1.538 +    }
   1.539  }

mercurial