langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModulePackageIndexFrameWriter.java
author ksrini
Mon, 05 Jun 2017 13:45:34 -0700
changeset 45417 f7479ee8de69
parent 45157 f5f796453339
permissions -rw-r--r--
8177848: Rename Configuration(Impl) classes Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
     1
/*
45157
f5f796453339 8178043: Support grouping modules in unified javadoc
bpatel
parents: 40587
diff changeset
     2
 * Copyright (c) 2013, 2017, 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;
45157
f5f796453339 8178043: Support grouping modules in unified javadoc
bpatel
parents: 40587
diff changeset
    29
import java.util.Collection;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    30
import java.util.List;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    31
import java.util.Map;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    32
import java.util.Set;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    33
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    34
import javax.lang.model.element.ModuleElement;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    35
import javax.lang.model.element.PackageElement;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    36
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    37
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    38
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    39
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    40
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    41
import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    42
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    43
import jdk.javadoc.internal.doclets.toolkit.Content;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    44
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    45
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    46
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    47
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    48
/**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    49
 * Generate the module package index for the left-hand frame in the generated output.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    50
 * 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
    51
 * left hand frame with the listing of contents of the clicked module package.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    52
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    53
 *  <p><b>This is NOT part of any supported API.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    54
 *  If you write code that depends on this, you do so at your own risk.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    55
 *  This code and its internal interfaces are subject to change or
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    56
 *  deletion without notice.</b>
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    57
 *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    58
 * @author Bhavesh Patel
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    59
 */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    60
public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    61
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    62
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    63
     * Construct the ModulePackageIndexFrameWriter object.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    64
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    65
     * @param configuration the configuration object
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    66
     * @param filename Name of the package index file to be generated.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    67
     */
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 45157
diff changeset
    68
    public ModulePackageIndexFrameWriter(HtmlConfiguration configuration, DocPath filename)  {
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    69
        super(configuration, filename);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    70
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    71
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    72
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    73
     * Generate the module package index file.
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    74
     * @throws DocFileIOException
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    75
     * @param configuration the configuration object
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    76
     * @param mdle the module being documented
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    77
     */
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 45157
diff changeset
    78
    public static void generate(HtmlConfiguration configuration, ModuleElement mdle) throws DocFileIOException {
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    79
        DocPath filename = DocPaths.moduleFrame(mdle);
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    80
        ModulePackageIndexFrameWriter modpackgen = new ModulePackageIndexFrameWriter(configuration, filename);
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    81
        modpackgen.buildModulePackagesIndexFile("doclet.Window_Overview", false, mdle);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    82
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    83
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    84
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    85
     * {@inheritDoc}
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    86
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    87
    protected void addModulePackagesList(Map<ModuleElement, Set<PackageElement>> modules, String text,
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    88
            String tableSummary, Content body, ModuleElement mdle) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    89
        Content profNameContent = new StringContent(mdle.getQualifiedName().toString());
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    90
        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    91
                getTargetModuleLink("classFrame", profNameContent, mdle));
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
    92
        heading.addContent(Contents.SPACE);
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
    93
        heading.addContent(contents.packagesLabel);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    94
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    95
                ? HtmlTree.MAIN(HtmlStyle.indexContainer, heading)
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    96
                : HtmlTree.DIV(HtmlStyle.indexContainer, heading);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    97
        HtmlTree ul = new HtmlTree(HtmlTag.UL);
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
    98
        ul.setTitle(contents.packagesLabel);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
    99
        List<PackageElement> packages = new ArrayList<>(modules.get(mdle));
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   100
        for (PackageElement pkg : packages) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   101
            if ((!(configuration.nodeprecated && utils.isDeprecated(pkg)))) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   102
                ul.addContent(getPackage(pkg, mdle));
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   103
            }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   104
        }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   105
        htmlTree.addContent(ul);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   106
        body.addContent(htmlTree);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   107
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   108
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   109
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   110
     * {@inheritDoc}
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   111
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   112
    protected void addModulePackagesList(Set<ModuleElement> modules, String text,
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   113
            String tableSummary, Content body, ModuleElement mdle) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   114
        Content moduleNameContent = new StringContent(mdle.getQualifiedName().toString());
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   115
        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   116
                getTargetModuleLink("classFrame", moduleNameContent, mdle));
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   117
        heading.addContent(Contents.SPACE);
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   118
        heading.addContent(contents.packagesLabel);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   119
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   120
                ? HtmlTree.MAIN(HtmlStyle.indexContainer, heading)
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   121
                : HtmlTree.DIV(HtmlStyle.indexContainer, heading);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   122
        HtmlTree ul = new HtmlTree(HtmlTag.UL);
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   123
        ul.setTitle(contents.packagesLabel);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   124
        Set<PackageElement> modulePackages = configuration.modulePackages.get(mdle);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   125
        for (PackageElement pkg: modulePackages) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   126
            if ((!(configuration.nodeprecated && utils.isDeprecated(pkg)))) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   127
                ul.addContent(getPackage(pkg, mdle));
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   128
            }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   129
        }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   130
        htmlTree.addContent(ul);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   131
        body.addContent(htmlTree);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   132
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   133
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   134
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   135
     * Returns each package name as a separate link.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   136
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   137
     * @param pkg PackageElement
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   138
     * @param mdle the module being documented
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   139
     * @return content for the package link
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   140
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   141
    protected Content getPackage(PackageElement pkg, ModuleElement mdle) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   142
        Content packageLinkContent;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   143
        Content pkgLabel;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   144
        if (!pkg.isUnnamed()) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   145
            pkgLabel = getPackageLabel(utils.getPackageName(pkg));
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   146
            packageLinkContent = getHyperLink(pathString(pkg,
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   147
                     DocPaths.PACKAGE_FRAME), pkgLabel, "",
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   148
                    "packageFrame");
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   149
        } else {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   150
            pkgLabel = new StringContent("<unnamed package>");
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   151
            packageLinkContent = getHyperLink(DocPaths.PACKAGE_FRAME,
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   152
                    pkgLabel, "", "packageFrame");
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   153
        }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   154
        Content li = HtmlTree.LI(packageLinkContent);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   155
        return li;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   156
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   157
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   158
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   159
     * {@inheritDoc}
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   160
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   161
    protected void addNavigationBarHeader(Content body) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   162
        Content headerContent;
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   163
        if (configuration.packagesheader.length() > 0) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   164
            headerContent = new RawHtml(replaceDocRootDir(configuration.packagesheader));
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   165
        } else {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   166
            headerContent = new RawHtml(replaceDocRootDir(configuration.header));
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   167
        }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   168
        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   169
                HtmlStyle.bar, headerContent);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   170
        body.addContent(heading);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   171
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   172
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   173
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   174
     * Do nothing as there is no overview information in this page.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   175
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   176
    protected void addOverviewHeader(Content body) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   177
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   178
45157
f5f796453339 8178043: Support grouping modules in unified javadoc
bpatel
parents: 40587
diff changeset
   179
    protected void addModulesList(Collection<ModuleElement> modules, String text,
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   180
            String tableSummary, Content body) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   181
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   182
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   183
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   184
     * Adds "All Classes" link for the top of the left-hand frame page to the
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   185
     * documentation tree.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   186
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   187
     * @param ul the Content object to which the all classes link should be added
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   188
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   189
    protected void addAllClassesLink(Content ul) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   190
        Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   191
                contents.allClassesLabel, "", "packageFrame");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   192
        Content li = HtmlTree.LI(linkContent);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   193
        ul.addContent(li);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   194
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   195
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   196
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   197
     * Adds "All Packages" link for the top of the left-hand frame page to the
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   198
     * documentation tree.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   199
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   200
     * @param ul the Content object to which the all packages link should be added
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   201
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   202
    protected void addAllPackagesLink(Content ul) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   203
        Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   204
                contents.allPackagesLabel, "", "packageListFrame");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   205
        Content li = HtmlTree.LI(linkContent);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   206
        ul.addContent(li);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   207
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   208
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   209
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   210
     * Adds "All Modules" link for the top of the left-hand frame page to the
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   211
     * documentation tree.
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   212
     *
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   213
     * @param ul the Content object to which the all modules link should be added
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   214
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   215
    protected void addAllModulesLink(Content ul) {
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   216
        Content linkContent = getHyperLink(DocPaths.MODULE_OVERVIEW_FRAME,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   217
                contents.allModulesLabel, "", "packageListFrame");
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   218
        Content li = HtmlTree.LI(linkContent);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   219
        ul.addContent(li);
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
     * {@inheritDoc}
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   224
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   225
    protected void addNavigationBarFooter(Content body) {
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 36526
diff changeset
   226
        Content p = HtmlTree.P(Contents.SPACE);
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   227
        body.addContent(p);
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   228
    }
3b41f1c69604 8142968: Module System implementation
alanb
parents:
diff changeset
   229
}