src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModulePackageIndexFrameWriter.java
author jjg
Mon, 11 Mar 2019 12:59:45 -0700
changeset 54060 53a95878619f
parent 53991 786825220790
permissions -rw-r--r--
8220202: Simplify/standardize method naming for HtmlTree Reviewed-by: hannesw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     1
/*
53863
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
     2
 * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     4
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    10
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    15
 * accompanied this code).
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    16
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    20
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    23
 * questions.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    24
 */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    25
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    26
package jdk.javadoc.internal.doclets.formats.html;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    27
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    28
import java.util.ArrayList;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    29
import java.util.List;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    30
import java.util.Map;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    31
import java.util.Set;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    32
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    33
import javax.lang.model.element.ModuleElement;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    34
import javax.lang.model.element.PackageElement;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    35
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    36
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    37
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    38
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    39
import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    40
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    41
import jdk.javadoc.internal.doclets.toolkit.Content;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    42
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    43
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    44
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    45
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    46
/**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    47
 * Generate the module package index for the left-hand frame in the generated output.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    48
 * A click on the package name in this frame will update the page in the bottom
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    49
 * left hand frame with the listing of contents of the clicked module package.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    50
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    51
 *  <p><b>This is NOT part of any supported API.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    52
 *  If you write code that depends on this, you do so at your own risk.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    53
 *  This code and its internal interfaces are subject to change or
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    54
 *  deletion without notice.</b>
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    55
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    56
 * @author Bhavesh Patel
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    57
 */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    58
public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
    59
    /**
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
    60
     * The heading (h1 or h2) to use for the module packages list,
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
    61
     * set by addNavigationBarHeader depending on whether or not there
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
    62
     * is an additional initial heading.
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
    63
     */
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
    64
    private HtmlTag modulePackagesListHeading;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    65
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    66
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    67
     * Construct the ModulePackageIndexFrameWriter object.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    68
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    69
     * @param configuration the configuration object
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    70
     * @param filename Name of the package index file to be generated.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    71
     */
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 45157
diff changeset
    72
    public ModulePackageIndexFrameWriter(HtmlConfiguration configuration, DocPath filename)  {
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    73
        super(configuration, filename);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    74
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    75
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    76
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    77
     * Generate the module package index file.
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    78
     * @throws DocFileIOException
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    79
     * @param configuration the configuration object
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    80
     * @param mdle the module being documented
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    81
     */
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 45157
diff changeset
    82
    public static void generate(HtmlConfiguration configuration, ModuleElement mdle) throws DocFileIOException {
48759
ffa68af7da87 8195795: Organize output files by module/package, not just package
jjg
parents: 48654
diff changeset
    83
        DocPath filename = configuration.docPaths.moduleFrame(mdle);
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    84
        ModulePackageIndexFrameWriter modpackgen = new ModulePackageIndexFrameWriter(configuration, filename);
53863
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
    85
        modpackgen.buildModulePackagesIndexFile("doclet.Window_Overview",
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
    86
                getDescription("module package index", mdle) + " (frame)",
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
    87
                false,
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
    88
                mdle);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    89
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    90
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    91
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    92
     * {@inheritDoc}
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    93
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    94
    protected void addModulePackagesList(Map<ModuleElement, Set<PackageElement>> modules, String text,
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49569
diff changeset
    95
            String tableSummary, Content main, ModuleElement mdle) {
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    96
        Content profNameContent = new StringContent(mdle.getQualifiedName().toString());
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
    97
        Content heading = HtmlTree.HEADING(modulePackagesListHeading, true,
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    98
                getTargetModuleLink("classFrame", profNameContent, mdle));
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
    99
        heading.add(Contents.SPACE);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   100
        heading.add(contents.packagesLabel);
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49569
diff changeset
   101
        HtmlTree htmlTree = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   102
        HtmlTree ul = new HtmlTree(HtmlTag.UL);
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   103
        ul.setTitle(contents.packagesLabel);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   104
        List<PackageElement> packages = new ArrayList<>(modules.get(mdle));
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   105
        for (PackageElement pkg : packages) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   106
            if ((!(configuration.nodeprecated && utils.isDeprecated(pkg)))) {
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   107
                ul.add(getPackage(pkg, mdle));
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   108
            }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   109
        }
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   110
        htmlTree.add(ul);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   111
        main.add(htmlTree);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   112
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   113
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   114
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   115
     * {@inheritDoc}
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   116
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   117
    protected void addModulePackagesList(Set<ModuleElement> modules, String text,
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   118
            String tableSummary, Content body, ModuleElement mdle) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   119
        Content moduleNameContent = new StringContent(mdle.getQualifiedName().toString());
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   120
        Content heading = HtmlTree.HEADING(modulePackagesListHeading, true,
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   121
                getTargetModuleLink("classFrame", moduleNameContent, mdle));
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   122
        heading.add(Contents.SPACE);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   123
        heading.add(contents.packagesLabel);
53562
0d9dee001667 8215577: Remove javadoc support for HTML 4
pmuthuswamy
parents: 51797
diff changeset
   124
        HtmlTree htmlTree = HtmlTree.MAIN(HtmlStyle.indexContainer, heading);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   125
        HtmlTree ul = new HtmlTree(HtmlTag.UL);
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   126
        ul.setTitle(contents.packagesLabel);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   127
        Set<PackageElement> modulePackages = configuration.modulePackages.get(mdle);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   128
        for (PackageElement pkg: modulePackages) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   129
            if ((!(configuration.nodeprecated && utils.isDeprecated(pkg)))) {
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   130
                ul.add(getPackage(pkg, mdle));
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   131
            }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   132
        }
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   133
        htmlTree.add(ul);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   134
        body.add(htmlTree);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   135
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   136
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   137
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   138
     * Returns each package name as a separate link.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   139
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   140
     * @param pkg PackageElement
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   141
     * @param mdle the module being documented
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   142
     * @return content for the package link
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   143
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   144
    protected Content getPackage(PackageElement pkg, ModuleElement mdle) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   145
        Content packageLinkContent;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   146
        Content pkgLabel;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   147
        if (!pkg.isUnnamed()) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   148
            pkgLabel = getPackageLabel(utils.getPackageName(pkg));
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47850
diff changeset
   149
            packageLinkContent = links.createLink(pathString(pkg,
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   150
                     DocPaths.PACKAGE_FRAME), pkgLabel, "",
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   151
                    "packageFrame");
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   152
        } else {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   153
            pkgLabel = new StringContent("<unnamed package>");
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47850
diff changeset
   154
            packageLinkContent = links.createLink(DocPaths.PACKAGE_FRAME,
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   155
                    pkgLabel, "", "packageFrame");
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   156
        }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   157
        Content li = HtmlTree.LI(packageLinkContent);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   158
        return li;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   159
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   160
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   161
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   162
     * {@inheritDoc}
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   163
     */
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49569
diff changeset
   164
    protected void addNavigationBarHeader(Content header) {
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   165
        String headerContent = !configuration.packagesheader.isEmpty() ? configuration.packagesheader
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   166
                : configuration.header;
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   167
        if (!headerContent.isEmpty()) {
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   168
            Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   169
                    HtmlStyle.bar, new RawHtml(replaceDocRootDir(headerContent)));
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   170
            header.add(heading);
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   171
            modulePackagesListHeading = Headings.IndexFrames.PACKAGE_HEADING;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   172
        } else {
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   173
            modulePackagesListHeading = Headings.PAGE_TITLE_HEADING;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   174
        }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   175
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   176
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   177
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   178
     * Do nothing as there is no overview information in this page.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   179
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   180
    protected void addOverviewHeader(Content body) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   181
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   182
47447
9887d1bc3e9c 8183037: Overview summary page should have a table with tabs for groups
bpatel
parents: 47216
diff changeset
   183
    /**
9887d1bc3e9c 8183037: Overview summary page should have a table with tabs for groups
bpatel
parents: 47216
diff changeset
   184
     * Do nothing as there is no modules list on this page.
9887d1bc3e9c 8183037: Overview summary page should have a table with tabs for groups
bpatel
parents: 47216
diff changeset
   185
     */
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   186
    @Override
47447
9887d1bc3e9c 8183037: Overview summary page should have a table with tabs for groups
bpatel
parents: 47216
diff changeset
   187
    protected void addModulesList(Content body) {
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   188
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   189
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   190
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   191
     * Adds "All Classes" link for the top of the left-hand frame page to the
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   192
     * documentation tree.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   193
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   194
     * @param ul the Content object to which the all classes link should be added
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   195
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   196
    protected void addAllClassesLink(Content ul) {
49569
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   197
        DocPath allClassesFrame = configuration.useModuleDirectories
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   198
                ? DocPaths.DOT_DOT.resolve(DocPaths.ALLCLASSES_FRAME)
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   199
                : DocPaths.ALLCLASSES_FRAME;
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   200
        Content linkContent = links.createLink(allClassesFrame,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   201
                contents.allClassesLabel, "", "packageFrame");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   202
        Content li = HtmlTree.LI(linkContent);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   203
        ul.add(li);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   204
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   205
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   206
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   207
     * Adds "All Packages" link for the top of the left-hand frame page to the
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   208
     * documentation tree.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   209
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   210
     * @param ul the Content object to which the all packages link should be added
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   211
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   212
    protected void addAllPackagesLink(Content ul) {
49569
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   213
        DocPath overviewFrame = configuration.useModuleDirectories
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   214
                ? DocPaths.DOT_DOT.resolve(DocPaths.OVERVIEW_FRAME)
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   215
                : DocPaths.OVERVIEW_FRAME;
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   216
        Content linkContent = links.createLink(overviewFrame,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   217
                contents.allPackagesLabel, "", "packageListFrame");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   218
        Content li = HtmlTree.LI(linkContent);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   219
        ul.add(li);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   220
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   221
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   222
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   223
     * Adds "All Modules" link for the top of the left-hand frame page to the
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   224
     * documentation tree.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   225
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   226
     * @param ul the Content object to which the all modules link should be added
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   227
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   228
    protected void addAllModulesLink(Content ul) {
49569
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   229
        DocPath moduleOverviewFrame = configuration.useModuleDirectories
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   230
                ? DocPaths.DOT_DOT.resolve(DocPaths.MODULE_OVERVIEW_FRAME)
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   231
                : DocPaths.MODULE_OVERVIEW_FRAME;
d4d2f634b72f 8201396: fix broken links generated by javadoc doclet
jjg
parents: 48759
diff changeset
   232
        Content linkContent = links.createLink(moduleOverviewFrame,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   233
                contents.allModulesLabel, "", "packageListFrame");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   234
        Content li = HtmlTree.LI(linkContent);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   235
        ul.add(li);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   236
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   237
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   238
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   239
     * {@inheritDoc}
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   240
     */
51797
3efead10e303 8210047: some pages contain content outside of landmark region
pmuthuswamy
parents: 49569
diff changeset
   241
    protected void addNavigationBarFooter(Content footer) {
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   242
        Content p = HtmlTree.P(Contents.SPACE);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   243
        footer.add(p);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   244
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   245
}