< prev index next >
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java
Print this page
@@ -23,11 +23,10 @@
* questions.
*/
package jdk.javadoc.internal.doclets.formats.html;
-import java.util.ArrayList;
import java.util.EnumMap;
import java.util.List;
import java.util.SortedSet;
import javax.lang.model.element.Element;
@@ -284,17 +283,15 @@
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.addStyle(HtmlStyle.contentContainer);
for (DeprElementKind kind : DeprElementKind.values()) {
if (deprapi.hasDocumentation(kind)) {
addAnchor(deprapi, kind, div);
- memberTableSummary
- = resources.getText("doclet.Member_Table_Summary",
+ memberTableSummary = resources.getText("doclet.Member_Table_Summary",
resources.getText(getHeadingKey(kind)),
resources.getText(getSummaryKey(kind)));
- List<String> memberTableHeader = new ArrayList<>();
- memberTableHeader.add(resources.getText(getHeaderKey(kind)));
- memberTableHeader.add(resources.getText("doclet.Description"));
+ TableHeader memberTableHeader = new TableHeader(
+ contents.getContent(getHeaderKey(kind)), contents.descriptionLabel);
addDeprecatedAPI(deprapi.getSet(kind),
getHeadingKey(kind), memberTableSummary, memberTableHeader, div);
}
}
if (configuration.allowTag(HtmlTag.MAIN)) {
@@ -403,17 +400,17 @@
* @param tableSummary the summary for the deprecated table
* @param tableHeader table headers for the deprecated table
* @param contentTree the content tree to which the deprecated table will be added
*/
protected void addDeprecatedAPI(SortedSet<Element> deprList, String headingKey,
- String tableSummary, List<String> tableHeader, Content contentTree) {
+ String tableSummary, TableHeader tableHeader, Content contentTree) {
if (deprList.size() > 0) {
Content caption = getTableCaption(configuration.getContent(headingKey));
Content table = (configuration.isOutputHtml5())
? HtmlTree.TABLE(HtmlStyle.deprecatedSummary, caption)
: HtmlTree.TABLE(HtmlStyle.deprecatedSummary, tableSummary, caption);
- table.addContent(getSummaryTableHeader(tableHeader, "col"));
+ table.addContent(tableHeader.toContent());
Content tbody = new HtmlTree(HtmlTag.TBODY);
boolean altColor = true;
for (Element e : deprList) {
HtmlTree thRow;
switch (e.getKind()) {
< prev index next >