langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java
author bpatel
Thu, 19 Mar 2009 19:00:54 -0700
changeset 2320 5b8c377175f4
parent 1787 1aa079321cd2
child 5520 86e4b9a9da40
permissions -rw-r--r--
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
06bc494ca11e Initial load
duke
parents:
diff changeset
     2
 * Copyright 1997-2005 Sun Microsystems, Inc.  All Rights Reserved.
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
 * have any questions.
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
package com.sun.tools.doclets.formats.html;
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
import com.sun.tools.doclets.internal.toolkit.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
import com.sun.tools.doclets.internal.toolkit.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
import com.sun.javadoc.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
import java.io.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
import java.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 * Class to generate file for each package contents in the right-hand
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 * frame. This will list all the Class Kinds in the package. A click on any
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
 * class-kind will update the frame with the clicked class-kind page.
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 * @author Atul M Dambalkar
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
    41
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
public class PackageWriterImpl extends HtmlDocletWriter
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
    implements PackageSummaryWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
     * The prev package name in the alpha-order list.
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
    protected PackageDoc prev;
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
     * The next package name in the alpha-order list.
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
    protected PackageDoc next;
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
     * The package being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
    protected PackageDoc packageDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
     * The name of the output file.
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
    private static final String OUTPUT_FILE_NAME = "package-summary.html";
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
     * Constructor to construct PackageWriter object and to generate
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
     * "package-summary.html" file in the respective package directory.
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
     * For example for package "java.lang" this will generate file
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
     * "package-summary.html" file in the "java/lang" directory. It will also
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
     * create "java/lang" directory in the current or the destination directory
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
     * if it doesen't exist.
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
     * @param configuration the configuration of the doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
     * @param packageDoc    PackageDoc under consideration.
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
     * @param prev          Previous package in the sorted array.
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
     * @param next            Next package in the sorted array.
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
    public PackageWriterImpl(ConfigurationImpl configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
        PackageDoc packageDoc, PackageDoc prev, PackageDoc next)
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
    throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
        super(configuration, DirectoryManager.getDirectoryPath(packageDoc), OUTPUT_FILE_NAME,
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
             DirectoryManager.getRelativePath(packageDoc.name()));
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
        this.prev = prev;
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
        this.next = next;
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
        this.packageDoc = packageDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
     * Return the name of the output file.
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
     * @return the name of the output file.
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
    public String getOutputFileName() {
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
        return OUTPUT_FILE_NAME;
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
    public void writeSummaryHeader() {}
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
    public void writeSummaryFooter() {}
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
     */
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   111
    public void writeClassesSummary(ClassDoc[] classes, String label, String tableSummary, String[] tableHeader) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
        if(classes.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
            Arrays.sort(classes);
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   114
            tableIndexSummary(tableSummary);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
            boolean printedHeading = false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
            for (int i = 0; i < classes.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
                if (!printedHeading) {
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   118
                    printTableCaption(label);
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   119
                    printFirstRow(tableHeader);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
                    printedHeading = true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
                if (!Util.isCoreClass(classes[i]) ||
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
                    !configuration.isGeneratedDoc(classes[i])) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
                    continue;
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
                trBgcolorStyle("white", "TableRowColor");
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
                summaryRow(15);
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   128
                strong();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
                printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_PACKAGE,
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
                    classes[i], false));
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   131
                strongEnd();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
                summaryRowEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
                summaryRow(0);
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
                if (Util.isDeprecated(classes[i])) {
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   135
                    strongText("doclet.Deprecated");
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
                    if (classes[i].tags("deprecated").length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
                        space();
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
                        printSummaryDeprecatedComment(classes[i],
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
                            classes[i].tags("deprecated")[0]);
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
                    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
                } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
                    printSummaryComment(classes[i]);
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
                summaryRowEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
                trEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
            tableEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
            println("&nbsp;");
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
            p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
    /**
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   154
     * Print the table caption for the class-listing.
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   155
     *
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   156
     * @param label label for the Class kind listing.
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   157
     */
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   158
    protected void printTableCaption(String label) {
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   159
        tableCaptionStart();
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   160
        print(label);
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   161
        tableCaptionEnd();
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   162
    }
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   163
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   164
    /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
     * Print the table heading for the class-listing.
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
     *
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   167
     * @param tableHeader table header string for the Class listing.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
     */
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   169
    protected void printFirstRow(String[] tableHeader) {
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1787
diff changeset
   170
        summaryTableHeader(tableHeader, "col");
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
    public void writePackageDescription() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
        if (packageDoc.inlineTags().length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
            anchor("package_description");
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
            h2(configuration.getText("doclet.Package_Description", packageDoc.name()));
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
            p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
            printInlineComment(packageDoc);
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
            p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
    public void writePackageTags() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
        printTags(packageDoc);
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
    public void writePackageHeader(String heading) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
        String pkgName = packageDoc.name();
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
        printHtmlHeader(pkgName,
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
            configuration.metakeywords.getMetaKeywords(packageDoc), true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
        printTop();
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
        navLinks(true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
        hr();
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
        writeAnnotationInfo(packageDoc);
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
        h2(configuration.getText("doclet.Package") + " " + heading);
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
        if (packageDoc.inlineTags().length > 0 && ! configuration.nocomment) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
            printSummaryComment(packageDoc);
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
            p();
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   208
            strong(configuration.getText("doclet.See"));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
            br();
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
            printNbsps();
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
            printHyperLink("", "package_description",
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
                configuration.getText("doclet.Description"), true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
            p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
    public void writePackageFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
        hr();
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
        navLinks(false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
        printBottom();
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
        printBodyHtmlEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
     * Print "Use" link for this pacakge in the navigation bar.
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
    protected void navLinkClassUse() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
        navCellStart();
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
        printHyperLink("package-use.html", "", configuration.getText("doclet.navClassUse"),
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
                       true, "NavBarFont1");
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
        navCellEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
     * Print "PREV PACKAGE" link in the navigation bar.
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
    protected void navLinkPrevious() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
        if (prev == null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
            printText("doclet.Prev_Package");
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
            String path = DirectoryManager.getRelativePath(packageDoc.name(),
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
                                                           prev.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
            printHyperLink(path + "package-summary.html", "",
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
                configuration.getText("doclet.Prev_Package"), true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
     * Print "NEXT PACKAGE" link in the navigation bar.
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
    protected void navLinkNext() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
        if (next == null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
            printText("doclet.Next_Package");
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
            String path = DirectoryManager.getRelativePath(packageDoc.name(),
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
                                                           next.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
            printHyperLink(path + "package-summary.html", "",
06bc494ca11e Initial load
duke
parents:
diff changeset
   261
                configuration.getText("doclet.Next_Package"), true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   263
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
     * Print "Tree" link in the navigation bar. This will be link to the package
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
     * tree file.
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
    protected void navLinkTree() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
        navCellStart();
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
        printHyperLink("package-tree.html", "", configuration.getText("doclet.Tree"),
06bc494ca11e Initial load
duke
parents:
diff changeset
   272
                       true, "NavBarFont1");
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
        navCellEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   274
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   275
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
     * Highlight "Package" in the navigation bar, as this is the package page.
06bc494ca11e Initial load
duke
parents:
diff changeset
   278
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
    protected void navLinkPackage() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
        navCellRevStart();
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
        fontStyle("NavBarFont1Rev");
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 10
diff changeset
   282
        strongText("doclet.Package");
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
        fontEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
        navCellEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   285
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   286
}