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

changeset 995
62bc3775d5bb
parent 981
bbd053476ec3
child 997
dbc4ced9d171
equal deleted inserted replaced
994:459854f564ed 995:62bc3775d5bb
1390 * @param parsedName the package name 1390 * @param parsedName the package name
1391 * @return the package name content 1391 * @return the package name content
1392 */ 1392 */
1393 public Content getPackageLabel(String packageName) { 1393 public Content getPackageLabel(String packageName) {
1394 return new StringContent(packageName); 1394 return new StringContent(packageName);
1395 }
1396
1397 /**
1398 * Add package deprecation information to the documentation tree
1399 *
1400 * @param deprPkgs list of deprecated packages
1401 * @param headingKey the caption for the deprecated package table
1402 * @param tableSummary the summary for the deprecated package table
1403 * @param tableHeader table headers for the deprecated package table
1404 * @param contentTree the content tree to which the deprecated package table will be added
1405 */
1406 protected void addPackageDeprecatedAPI(List<Doc> deprPkgs, String headingKey,
1407 String tableSummary, String[] tableHeader, Content contentTree) {
1408 if (deprPkgs.size() > 0) {
1409 Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
1410 getTableCaption(configuration().getText(headingKey)));
1411 table.addContent(getSummaryTableHeader(tableHeader, "col"));
1412 Content tbody = new HtmlTree(HtmlTag.TBODY);
1413 for (int i = 0; i < deprPkgs.size(); i++) {
1414 PackageDoc pkg = (PackageDoc) deprPkgs.get(i);
1415 HtmlTree td = HtmlTree.TD(HtmlStyle.colOne,
1416 getPackageLink(pkg, getPackageName(pkg)));
1417 if (pkg.tags("deprecated").length > 0) {
1418 addInlineDeprecatedComment(pkg, pkg.tags("deprecated")[0], td);
1419 }
1420 HtmlTree tr = HtmlTree.TR(td);
1421 if (i % 2 == 0) {
1422 tr.addStyle(HtmlStyle.altColor);
1423 } else {
1424 tr.addStyle(HtmlStyle.rowColor);
1425 }
1426 tbody.addContent(tr);
1427 }
1428 table.addContent(tbody);
1429 Content li = HtmlTree.LI(HtmlStyle.blockList, table);
1430 Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
1431 contentTree.addContent(ul);
1432 }
1395 } 1433 }
1396 1434
1397 /** 1435 /**
1398 * Prine table header information about color, column span and the font. 1436 * Prine table header information about color, column span and the font.
1399 * 1437 *

mercurial