langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Sat Apr 30 16:57:18 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Mon May 02 02:13:02 2011 -0700
@@ -1395,6 +1395,44 @@
}
/**
+ * Add package deprecation information to the documentation tree
+ *
+ * @param deprPkgs list of deprecated packages
+ * @param headingKey the caption for the deprecated package table
+ * @param tableSummary the summary for the deprecated package table
+ * @param tableHeader table headers for the deprecated package table
+ * @param contentTree the content tree to which the deprecated package table will be added
+ */
+ protected void addPackageDeprecatedAPI(List<Doc> deprPkgs, String headingKey,
+ String tableSummary, String[] tableHeader, Content contentTree) {
+ if (deprPkgs.size() > 0) {
+ Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+ getTableCaption(configuration().getText(headingKey)));
+ table.addContent(getSummaryTableHeader(tableHeader, "col"));
+ Content tbody = new HtmlTree(HtmlTag.TBODY);
+ for (int i = 0; i < deprPkgs.size(); i++) {
+ PackageDoc pkg = (PackageDoc) deprPkgs.get(i);
+ HtmlTree td = HtmlTree.TD(HtmlStyle.colOne,
+ getPackageLink(pkg, getPackageName(pkg)));
+ if (pkg.tags("deprecated").length > 0) {
+ addInlineDeprecatedComment(pkg, pkg.tags("deprecated")[0], td);
+ }
+ HtmlTree tr = HtmlTree.TR(td);
+ if (i % 2 == 0) {
+ tr.addStyle(HtmlStyle.altColor);
+ } else {
+ tr.addStyle(HtmlStyle.rowColor);
+ }
+ tbody.addContent(tr);
+ }
+ table.addContent(tbody);
+ Content li = HtmlTree.LI(HtmlStyle.blockList, table);
+ Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
+ contentTree.addContent(ul);
+ }
+ }
+
+ /**
* Prine table header information about color, column span and the font.
*
* @param color Background color.