langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java
author jjg
Thu, 29 Aug 2013 11:41:20 -0700
changeset 19667 fdfce85627a9
parent 17570 78512b2899db
child 22159 682da512ec17
permissions -rw-r--r--
8001669: javadoc internal DocletAbortException should set cause when appropriate Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15723
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     1
/*
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     2
 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     4
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    10
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    15
 * accompanied this code).
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    16
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    20
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    23
 * questions.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    24
 */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    25
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    26
package com.sun.tools.doclets.formats.html;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    27
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    28
import java.io.*;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    29
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    30
import com.sun.javadoc.*;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    31
import com.sun.tools.javac.sym.Profiles;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    32
import com.sun.tools.doclets.formats.html.markup.*;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    33
import com.sun.tools.doclets.internal.toolkit.*;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    34
import com.sun.tools.doclets.internal.toolkit.util.*;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    35
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    36
/**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    37
 * Generate the profile package index for the left-hand frame in the generated output.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    38
 * A click on the package name in this frame will update the page in the bottom
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    39
 * left hand frame with the listing of contents of the clicked profile package.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    40
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    41
 *  <p><b>This is NOT part of any supported API.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    42
 *  If you write code that depends on this, you do so at your own risk.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    43
 *  This code and its internal interfaces are subject to change or
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    44
 *  deletion without notice.</b>
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    45
 *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    46
 * @author Bhavesh Patel
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    47
 */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    48
public class ProfilePackageIndexFrameWriter extends AbstractProfileIndexWriter {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    49
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    50
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    51
     * Construct the ProfilePackageIndexFrameWriter object.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    52
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    53
     * @param configuration the configuration object
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    54
     * @param filename Name of the package index file to be generated.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    55
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    56
    public ProfilePackageIndexFrameWriter(ConfigurationImpl configuration,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    57
                                   DocPath filename) throws IOException {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    58
        super(configuration, filename);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    59
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    60
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    61
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    62
     * Generate the profile package index file.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    63
     * @throws DocletAbortException
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    64
     * @param configuration the configuration object
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    65
     * @param profileName the name of the profile being documented
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    66
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    67
    public static void generate(ConfigurationImpl configuration, String profileName) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    68
        ProfilePackageIndexFrameWriter profpackgen;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    69
        DocPath filename = DocPaths.profileFrame(profileName);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    70
        try {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    71
            profpackgen = new ProfilePackageIndexFrameWriter(configuration, filename);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    72
            profpackgen.buildProfilePackagesIndexFile("doclet.Window_Overview", false, profileName);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    73
            profpackgen.close();
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    74
        } catch (IOException exc) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    75
            configuration.standardmessage.error(
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    76
                        "doclet.exception_encountered",
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    77
                        exc.toString(), filename);
19667
fdfce85627a9 8001669: javadoc internal DocletAbortException should set cause when appropriate
jjg
parents: 17570
diff changeset
    78
            throw new DocletAbortException(exc);
15723
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    79
        }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    80
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    81
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    82
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    83
     * {@inheritDoc}
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    84
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    85
    protected void addProfilePackagesList(Profiles profiles, String text,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    86
            String tableSummary, Content body, String profileName) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    87
        Content profNameContent = new StringContent(profileName);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    88
        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    89
                getTargetProfileLink("classFrame", profNameContent, profileName));
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    90
        heading.addContent(getSpace());
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    91
        heading.addContent(packagesLabel);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    92
        Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    93
        HtmlTree ul = new HtmlTree(HtmlTag.UL);
17570
78512b2899db 8012183: replace some uses of Configuration.getText with Configuration.getResource
jjg
parents: 17560
diff changeset
    94
        ul.setTitle(packagesLabel);
15723
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    95
        PackageDoc[] packages = configuration.profilePackages.get(profileName);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    96
        for (int i = 0; i < packages.length; i++) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    97
            if ((!(configuration.nodeprecated && Util.isDeprecated(packages[i])))) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    98
                ul.addContent(getPackage(packages[i], profileName));
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
    99
            }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   100
        }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   101
        div.addContent(ul);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   102
        body.addContent(div);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   103
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   104
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   105
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   106
     * Gets each package name as a separate link.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   107
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   108
     * @param pd PackageDoc
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   109
     * @param profileName the name of the profile being documented
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   110
     * @return content for the package link
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   111
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   112
    protected Content getPackage(PackageDoc pd, String profileName) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   113
        Content packageLinkContent;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   114
        Content pkgLabel;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   115
        if (pd.name().length() > 0) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   116
            pkgLabel = getPackageLabel(pd.name());
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   117
            packageLinkContent = getHyperLink(pathString(pd,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   118
                     DocPaths.profilePackageFrame(profileName)), pkgLabel, "",
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   119
                    "packageFrame");
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   120
        } else {
17560
9f6771abbd1a 8011650: reduce use of RawHtml nodes in doclet
jjg
parents: 16547
diff changeset
   121
            pkgLabel = new StringContent("<unnamed package>");
15723
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   122
            packageLinkContent = getHyperLink(DocPaths.PACKAGE_FRAME,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   123
                    pkgLabel, "", "packageFrame");
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   124
        }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   125
        Content li = HtmlTree.LI(packageLinkContent);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   126
        return li;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   127
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   128
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   129
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   130
     * {@inheritDoc}
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   131
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   132
    protected void addNavigationBarHeader(Content body) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   133
        Content headerContent;
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   134
        if (configuration.packagesheader.length() > 0) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   135
            headerContent = new RawHtml(replaceDocRootDir(configuration.packagesheader));
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   136
        } else {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   137
            headerContent = new RawHtml(replaceDocRootDir(configuration.header));
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   138
        }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   139
        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   140
                HtmlStyle.bar, headerContent);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   141
        body.addContent(heading);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   142
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   143
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   144
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   145
     * Do nothing as there is no overview information in this page.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   146
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   147
    protected void addOverviewHeader(Content body) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   148
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   149
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   150
    protected void addProfilesList(Profiles profiles, String text,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   151
            String tableSummary, Content body) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   152
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   153
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   154
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   155
     * Adds "All Classes" link for the top of the left-hand frame page to the
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   156
     * documentation tree.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   157
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   158
     * @param div the Content object to which the all classes link should be added
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   159
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   160
    protected void addAllClassesLink(Content div) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   161
        Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME,
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   162
                allclassesLabel, "", "packageFrame");
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   163
        Content span = HtmlTree.SPAN(linkContent);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   164
        div.addContent(span);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   165
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   166
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   167
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   168
     * Adds "All Packages" link for the top of the left-hand frame page to the
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   169
     * documentation tree.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   170
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   171
     * @param div the Content object to which the all packages link should be added
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   172
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   173
    protected void addAllPackagesLink(Content div) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   174
        Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
16547
3dd72ee2623d 8009684: Default top left frame should be "All Packages" in the generated javadoc documentation
bpatel
parents: 15723
diff changeset
   175
                allpackagesLabel, "", "packageListFrame");
15723
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   176
        Content span = HtmlTree.SPAN(linkContent);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   177
        div.addContent(span);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   178
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   179
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   180
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   181
     * Adds "All Profiles" link for the top of the left-hand frame page to the
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   182
     * documentation tree.
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   183
     *
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   184
     * @param div the Content object to which the all profiles link should be added
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   185
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   186
    protected void addAllProfilesLink(Content div) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   187
        Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
16547
3dd72ee2623d 8009684: Default top left frame should be "All Packages" in the generated javadoc documentation
bpatel
parents: 15723
diff changeset
   188
                allprofilesLabel, "", "packageListFrame");
15723
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   189
        Content span = HtmlTree.SPAN(linkContent);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   190
        div.addContent(span);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   191
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   192
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   193
    /**
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   194
     * {@inheritDoc}
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   195
     */
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   196
    protected void addNavigationBarFooter(Content body) {
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   197
        Content p = HtmlTree.P(getSpace());
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   198
        body.addContent(p);
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   199
    }
58a73dac9ee4 8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff changeset
   200
}