langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractPackageIndexWriter.java
author jjg
Mon, 22 Aug 2016 16:32:40 -0700
changeset 40587 1c355ea550ed
parent 40303 96a1226aca18
child 44879 49beafe2faf3
permissions -rw-r--r--
8164130: Simplify doclet IOException handling Reviewed-by: bpatel, ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
     2
 * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
    23
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    26
package jdk.javadoc.internal.doclets.formats.html;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
import java.util.*;
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents: 14260
diff changeset
    29
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    30
import javax.lang.model.element.PackageElement;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    31
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    32
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    33
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    34
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    35
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    36
import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    37
import jdk.javadoc.internal.doclets.toolkit.Content;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    38
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    39
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 * Abstract class to generate the overview files in
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 * Frame and Non-Frame format. This will be sub-classed by to
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
 * generate overview-frame.html as well as overview-summary.html.
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    46
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    47
 *  If you write code that depends on this, you do so at your own risk.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    48
 *  This code and its internal interfaces are subject to change or
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    49
 *  deletion without notice.</b>
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    50
 *
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
 * @author Atul M Dambalkar
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
    52
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
    /**
24221
2376793dd33b 8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents: 19937
diff changeset
    57
     * A Set of Packages to be documented.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    59
    protected SortedSet<PackageElement> packages;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
    /**
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents: 14260
diff changeset
    62
     * Constructor. Also initializes the packages variable.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
     *
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents: 14260
diff changeset
    64
     * @param configuration  The current configuration
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
     * @param filename Name of the package index file to be generated.
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
    public AbstractPackageIndexWriter(ConfigurationImpl configuration,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
    68
                                      DocPath filename) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
        super(configuration, filename);
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
        packages = configuration.packages;
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    73
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    74
     * Adds the navigation bar header to the documentation tree.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    75
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    76
     * @param body the document tree to which the navigation bar header will be added
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    77
     */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    78
    protected abstract void addNavigationBarHeader(Content body);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    80
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    81
     * Adds the navigation bar footer to the documentation tree.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    82
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    83
     * @param body the document tree to which the navigation bar footer will be added
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    84
     */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    85
    protected abstract void addNavigationBarFooter(Content body);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    88
     * Adds the overview header to the documentation tree.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    89
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    90
     * @param body the document tree to which the overview header will be added
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    91
     */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    92
    protected abstract void addOverviewHeader(Content body);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    93
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    94
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    95
     * Adds the packages list to the documentation tree.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    96
     *
24221
2376793dd33b 8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents: 19937
diff changeset
    97
     * @param packages a collection of packagedoc objects
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    98
     * @param text caption for the table
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    99
     * @param tableSummary summary for the table
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   100
     * @param body the document tree to which the packages list will be added
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   101
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
   102
    protected abstract void addPackagesList(Collection<PackageElement> packages, String text,
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   103
            String tableSummary, Content body);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   104
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   105
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   106
     * Generate and prints the contents in the package index file. Call appropriate
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
     * methods from the sub-class in order to generate Frame or Non
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
     * Frame format.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   109
     *
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
     * @param title the title of the window.
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
     * @param includeScript boolean set true if windowtitle script is to be included
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   112
     * @throws DocFileIOException if there is a problem building the package index file
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   114
    protected void buildPackageIndexFile(String title, boolean includeScript) throws DocFileIOException {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
        String windowOverview = configuration.getText(title);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   116
        Content body = getBody(includeScript, getWindowTitle(windowOverview));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   117
        addNavigationBarHeader(body);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   118
        addOverviewHeader(body);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   119
        addIndex(body);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   120
        addOverview(body);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   121
        addNavigationBarFooter(body);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   122
        printHtmlDocument(configuration.metakeywords.getOverviewMetaKeywords(title,
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   123
                configuration.doctitle), includeScript, body);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   127
     * Default to no overview, override to add overview.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   128
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   129
     * @param body the document tree to which the overview will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   131
    protected void addOverview(Content body) { }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   134
     * Adds the frame or non-frame package index to the documentation tree.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   135
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   136
     * @param body the document tree to which the index will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   138
    protected void addIndex(Content body) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   139
        addIndexContents(packages, "doclet.Package_Summary",
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   140
                configuration.getText("doclet.Member_Table_Summary",
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   141
                configuration.getText("doclet.Package_Summary"),
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   142
                configuration.getText("doclet.packages")), body);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   146
     * Adds package index contents. Call appropriate methods from
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   147
     * the sub-classes. Adds it to the body HtmlTree
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
     *
24221
2376793dd33b 8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents: 19937
diff changeset
   149
     * @param packages a collection of packages to be documented
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   150
     * @param text string which will be used as the heading
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   151
     * @param tableSummary summary for the table
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   152
     * @param body the document tree to which the index contents will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
   154
    protected void addIndexContents(Collection<PackageElement> packages, String text,
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   155
            String tableSummary, Content body) {
24221
2376793dd33b 8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents: 19937
diff changeset
   156
        if (!packages.isEmpty()) {
29957
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   157
            HtmlTree htmlTree = (configuration.allowTag(HtmlTag.NAV))
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   158
                    ? HtmlTree.NAV()
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   159
                    : new HtmlTree(HtmlTag.DIV);
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   160
            htmlTree.addStyle(HtmlStyle.indexNav);
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   161
            HtmlTree ul = new HtmlTree(HtmlTag.UL);
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   162
            addAllClassesLink(ul);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   163
            if (configuration.showModules) {
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   164
                addAllModulesLink(ul);
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   165
            }
29957
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   166
            htmlTree.addContent(ul);
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   167
            body.addContent(htmlTree);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   168
            addPackagesList(packages, text, tableSummary, body);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   173
     * Adds the doctitle to the documentation tree, if it is specified on the command line.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   174
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   175
     * @param body the document tree to which the title will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   177
    protected void addConfigurationTitle(Content body) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
        if (configuration.doctitle.length() > 0) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   179
            Content title = new RawHtml(configuration.doctitle);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   180
            Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING,
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   181
                    HtmlStyle.title, title);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   182
            Content div = HtmlTree.DIV(HtmlStyle.header, heading);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   183
            body.addContent(div);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   188
     * Returns highlighted "Overview", in the navigation bar as this is the
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   189
     * overview page.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   190
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   191
     * @return a Content object to be added to the documentation tree
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   193
    @Override
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   194
    protected Content getNavLinkContents() {
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   195
        Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, contents.overviewLabel);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   196
        return li;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
    /**
15723
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   200
     * Do nothing. This will be overridden.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   201
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   202
     * @param div the document tree to which the all classes link will be added
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   203
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   204
    protected void addAllClassesLink(Content div) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   205
    }
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   206
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   207
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   208
     * Do nothing. This will be overridden.
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   209
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   210
     * @param div the document tree to which the all modules link will be added
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   211
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   212
    protected void addAllModulesLink(Content div) {
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   213
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
}