src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractPackageIndexWriter.java
author jjg
Wed, 20 Feb 2019 16:15:02 -0800
changeset 53863 d001808c57e8
parent 53562 0d9dee001667
child 53879 e7cb0348fa1c
permissions -rw-r--r--
8218998: Add metadata to generated API documentation files Reviewed-by: hannesw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
53863
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
     2
 * Copyright (c) 1998, 2019, 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;
49551
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 47846
diff changeset
    36
import jdk.javadoc.internal.doclets.formats.html.markup.Navigation;
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 47846
diff changeset
    37
import jdk.javadoc.internal.doclets.formats.html.markup.Navigation.PageMode;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    38
import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    39
import jdk.javadoc.internal.doclets.toolkit.Content;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    40
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    41
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
 * Abstract class to generate the overview files in
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 * Frame and Non-Frame format. This will be sub-classed by to
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
 * generate overview-frame.html as well as overview-summary.html.
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    48
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    49
 *  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
    50
 *  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
    51
 *  deletion without notice.</b>
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 7681
diff changeset
    52
 *
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
 * @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
    54
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
    /**
24221
2376793dd33b 8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents: 19937
diff changeset
    59
     * A Set of Packages to be documented.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    61
    protected SortedSet<PackageElement> packages;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
49551
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 47846
diff changeset
    63
    protected Navigation navBar;
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 47846
diff changeset
    64
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
    /**
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents: 14260
diff changeset
    66
     * Constructor. Also initializes the packages variable.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
     *
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents: 14260
diff changeset
    68
     * @param configuration  The current configuration
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
     * @param filename Name of the package index file to be generated.
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
     */
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 44879
diff changeset
    71
    public AbstractPackageIndexWriter(HtmlConfiguration configuration,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
    72
                                      DocPath filename) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
        super(configuration, filename);
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
        packages = configuration.packages;
49551
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 47846
diff changeset
    75
        this.navBar = new Navigation(null, configuration, fixedNavDiv, PageMode.OVERVIEW, path);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    78
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    79
     * 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
    80
     *
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
    81
     * @param header the document tree to which the navigation bar header will be added
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    82
     */
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
    83
    protected abstract void addNavigationBarHeader(Content header);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    85
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    86
     * 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
    87
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    88
     * @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
    89
     */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    90
    protected abstract void addNavigationBarFooter(Content body);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    93
     * 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
    94
     *
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
    95
     * @param footer the document tree to which the overview header will be added
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    96
     */
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
    97
    protected abstract void addOverviewHeader(Content footer);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    98
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    99
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   100
     * 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
   101
     *
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   102
     * @param main the document tree to which the packages list will be added
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   103
     */
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   104
    protected abstract void addPackagesList(Content main);
7614
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
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   107
     * Generate and prints the contents in the package index file. Call appropriate
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
     * methods from the sub-class in order to generate Frame or Non
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
     * Frame format.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   110
     *
53863
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
   111
     * @param title the title of the window
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
   112
     * @param description the content for the description META tag
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
     * @param includeScript boolean set true if windowtitle script is to be included
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   114
     * @throws DocFileIOException if there is a problem building the package index file
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
     */
53863
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
   116
    protected void buildPackageIndexFile(String title, String description, boolean includeScript)
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
   117
            throws DocFileIOException {
52644
43efb4ca6d6c 8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents: 51797
diff changeset
   118
        String windowOverview = resources.getText(title);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   119
        Content body = getBody(includeScript, getWindowTitle(windowOverview));
53562
0d9dee001667 8215577: Remove javadoc support for HTML 4
pmuthuswamy
parents: 52644
diff changeset
   120
        Content header = HtmlTree.HEADER();
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   121
        addNavigationBarHeader(header);
53562
0d9dee001667 8215577: Remove javadoc support for HTML 4
pmuthuswamy
parents: 52644
diff changeset
   122
        Content main = HtmlTree.MAIN();
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   123
        addOverviewHeader(main);
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   124
        addIndex(header, main);
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   125
        addOverview(main);
53562
0d9dee001667 8215577: Remove javadoc support for HTML 4
pmuthuswamy
parents: 52644
diff changeset
   126
        Content footer = HtmlTree.FOOTER();
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   127
        addNavigationBarFooter(footer);
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   128
        body.addContent(header);
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   129
        body.addContent(main);
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   130
        body.addContent(footer);
53863
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
   131
        printHtmlDocument(
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
   132
                configuration.metakeywords.getOverviewMetaKeywords(title, configuration.doctitle),
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
   133
                description, includeScript, body);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   137
     * 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
   138
     *
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   139
     * @param main the document tree to which the overview will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
     */
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   141
    protected void addOverview(Content main) { }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   144
     * 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
   145
     *
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   146
     * @param header the document tree to which the navigation links will be added
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   147
     * @param main the document tree to which the packages list will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
     */
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   149
    protected void addIndex(Content header, Content main) {
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   150
        addIndexContents(header, main);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   154
     * 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
   155
     * the sub-classes. Adds it to the body HtmlTree
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
     *
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   157
     * @param header the document tree to which navigation links will be added
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   158
     * @param main the document tree to which the packages list will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
     */
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   160
    protected void addIndexContents(Content header, Content main) {
24221
2376793dd33b 8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents: 19937
diff changeset
   161
        if (!packages.isEmpty()) {
53562
0d9dee001667 8215577: Remove javadoc support for HTML 4
pmuthuswamy
parents: 52644
diff changeset
   162
            HtmlTree htmlTree = HtmlTree.NAV();
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   163
            htmlTree.setStyle(HtmlStyle.indexNav);
29957
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   164
            HtmlTree ul = new HtmlTree(HtmlTag.UL);
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   165
            addAllClassesLink(ul);
44879
49beafe2faf3 8166306: Broken link for All Packages in java.jnlp module
bpatel
parents: 40587
diff changeset
   166
            if (configuration.showModules  && configuration.modules.size() > 1) {
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   167
                addAllModulesLink(ul);
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   168
            }
29957
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   169
            htmlTree.addContent(ul);
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   170
            header.addContent(htmlTree);
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49551
diff changeset
   171
            addPackagesList(main);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   176
     * 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
   177
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   178
     * @param body the document tree to which the title will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   180
    protected void addConfigurationTitle(Content body) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
        if (configuration.doctitle.length() > 0) {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   182
            Content title = new RawHtml(configuration.doctitle);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   183
            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
   184
                    HtmlStyle.title, title);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   185
            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
   186
            body.addContent(div);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
    /**
15723
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   191
     * Do nothing. This will be overridden.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   192
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   193
     * @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
   194
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   195
    protected void addAllClassesLink(Content div) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents: 14357
diff changeset
   196
    }
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   197
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   198
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   199
     * Do nothing. This will be overridden.
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   200
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   201
     * @param div the document tree to which the all modules link will be added
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   202
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   203
    protected void addAllModulesLink(Content div) {
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
   204
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
}