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

changeset 995
62bc3775d5bb
parent 981
bbd053476ec3
child 997
dbc4ced9d171
     1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Sat Apr 30 16:57:18 2011 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Mon May 02 02:13:02 2011 -0700
     1.3 @@ -1395,6 +1395,44 @@
     1.4      }
     1.5  
     1.6      /**
     1.7 +     * Add package deprecation information to the documentation tree
     1.8 +     *
     1.9 +     * @param deprPkgs list of deprecated packages
    1.10 +     * @param headingKey the caption for the deprecated package table
    1.11 +     * @param tableSummary the summary for the deprecated package table
    1.12 +     * @param tableHeader table headers for the deprecated package table
    1.13 +     * @param contentTree the content tree to which the deprecated package table will be added
    1.14 +     */
    1.15 +    protected void addPackageDeprecatedAPI(List<Doc> deprPkgs, String headingKey,
    1.16 +            String tableSummary, String[] tableHeader, Content contentTree) {
    1.17 +        if (deprPkgs.size() > 0) {
    1.18 +            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
    1.19 +                    getTableCaption(configuration().getText(headingKey)));
    1.20 +            table.addContent(getSummaryTableHeader(tableHeader, "col"));
    1.21 +            Content tbody = new HtmlTree(HtmlTag.TBODY);
    1.22 +            for (int i = 0; i < deprPkgs.size(); i++) {
    1.23 +                PackageDoc pkg = (PackageDoc) deprPkgs.get(i);
    1.24 +                HtmlTree td = HtmlTree.TD(HtmlStyle.colOne,
    1.25 +                        getPackageLink(pkg, getPackageName(pkg)));
    1.26 +                if (pkg.tags("deprecated").length > 0) {
    1.27 +                    addInlineDeprecatedComment(pkg, pkg.tags("deprecated")[0], td);
    1.28 +                }
    1.29 +                HtmlTree tr = HtmlTree.TR(td);
    1.30 +                if (i % 2 == 0) {
    1.31 +                    tr.addStyle(HtmlStyle.altColor);
    1.32 +                } else {
    1.33 +                    tr.addStyle(HtmlStyle.rowColor);
    1.34 +                }
    1.35 +                tbody.addContent(tr);
    1.36 +            }
    1.37 +            table.addContent(tbody);
    1.38 +            Content li = HtmlTree.LI(HtmlStyle.blockList, table);
    1.39 +            Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
    1.40 +            contentTree.addContent(ul);
    1.41 +        }
    1.42 +    }
    1.43 +
    1.44 +    /**
    1.45       * Prine table header information about color, column span and the font.
    1.46       *
    1.47       * @param color Background color.

mercurial