langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
author bpatel
Thu, 08 Jan 2009 16:26:59 -0800
changeset 1787 1aa079321cd2
parent 1264 076a3cde30d5
child 1789 7ac8c0815000
permissions -rw-r--r--
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
1264
076a3cde30d5 6754988: Update copyright year
xdono
parents: 868
diff changeset
     2
 * Copyright 1998-2008 Sun Microsystems, Inc.  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
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.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 class usage information.
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 * @author Robert G. Field
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
public class ClassUseWriter extends SubWriterHolderWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
    final ClassDoc classdoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
    Set pkgToPackageAnnotations = null;
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    42
    final Map<String,List<ProgramElementDoc>> pkgToClassTypeParameter;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    43
    final Map<String,List<ProgramElementDoc>> pkgToClassAnnotations;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    44
    final Map<String,List<ProgramElementDoc>> pkgToMethodTypeParameter;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    45
    final Map<String,List<ProgramElementDoc>> pkgToMethodArgTypeParameter;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    46
    final Map<String,List<ProgramElementDoc>> pkgToMethodReturnTypeParameter;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    47
    final Map<String,List<ProgramElementDoc>> pkgToMethodAnnotations;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    48
    final Map<String,List<ProgramElementDoc>> pkgToMethodParameterAnnotations;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    49
    final Map<String,List<ProgramElementDoc>> pkgToFieldTypeParameter;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    50
    final Map<String,List<ProgramElementDoc>> pkgToFieldAnnotations;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    51
    final Map<String,List<ProgramElementDoc>> pkgToSubclass;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    52
    final Map<String,List<ProgramElementDoc>> pkgToSubinterface;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    53
    final Map<String,List<ProgramElementDoc>> pkgToImplementingClass;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    54
    final Map<String,List<ProgramElementDoc>> pkgToField;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    55
    final Map<String,List<ProgramElementDoc>> pkgToMethodReturn;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    56
    final Map<String,List<ProgramElementDoc>> pkgToMethodArgs;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    57
    final Map<String,List<ProgramElementDoc>> pkgToMethodThrows;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    58
    final Map<String,List<ProgramElementDoc>> pkgToConstructorAnnotations;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    59
    final Map<String,List<ProgramElementDoc>> pkgToConstructorParameterAnnotations;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    60
    final Map<String,List<ProgramElementDoc>> pkgToConstructorArgs;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    61
    final Map<String,List<ProgramElementDoc>> pkgToConstructorArgTypeParameter;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    62
    final Map<String,List<ProgramElementDoc>> pkgToConstructorThrows;
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    63
    final SortedSet<PackageDoc> pkgSet;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
    final MethodWriterImpl methodSubWriter;
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
    final ConstructorWriterImpl constrSubWriter;
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
    final FieldWriterImpl fieldSubWriter;
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
    final NestedClassWriterImpl classSubWriter;
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
     * Constructor.
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
     * @param filename the file to be generated.
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
     * @throws IOException
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
     * @throws DocletAbortException
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
    public ClassUseWriter(ConfigurationImpl configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
                          ClassUseMapper mapper, String path,
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
                          String filename, String relpath,
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
                          ClassDoc classdoc) throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
        super(configuration, path, filename, relpath);
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
        this.classdoc = classdoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
        if (mapper.classToPackageAnnotations.containsKey(classdoc.qualifiedName()))
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    84
                pkgToPackageAnnotations = new HashSet<PackageDoc>(mapper.classToPackageAnnotations.get(classdoc.qualifiedName()));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
        configuration.currentcd = classdoc;
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    86
        this.pkgSet = new TreeSet<PackageDoc>();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
        this.pkgToClassTypeParameter = pkgDivide(mapper.classToClassTypeParam);
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
        this.pkgToClassAnnotations = pkgDivide(mapper.classToClassAnnotations);
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
        this.pkgToMethodTypeParameter = pkgDivide(mapper.classToExecMemberDocTypeParam);
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
        this.pkgToMethodArgTypeParameter = pkgDivide(mapper.classToExecMemberDocArgTypeParam);
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
        this.pkgToFieldTypeParameter = pkgDivide(mapper.classToFieldDocTypeParam);
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
        this.pkgToFieldAnnotations = pkgDivide(mapper.annotationToFieldDoc);
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
        this.pkgToMethodReturnTypeParameter = pkgDivide(mapper.classToExecMemberDocReturnTypeParam);
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
        this.pkgToMethodAnnotations = pkgDivide(mapper.classToExecMemberDocAnnotations);
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
        this.pkgToMethodParameterAnnotations = pkgDivide(mapper.classToExecMemberDocParamAnnotation);
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
        this.pkgToSubclass = pkgDivide(mapper.classToSubclass);
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
        this.pkgToSubinterface = pkgDivide(mapper.classToSubinterface);
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
        this.pkgToImplementingClass = pkgDivide(mapper.classToImplementingClass);
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
        this.pkgToField = pkgDivide(mapper.classToField);
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
        this.pkgToMethodReturn = pkgDivide(mapper.classToMethodReturn);
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
        this.pkgToMethodArgs = pkgDivide(mapper.classToMethodArgs);
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
        this.pkgToMethodThrows = pkgDivide(mapper.classToMethodThrows);
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
        this.pkgToConstructorAnnotations = pkgDivide(mapper.classToConstructorAnnotations);
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
        this.pkgToConstructorParameterAnnotations = pkgDivide(mapper.classToConstructorParamAnnotation);
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
        this.pkgToConstructorArgs = pkgDivide(mapper.classToConstructorArgs);
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
        this.pkgToConstructorArgTypeParameter = pkgDivide(mapper.classToConstructorDocArgTypeParam);
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
        this.pkgToConstructorThrows = pkgDivide(mapper.classToConstructorThrows);
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
        //tmp test
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
        if (pkgSet.size() > 0 &&
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
            mapper.classToPackage.containsKey(classdoc.qualifiedName()) &&
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
            !pkgSet.equals(mapper.classToPackage.get(classdoc.qualifiedName()))) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
            configuration.root.printWarning("Internal error: package sets don't match: " + pkgSet + " with: " +
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
                                   mapper.classToPackage.get(classdoc.qualifiedName()));
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
        methodSubWriter = new MethodWriterImpl(this);
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
        constrSubWriter = new ConstructorWriterImpl(this);
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
        fieldSubWriter = new FieldWriterImpl(this);
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
        classSubWriter = new NestedClassWriterImpl(this);
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
     * Write out class use pages.
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
     * @throws DocletAbortException
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
    public static void generate(ConfigurationImpl configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
                                ClassTree classtree)  {
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
        ClassUseMapper mapper = new ClassUseMapper(configuration.root, classtree);
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
        ClassDoc[] classes = configuration.root.classes();
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
        for (int i = 0; i < classes.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
            ClassUseWriter.generate(configuration, mapper, classes[i]);
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
        PackageDoc[] pkgs = configuration.packages;
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
        for (int i = 0; i < pkgs.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
            PackageUseWriter.generate(configuration, mapper, pkgs[i]);
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   138
    private Map<String,List<ProgramElementDoc>> pkgDivide(Map<String,? extends List<? extends ProgramElementDoc>> classMap) {
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   139
        Map<String,List<ProgramElementDoc>> map = new HashMap<String,List<ProgramElementDoc>>();
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   140
        List<? extends ProgramElementDoc> list= classMap.get(classdoc.qualifiedName());
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
        if (list != null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
            Collections.sort(list);
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   143
            Iterator<? extends ProgramElementDoc> it = list.iterator();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
            while (it.hasNext()) {
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   145
                ProgramElementDoc doc = it.next();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
                PackageDoc pkg = doc.containingPackage();
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
                pkgSet.add(pkg);
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   148
                List<ProgramElementDoc> inPkg = map.get(pkg.name());
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
                if (inPkg == null) {
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   150
                    inPkg = new ArrayList<ProgramElementDoc>();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
                    map.put(pkg.name(), inPkg);
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
                inPkg.add(doc);
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
        return map;
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
     * Generate a class page.
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
    public static void generate(ConfigurationImpl configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
                                ClassUseMapper mapper, ClassDoc classdoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
        ClassUseWriter clsgen;
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
        String path = DirectoryManager.getDirectoryPath(classdoc.
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
                                                            containingPackage());
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
        if (path.length() > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
            path += File.separator;
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
        path += "class-use";
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
        String filename = classdoc.name() + ".html";
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
        String pkgname = classdoc.containingPackage().name();
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
        pkgname += (pkgname.length() > 0)? ".class-use": "class-use";
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
        String relpath = DirectoryManager.getRelativePath(pkgname);
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
        try {
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
            clsgen = new ClassUseWriter(configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
                                        mapper, path, filename,
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
                                        relpath, classdoc);
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
            clsgen.generateClassUseFile();
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
            clsgen.close();
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
        } catch (IOException exc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
            configuration.standardmessage.
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
                error("doclet.exception_encountered",
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
                      exc.toString(), filename);
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
            throw new DocletAbortException();
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
     * Print the class use list.
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
    protected void generateClassUseFile() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
        printClassUseHeader();
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
        if (pkgSet.size() > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
            generateClassUse();
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
            printText("doclet.ClassUse_No.usage.of.0",
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
                      classdoc.qualifiedName());
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
            p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
        printClassUseFooter();
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
    protected void generateClassUse() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
        if (configuration.packages.length > 1) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
            generatePackageList();
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
            generatePackageAnnotationList();
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
        generateClassList();
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
    protected void generatePackageList() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
        tableIndexSummary();
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
        tableHeaderStart("#CCCCFF");
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
        printText("doclet.ClassUse_Packages.that.use.0",
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
            getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
                false)));
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
        tableHeaderEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
        for (Iterator it = pkgSet.iterator(); it.hasNext();) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
            PackageDoc pkg = (PackageDoc)it.next();
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
            generatePackageUse(pkg);
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
        tableEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
        space();
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
        p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
    protected void generatePackageAnnotationList() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
        if ((! classdoc.isAnnotationType()) ||
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
               pkgToPackageAnnotations == null ||
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
               pkgToPackageAnnotations.size() == 0)
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
            return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
        tableIndexSummary();
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
        tableHeaderStart("#CCCCFF");
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
        printText("doclet.ClassUse_PackageAnnotation",
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
            getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
                false)));
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
        tableHeaderEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
        for (Iterator it = pkgToPackageAnnotations.iterator(); it.hasNext();) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
            PackageDoc pkg = (PackageDoc)it.next();
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
            trBgcolorStyle("white", "TableRowColor");
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
            summaryRow(0);
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
            //Just want an anchor here.
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
            printPackageLink(pkg, pkg.name(), true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
            summaryRowEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
            summaryRow(0);
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
            printSummaryComment(pkg);
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
            space();
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
            summaryRowEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
            trEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
        tableEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
        space();
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
        p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
06bc494ca11e Initial load
duke
parents:
diff changeset
   261
    protected void generateClassList() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
        for (Iterator it = pkgSet.iterator(); it.hasNext();) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   263
            PackageDoc pkg = (PackageDoc)it.next();
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
            anchor(pkg.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
            tableIndexSummary();
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
            tableHeaderStart("#CCCCFF");
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
            printText("doclet.ClassUse_Uses.of.0.in.1",
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
                getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER,
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
                    classdoc, false)),
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
                getPackageLink(pkg, Util.getPackageName(pkg), false));
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
            tableHeaderEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   272
            tableEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
            space();
06bc494ca11e Initial load
duke
parents:
diff changeset
   274
            p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   275
            generateClassUse(pkg);
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   278
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
     * Print the package use list.
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   282
    protected void generatePackageUse(PackageDoc pkg) throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
        trBgcolorStyle("white", "TableRowColor");
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
        summaryRow(0);
06bc494ca11e Initial load
duke
parents:
diff changeset
   285
        //Just want an anchor here.
06bc494ca11e Initial load
duke
parents:
diff changeset
   286
        printHyperLink("", pkg.name(), Util.getPackageName(pkg), true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   287
        summaryRowEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   288
        summaryRow(0);
06bc494ca11e Initial load
duke
parents:
diff changeset
   289
        printSummaryComment(pkg);
06bc494ca11e Initial load
duke
parents:
diff changeset
   290
        space();
06bc494ca11e Initial load
duke
parents:
diff changeset
   291
        summaryRowEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   292
        trEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   293
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   294
06bc494ca11e Initial load
duke
parents:
diff changeset
   295
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   296
     * Print the class use list.
06bc494ca11e Initial load
duke
parents:
diff changeset
   297
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   298
    protected void generateClassUse(PackageDoc pkg) throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   299
        String classLink = getLink(new LinkInfoImpl(
06bc494ca11e Initial load
duke
parents:
diff changeset
   300
            LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, false));
06bc494ca11e Initial load
duke
parents:
diff changeset
   301
        String pkgLink = getPackageLink(pkg, Util.getPackageName(pkg), false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   302
        classSubWriter.printUseInfo(pkgToClassAnnotations.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   303
            configuration.getText("doclet.ClassUse_Annotation", classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   304
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   305
06bc494ca11e Initial load
duke
parents:
diff changeset
   306
        classSubWriter.printUseInfo(pkgToClassTypeParameter.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   307
            configuration.getText("doclet.ClassUse_TypeParameter", classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   308
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   309
        classSubWriter.printUseInfo(pkgToSubclass.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   310
            configuration.getText("doclet.ClassUse_Subclass", classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   311
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   312
        classSubWriter.printUseInfo(pkgToSubinterface.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   313
                                    configuration.getText("doclet.ClassUse_Subinterface",
06bc494ca11e Initial load
duke
parents:
diff changeset
   314
                                            classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   315
                                            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   316
        classSubWriter.printUseInfo(pkgToImplementingClass.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   317
                                    configuration.getText("doclet.ClassUse_ImplementingClass",
06bc494ca11e Initial load
duke
parents:
diff changeset
   318
                                            classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   319
                                            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   320
        fieldSubWriter.printUseInfo(pkgToField.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   321
                                    configuration.getText("doclet.ClassUse_Field",
06bc494ca11e Initial load
duke
parents:
diff changeset
   322
                                            classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   323
                                            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   324
        fieldSubWriter.printUseInfo(pkgToFieldAnnotations.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   325
            configuration.getText("doclet.ClassUse_FieldAnnotations",
06bc494ca11e Initial load
duke
parents:
diff changeset
   326
            classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   327
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   328
        fieldSubWriter.printUseInfo(pkgToFieldTypeParameter.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   329
            configuration.getText("doclet.ClassUse_FieldTypeParameter",
06bc494ca11e Initial load
duke
parents:
diff changeset
   330
            classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   331
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   332
        methodSubWriter.printUseInfo(pkgToMethodAnnotations.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   333
            configuration.getText("doclet.ClassUse_MethodAnnotations", classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   334
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   335
        methodSubWriter.printUseInfo(pkgToMethodParameterAnnotations.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   336
            configuration.getText("doclet.ClassUse_MethodParameterAnnotations", classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   337
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   338
        methodSubWriter.printUseInfo(pkgToMethodTypeParameter.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   339
            configuration.getText("doclet.ClassUse_MethodTypeParameter", classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   340
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   341
        methodSubWriter.printUseInfo(pkgToMethodReturn.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   342
                                     configuration.getText("doclet.ClassUse_MethodReturn",
06bc494ca11e Initial load
duke
parents:
diff changeset
   343
                                             classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   344
                                             pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   345
        methodSubWriter.printUseInfo(pkgToMethodReturnTypeParameter.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   346
            configuration.getText("doclet.ClassUse_MethodReturnTypeParameter", classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   347
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   348
        methodSubWriter.printUseInfo(pkgToMethodArgs.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   349
                                     configuration.getText("doclet.ClassUse_MethodArgs",
06bc494ca11e Initial load
duke
parents:
diff changeset
   350
                                             classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   351
                                             pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   352
        methodSubWriter.printUseInfo(pkgToMethodArgTypeParameter.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   353
            configuration.getText("doclet.ClassUse_MethodArgsTypeParameters",
06bc494ca11e Initial load
duke
parents:
diff changeset
   354
            classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   355
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   356
        methodSubWriter.printUseInfo(pkgToMethodThrows.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   357
                                     configuration.getText("doclet.ClassUse_MethodThrows",
06bc494ca11e Initial load
duke
parents:
diff changeset
   358
                                             classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   359
                                             pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   360
        constrSubWriter.printUseInfo(pkgToConstructorAnnotations.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   361
            configuration.getText("doclet.ClassUse_ConstructorAnnotations",
06bc494ca11e Initial load
duke
parents:
diff changeset
   362
                classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   363
                pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   364
        constrSubWriter.printUseInfo(pkgToConstructorParameterAnnotations.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   365
            configuration.getText("doclet.ClassUse_ConstructorParameterAnnotations",
06bc494ca11e Initial load
duke
parents:
diff changeset
   366
                classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   367
                pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   368
        constrSubWriter.printUseInfo(pkgToConstructorArgs.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   369
                                     configuration.getText("doclet.ClassUse_ConstructorArgs",
06bc494ca11e Initial load
duke
parents:
diff changeset
   370
                                             classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   371
                                             pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   372
        constrSubWriter.printUseInfo(pkgToConstructorArgTypeParameter.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   373
            configuration.getText("doclet.ClassUse_ConstructorArgsTypeParameters",
06bc494ca11e Initial load
duke
parents:
diff changeset
   374
            classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   375
            pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   376
        constrSubWriter.printUseInfo(pkgToConstructorThrows.get(pkg.name()),
06bc494ca11e Initial load
duke
parents:
diff changeset
   377
                                     configuration.getText("doclet.ClassUse_ConstructorThrows",
06bc494ca11e Initial load
duke
parents:
diff changeset
   378
                                             classLink,
06bc494ca11e Initial load
duke
parents:
diff changeset
   379
                                             pkgLink));
06bc494ca11e Initial load
duke
parents:
diff changeset
   380
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   381
06bc494ca11e Initial load
duke
parents:
diff changeset
   382
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   383
     * Print the header for the class use Listing.
06bc494ca11e Initial load
duke
parents:
diff changeset
   384
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   385
    protected void printClassUseHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   386
        String cltype = configuration.getText(classdoc.isInterface()?
06bc494ca11e Initial load
duke
parents:
diff changeset
   387
                                    "doclet.Interface":
06bc494ca11e Initial load
duke
parents:
diff changeset
   388
                                    "doclet.Class");
06bc494ca11e Initial load
duke
parents:
diff changeset
   389
        String clname = classdoc.qualifiedName();
06bc494ca11e Initial load
duke
parents:
diff changeset
   390
        printHtmlHeader(configuration.getText("doclet.Window_ClassUse_Header",
06bc494ca11e Initial load
duke
parents:
diff changeset
   391
                            cltype, clname), null, true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   392
        printTop();
06bc494ca11e Initial load
duke
parents:
diff changeset
   393
        navLinks(true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   394
        hr();
06bc494ca11e Initial load
duke
parents:
diff changeset
   395
        center();
06bc494ca11e Initial load
duke
parents:
diff changeset
   396
        h2();
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 1264
diff changeset
   397
        strongText("doclet.ClassUse_Title", cltype, clname);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   398
        h2End();
06bc494ca11e Initial load
duke
parents:
diff changeset
   399
        centerEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   400
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   401
06bc494ca11e Initial load
duke
parents:
diff changeset
   402
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   403
     * Print the footer for the class use Listing.
06bc494ca11e Initial load
duke
parents:
diff changeset
   404
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   405
    protected void printClassUseFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   406
        hr();
06bc494ca11e Initial load
duke
parents:
diff changeset
   407
        navLinks(false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   408
        printBottom();
06bc494ca11e Initial load
duke
parents:
diff changeset
   409
        printBodyHtmlEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   410
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   411
06bc494ca11e Initial load
duke
parents:
diff changeset
   412
06bc494ca11e Initial load
duke
parents:
diff changeset
   413
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   414
     * Print this package link
06bc494ca11e Initial load
duke
parents:
diff changeset
   415
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   416
    protected void navLinkPackage() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   417
        navCellStart();
06bc494ca11e Initial load
duke
parents:
diff changeset
   418
        printHyperLink("../package-summary.html", "",
06bc494ca11e Initial load
duke
parents:
diff changeset
   419
                       configuration.getText("doclet.Package"), true, "NavBarFont1");
06bc494ca11e Initial load
duke
parents:
diff changeset
   420
        navCellEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   421
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   422
06bc494ca11e Initial load
duke
parents:
diff changeset
   423
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   424
     * Print class page indicator
06bc494ca11e Initial load
duke
parents:
diff changeset
   425
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   426
    protected void navLinkClass() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   427
        navCellStart();
06bc494ca11e Initial load
duke
parents:
diff changeset
   428
        printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, "",
06bc494ca11e Initial load
duke
parents:
diff changeset
   429
            configuration.getText("doclet.Class"), true, "NavBarFont1"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   430
        navCellEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   431
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   432
06bc494ca11e Initial load
duke
parents:
diff changeset
   433
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   434
     * Print class use link
06bc494ca11e Initial load
duke
parents:
diff changeset
   435
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   436
    protected void navLinkClassUse() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   437
        navCellRevStart();
06bc494ca11e Initial load
duke
parents:
diff changeset
   438
        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
   439
        strongText("doclet.navClassUse");
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   440
        fontEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   441
        navCellEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   442
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   443
06bc494ca11e Initial load
duke
parents:
diff changeset
   444
    protected void navLinkTree() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   445
        navCellStart();
06bc494ca11e Initial load
duke
parents:
diff changeset
   446
        if (classdoc.containingPackage().isIncluded()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   447
            printHyperLink("../package-tree.html", "",
06bc494ca11e Initial load
duke
parents:
diff changeset
   448
                configuration.getText("doclet.Tree"), true, "NavBarFont1");
06bc494ca11e Initial load
duke
parents:
diff changeset
   449
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   450
            printHyperLink(relativePath + "overview-tree.html", "",
06bc494ca11e Initial load
duke
parents:
diff changeset
   451
                configuration.getText("doclet.Tree"), true, "NavBarFont1");
06bc494ca11e Initial load
duke
parents:
diff changeset
   452
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   453
        navCellEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   454
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   455
06bc494ca11e Initial load
duke
parents:
diff changeset
   456
}