src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java
author pmuthuswamy
Wed, 19 Sep 2018 12:14:53 +0530
changeset 51797 3efead10e303
parent 50167 cc705c956798
child 52644 43efb4ca6d6c
permissions -rw-r--r--
8210047: some pages contain content outside of landmark region Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
50167
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 49551
diff changeset
     2
 * Copyright (c) 1997, 2018, 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: 31751
diff changeset
    26
package jdk.javadoc.internal.doclets.formats.html;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
    28
import jdk.javadoc.internal.doclets.formats.html.markup.Table;
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
    29
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
import java.util.*;
14258
8d2148961366 8000663: clean up langtools imports
jjg
parents: 9606
diff changeset
    31
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31751
diff changeset
    32
import javax.lang.model.element.PackageElement;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31751
diff changeset
    33
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
    34
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31751
diff changeset
    35
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31751
diff changeset
    36
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31751
diff changeset
    37
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31751
diff changeset
    38
import jdk.javadoc.internal.doclets.toolkit.Content;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    39
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31751
diff changeset
    40
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31751
diff changeset
    41
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31751
diff changeset
    42
import jdk.javadoc.internal.doclets.toolkit.util.Group;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 * Generate the package index page "overview-summary.html" for the right-hand
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
 * frame. A click on the package name on this page will update the same frame
14357
faf9cde2817b 8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents: 14260
diff changeset
    47
 * with the "package-summary.html" file for the clicked package.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14259
diff changeset
    49
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14259
diff changeset
    50
 *  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: 14259
diff changeset
    51
 *  This code and its internal interfaces are subject to change or
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14259
diff changeset
    52
 *  deletion without notice.</b>
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14259
diff changeset
    53
 *
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
 * @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: 2212
diff changeset
    55
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
public class PackageIndexWriter extends AbstractPackageIndexWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
     * Construct the PackageIndexWriter. Also constructs the grouping
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
     * information as provided on the command line by "-group" option. Stores
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
     * the order of groups specified by the user.
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
     *
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    64
     * @param configuration the configuration for this doclet
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    65
     * @param filename the path of the page to be generated
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
     * @see Group
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
     */
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 45157
diff changeset
    68
    public PackageIndexWriter(HtmlConfiguration configuration, DocPath filename) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
        super(configuration, filename);
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
     * Generate the package index page for the right-hand frame.
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
     * @param configuration the current configuration of the doclet.
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    76
     * @throws DocFileIOException if there is a problem generating the package index page
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
     */
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 45157
diff changeset
    78
    public static void generate(HtmlConfiguration configuration) throws DocFileIOException {
40500
f293dbb81a53 8162353: javadoc should provide a way to disable use of frames
jjg
parents: 40303
diff changeset
    79
        DocPath filename = DocPaths.overviewSummary(configuration.frames);
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    80
        PackageIndexWriter packgen = new PackageIndexWriter(configuration, filename);
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    81
        packgen.buildPackageIndexFile("doclet.Window_Overview_Summary", true);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
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
     * Depending upon the grouping information and their titles, add
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    86
     * separate table indices for each package group.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
     *
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
    88
     * @param header the documentation tree to which the navigational links will be added
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
    89
     * @param main the documentation tree to which the packages list will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    91
    @Override
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
    92
    protected void addIndex(Content header, Content main) {
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
    93
        addIndexContents(header, main);
7614
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
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    96
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    97
     * {@inheritDoc}
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
    98
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    99
    @Override
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   100
    protected void addPackagesList(Content main) {
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   101
        Map<String, SortedSet<PackageElement>> groupPackageMap
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   102
                = configuration.group.groupPackages(packages);
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   103
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   104
        if (!groupPackageMap.keySet().isEmpty()) {
47447
9887d1bc3e9c 8183037: Overview summary page should have a table with tabs for groups
bpatel
parents: 47427
diff changeset
   105
            String tableSummary = configuration.getText("doclet.Member_Table_Summary",
9887d1bc3e9c 8183037: Overview summary page should have a table with tabs for groups
bpatel
parents: 47427
diff changeset
   106
                    configuration.getText("doclet.Package_Summary"), configuration.getText("doclet.packages"));
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   107
            Table table =  new Table(configuration.htmlVersion, HtmlStyle.overviewSummary)
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   108
                    .setSummary(tableSummary)
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   109
                    .setHeader(getPackageTableHeader())
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   110
                    .setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast)
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   111
                    .setDefaultTab(resources.getText("doclet.All_Packages"))
50167
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 49551
diff changeset
   112
                    .setTabScript(i -> "show(" + i + ");")
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   113
                    .setTabId(i -> (i == 0) ? "t0" : ("t" + (1 << (i - 1))));
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   114
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   115
            // add the tabs in command-line order
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   116
            for (String groupName : configuration.group.getGroupList()) {
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   117
                Set<PackageElement> groupPackages = groupPackageMap.get(groupName);
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   118
                if (groupPackages != null) {
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   119
                    table.addTab(groupName, groupPackages::contains);
47447
9887d1bc3e9c 8183037: Overview summary page should have a table with tabs for groups
bpatel
parents: 47427
diff changeset
   120
                }
9887d1bc3e9c 8183037: Overview summary page should have a table with tabs for groups
bpatel
parents: 47427
diff changeset
   121
            }
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   122
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   123
            for (PackageElement pkg : configuration.packages) {
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   124
                if (!pkg.isUnnamed()) {
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   125
                    if (!(configuration.nodeprecated && utils.isDeprecated(pkg))) {
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   126
                        Content packageLinkContent = getPackageLink(pkg, getPackageName(pkg));
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   127
                        Content summaryContent = new ContentBuilder();
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   128
                        addSummaryComment(pkg, summaryContent);
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   129
                        table.addRow(pkg, packageLinkContent, summaryContent);
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   130
                    }
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   131
                }
47447
9887d1bc3e9c 8183037: Overview summary page should have a table with tabs for groups
bpatel
parents: 47427
diff changeset
   132
            }
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   133
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   134
            Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table.toContent());
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   135
            main.addContent(div);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   136
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   137
            if (table.needsScript()) {
47847
7640bc1eb94f 8190818: Introduce a new Script builder class
jjg
parents: 47846
diff changeset
   138
                getMainBodyScript().append(table.getScript());
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
    }
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 overview summary comment for this documentation. Add one line
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
     * summary at the top of the page and generate a link to the description,
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   146
     * which is added at the end of this page.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   147
     *
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   148
     * @param main the documentation tree to which the overview header will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
   150
    @Override
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   151
    protected void addOverviewHeader(Content main) {
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   152
        addConfigurationTitle(main);
41452
ddaef4bba083 8165991: Fix DocTreeFactory newDocCommentTree
ksrini
parents: 41157
diff changeset
   153
        if (!utils.getFullBody(configuration.overviewElement).isEmpty()) {
43755
ae42964e27e3 8173302: Move the Description up on module and package index page
ksrini
parents: 41452
diff changeset
   154
            HtmlTree div = new HtmlTree(HtmlTag.DIV);
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47447
diff changeset
   155
            div.setStyle(HtmlStyle.contentContainer);
43755
ae42964e27e3 8173302: Move the Description up on module and package index page
ksrini
parents: 41452
diff changeset
   156
            addOverviewComment(div);
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   157
            main.addContent(div);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   162
     * Adds the overview comment as provided in the file specified by the
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   163
     * "-overview" option on the command line.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   164
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   165
     * @param htmltree the documentation tree to which the overview comment will
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   166
     *                 be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   168
    protected void addOverviewComment(Content htmltree) {
41452
ddaef4bba083 8165991: Fix DocTreeFactory newDocCommentTree
ksrini
parents: 41157
diff changeset
   169
        if (!utils.getFullBody(configuration.overviewElement).isEmpty()) {
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 31751
diff changeset
   170
            addInlineComment(configuration.overviewElement, htmltree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   175
     * Adds the top text (from the -top option), the upper
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
     * navigation bar, and then the title (from the"-title"
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
     * option), at the top of page.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   178
     *
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   179
     * @param header the documentation tree to which the navigation bar header will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
   181
    @Override
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   182
    protected void addNavigationBarHeader(Content header) {
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   183
        addTop(header);
49551
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 47847
diff changeset
   184
        navBar.setUserHeader(getUserHeaderFooter(true));
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   185
        header.addContent(navBar.getContent(true));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   189
     * Adds the lower navigation bar and the bottom text
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
     * (from the -bottom option) at the bottom of page.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   191
     *
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   192
     * @param footer the documentation tree to which the navigation bar footer will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
   194
    @Override
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   195
    protected void addNavigationBarFooter(Content footer) {
49551
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 47847
diff changeset
   196
        navBar.setUserFooter(getUserHeaderFooter(false));
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   197
        footer.addContent(navBar.getContent(false));
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 50167
diff changeset
   198
        addBottom(footer);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
}