< prev index next >
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java
Print this page
*** 23,33 ****
* 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;
--- 23,32 ----
*** 284,300 ****
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",
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"));
addDeprecatedAPI(deprapi.getSet(kind),
getHeadingKey(kind), memberTableSummary, memberTableHeader, div);
}
}
if (configuration.allowTag(HtmlTag.MAIN)) {
--- 283,297 ----
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",
resources.getText(getHeadingKey(kind)),
resources.getText(getSummaryKey(kind)));
! 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,419 ****
* @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) {
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"));
Content tbody = new HtmlTree(HtmlTag.TBODY);
boolean altColor = true;
for (Element e : deprList) {
HtmlTree thRow;
switch (e.getKind()) {
--- 400,416 ----
* @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, 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(tableHeader.toContent());
Content tbody = new HtmlTree(HtmlTag.TBODY);
boolean altColor = true;
for (Element e : deprList) {
HtmlTree thRow;
switch (e.getKind()) {
< prev index next >