< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java

Print this page

        

*** 73,88 **** import jdk.javadoc.internal.doclets.formats.html.markup.HtmlDocWriter; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlDocument; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; - import jdk.javadoc.internal.doclets.formats.html.markup.HtmlVersion; import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml; import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeWriter; import jdk.javadoc.internal.doclets.toolkit.ClassWriter; - import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration; import jdk.javadoc.internal.doclets.toolkit.Content; import jdk.javadoc.internal.doclets.toolkit.Messages; import jdk.javadoc.internal.doclets.toolkit.PackageSummaryWriter; import jdk.javadoc.internal.doclets.toolkit.Resources; import jdk.javadoc.internal.doclets.toolkit.taglets.DocRootTaglet; --- 73,86 ----
*** 387,436 **** public Content getTargetModuleLink(String target, Content label, ModuleElement mdle) { return getHyperLink(pathToRoot.resolve( DocPaths.moduleSummary(mdle)), label, "", target); } - public void addClassesSummary(SortedSet<TypeElement> classes, String label, - String tableSummary, List<String> tableHeader, Content summaryContentTree) { - if (!classes.isEmpty()) { - Content caption = getTableCaption(new RawHtml(label)); - Content table = (configuration.isOutputHtml5()) - ? HtmlTree.TABLE(HtmlStyle.typeSummary, caption) - : HtmlTree.TABLE(HtmlStyle.typeSummary, tableSummary, caption); - table.addContent(getSummaryTableHeader(tableHeader, "col")); - Content tbody = new HtmlTree(HtmlTag.TBODY); - boolean altColor = true; - for (TypeElement te : classes) { - if (!utils.isCoreClass(te) || - !configuration.isGeneratedDoc(te)) { - continue; - } - Content classContent = getLink(new LinkInfoImpl( - configuration, LinkInfoImpl.Kind.PACKAGE, te)); - Content tdClass = HtmlTree.TH_ROW_SCOPE(HtmlStyle.colFirst, classContent); - HtmlTree tr = HtmlTree.TR(tdClass); - tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor); - altColor = !altColor; - HtmlTree tdClassDescription = new HtmlTree(HtmlTag.TD); - tdClassDescription.addStyle(HtmlStyle.colLast); - if (utils.isDeprecated(te)) { - tdClassDescription.addContent(getDeprecatedPhrase(te)); - List<? extends DocTree> tags = utils.getDeprecatedTrees(te); - if (!tags.isEmpty()) { - addSummaryDeprecatedComment(te, tags.get(0), tdClassDescription); - } - } else { - addSummaryComment(te, tdClassDescription); - } - tr.addContent(tdClassDescription); - tbody.addContent(tr); - } - table.addContent(tbody); - summaryContentTree.addContent(table); - } - } - /** * Generates the HTML document tree and prints it out. * * @param metakeywords Array of String keywords for META tag. Each element * of the array is assigned to a separate META tag. --- 385,394 ----
*** 936,980 **** liNav.addContent("|"); liNav.addContent(Contents.SPACE); } /** - * Get summary table header. - * - * @param header the header for the table - * @param scope the scope of the headers - * @return a content tree for the header - */ - public Content getSummaryTableHeader(List<String> header, String scope) { - Content tr = new HtmlTree(HtmlTag.TR); - final int size = header.size(); - Content tableHeader; - if (size == 2) { - tableHeader = new StringContent(header.get(0)); - tr.addContent(HtmlTree.TH(HtmlStyle.colFirst, scope, tableHeader)); - tableHeader = new StringContent(header.get(1)); - tr.addContent(HtmlTree.TH(HtmlStyle.colLast, scope, tableHeader)); - return tr; - } - for (int i = 0; i < size; i++) { - tableHeader = new StringContent(header.get(i)); - if (i == 0) - tr.addContent(HtmlTree.TH(HtmlStyle.colFirst, scope, tableHeader)); - else if (i == 1) - tr.addContent(HtmlTree.TH(HtmlStyle.colSecond, scope, tableHeader)); - else if (i == (size - 1)) - tr.addContent(HtmlTree.TH(HtmlStyle.colLast, scope, tableHeader)); - else - tr.addContent(HtmlTree.TH(scope, tableHeader)); - } - return tr; - } - - /** * Get table caption. * ! * @param rawText the caption for the table which could be raw Html * @return a content tree for the caption */ public Content getTableCaption(Content title) { Content captionSpan = HtmlTree.SPAN(title); Content space = Contents.SPACE; --- 894,906 ---- liNav.addContent("|"); liNav.addContent(Contents.SPACE); } /** * Get table caption. * ! * @param title the content for the caption * @return a content tree for the caption */ public Content getTableCaption(Content title) { Content captionSpan = HtmlTree.SPAN(title); Content space = Contents.SPACE;
*** 2602,2616 **** return new StringContent(annotationValue.toString()); } }.visit(annotationValue); } ! /** ! * Return the configuration for this doclet. ! * ! * @return the configuration for this doclet. ! */ ! @Override ! public BaseConfiguration configuration() { ! return configuration; } } --- 2528,2536 ---- return new StringContent(annotationValue.toString()); } }.visit(annotationValue); } ! protected TableHeader getPackageTableHeader() { ! return new TableHeader(contents.packageLabel, contents.descriptionLabel); } }
< prev index next >