langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java
author ohair
Tue, 25 May 2010 15:54:51 -0700
changeset 5520 86e4b9a9da40
parent 2320 5b8c377175f4
child 7614 cfadc977ca75
permissions -rw-r--r--
6943119: Rebrand source copyright notices Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
     2
 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
    23
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
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.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
import com.sun.javadoc.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
import java.io.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
import java.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
 * Generate package usage information.
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 * @author Robert G. Field
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    37
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
public class PackageUseWriter extends SubWriterHolderWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
    final PackageDoc pkgdoc;
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    42
    final SortedMap<String,Set<ClassDoc>> usingPackageToUsedClasses = new TreeMap<String,Set<ClassDoc>>();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
     * Constructor.
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
     * @param filename the file to be generated.
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
     * @throws IOException
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
     * @throws DocletAbortException
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
    public PackageUseWriter(ConfigurationImpl configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
                            ClassUseMapper mapper, String filename,
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
                            PackageDoc pkgdoc) throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
        super(configuration, DirectoryManager.getDirectoryPath(pkgdoc),
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
              filename,
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
              DirectoryManager.getRelativePath(pkgdoc.name()));
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
        this.pkgdoc = pkgdoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
        // by examining all classes in this package, find what packages
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
        // use these classes - produce a map between using package and
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
        // used classes.
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
        ClassDoc[] content = pkgdoc.allClasses();
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
        for (int i = 0; i < content.length; ++i) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
            ClassDoc usedClass = content[i];
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    65
            Set<ClassDoc> usingClasses = mapper.classToClass.get(usedClass.qualifiedName());
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
            if (usingClasses != null) {
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
    67
                for (Iterator<ClassDoc> it = usingClasses.iterator(); it.hasNext(); ) {
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
    68
                    ClassDoc usingClass = it.next();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
                    PackageDoc usingPackage = usingClass.containingPackage();
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    70
                    Set<ClassDoc> usedClasses = usingPackageToUsedClasses
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
                        .get(usingPackage.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
                    if (usedClasses == null) {
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    73
                        usedClasses = new TreeSet<ClassDoc>();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
                        usingPackageToUsedClasses.put(Util.getPackageName(usingPackage),
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
                                                      usedClasses);
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
                    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
                    usedClasses.add(usedClass);
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
     * Generate a class page.
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
     * @param configuration the current configuration of the doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
     * @param mapper        the mapping of the class usage.
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
     * @param pkgdoc        the package doc being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
    public static void generate(ConfigurationImpl configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
                                ClassUseMapper mapper, PackageDoc pkgdoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
        PackageUseWriter pkgusegen;
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
        String filename = "package-use.html";
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
        try {
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
            pkgusegen = new PackageUseWriter(configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
                                             mapper, filename, pkgdoc);
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
            pkgusegen.generatePackageUseFile();
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
            pkgusegen.close();
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
        } catch (IOException exc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
            configuration.standardmessage.error(
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
                "doclet.exception_encountered",
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
                exc.toString(), filename);
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
            throw new DocletAbortException();
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
     * Print the class use list.
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
    protected void generatePackageUseFile() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
        printPackageUseHeader();
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
        if (usingPackageToUsedClasses.isEmpty()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
            printText("doclet.ClassUse_No.usage.of.0", pkgdoc.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
            p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
            generatePackageUse();
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
        printPackageUseFooter();
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
     * Print the class use list.
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
    protected void generatePackageUse() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
        if (configuration.packages.length > 1) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
            generatePackageList();
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
        generateClassList();
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
    protected void generatePackageList() throws IOException {
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   135
        tableIndexSummary(useTableSummary);
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   136
        tableCaptionStart();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
        printText("doclet.ClassUse_Packages.that.use.0",
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
            getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false));
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   139
        tableCaptionEnd();
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   140
        summaryTableHeader(packageTableHeader, "col");
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
   141
        Iterator<String> it = usingPackageToUsedClasses.keySet().iterator();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
        while (it.hasNext()) {
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
   143
            PackageDoc pkg = configuration.root.packageNamed(it.next());
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
            generatePackageUse(pkg);
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
        tableEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
        space();
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
        p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
    protected void generateClassList() throws IOException {
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   152
        String[] classTableHeader = new String[] {
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   153
            configuration.getText("doclet.0_and_1",
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   154
                    configuration.getText("doclet.Class"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   155
                    configuration.getText("doclet.Description"))
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   156
        };
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
   157
        Iterator<String> itp = usingPackageToUsedClasses.keySet().iterator();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
        while (itp.hasNext()) {
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
   159
            String packageName = itp.next();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
            PackageDoc usingPackage = configuration.root.packageNamed(packageName);
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
            if (usingPackage != null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
                anchor(usingPackage.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
            }
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   164
            tableIndexSummary(configuration.getText("doclet.Use_Table_Summary",
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   165
                    configuration.getText("doclet.classes")));
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   166
            tableCaptionStart();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
            printText("doclet.ClassUse_Classes.in.0.used.by.1",
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
                getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false),
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
                getPackageLink(usingPackage,Util.getPackageName(usingPackage), false));
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   170
            tableCaptionEnd();
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   171
            summaryTableHeader(classTableHeader, "col");
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
   172
            Iterator<ClassDoc> itc =
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
   173
                    usingPackageToUsedClasses.get(packageName).iterator();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
            while (itc.hasNext()) {
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
   175
                printClassRow(itc.next(), packageName);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
            tableEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
            space();
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
            p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
    protected void printClassRow(ClassDoc usedClass, String packageName) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
        String path = pathString(usedClass,
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
                                 "class-use/" + usedClass.name() + ".html");
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
        trBgcolorStyle("white", "TableRowColor");
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
        summaryRow(0);
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 1264
diff changeset
   189
        strong();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
        printHyperLink(path, packageName, usedClass.name(), true);
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 1264
diff changeset
   191
        strongEnd();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
        println(); br();
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
        printNbsps();
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
        printIndexComment(usedClass);
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
        summaryRowEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
        trEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
     * Print the package use list.
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
    protected void generatePackageUse(PackageDoc pkg) throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
        trBgcolorStyle("white", "TableRowColor");
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
        summaryRow(0);
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
        //Just want an anchor here.
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
        printHyperLink("", pkg.name(), Util.getPackageName(pkg), true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
        summaryRowEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
        summaryRow(0);
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
        if (pkg != null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
            printSummaryComment(pkg);
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
        space();
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
        summaryRowEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
        trEnd();
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
     * Print the header for the class use Listing.
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
    protected void printPackageUseHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
        String packageLabel = configuration.getText("doclet.Package");
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
        String name = pkgdoc.name();
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
        printHtmlHeader(configuration.getText("doclet.Window_ClassUse_Header",
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
            packageLabel, name), null, true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
        printTop();
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
        navLinks(true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
        hr();
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
        center();
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
        h2();
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 1264
diff changeset
   230
        strongText("doclet.ClassUse_Title", packageLabel, name);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
        h2End();
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
        centerEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
     * Print the footer for the class use Listing.
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
    protected void printPackageUseFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
        hr();
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
        navLinks(false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
        printBottom();
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
        printBodyHtmlEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
     * Print this package link
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
    protected void navLinkPackage() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
        navCellStart();
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
        printHyperLink("package-summary.html", "", configuration.getText("doclet.Package"),
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
                       true, "NavBarFont1");
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
        navCellEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
     * Print class use link
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
    protected void navLinkClassUse() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
        navCellRevStart();
06bc494ca11e Initial load
duke
parents:
diff changeset
   261
        fontStyle("NavBarFont1Rev");
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 1264
diff changeset
   262
        strongText("doclet.navClassUse");
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   263
        fontEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
        navCellEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
    protected void navLinkTree() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
        navCellStart();
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
        printHyperLink("package-tree.html", "", configuration.getText("doclet.Tree"),
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
                       true, "NavBarFont1");
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
        navCellEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   272
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
06bc494ca11e Initial load
duke
parents:
diff changeset
   274
}