FileDocCategorySizeDatePackage
AllClassesFrameWriter.javaAPI DocExample4207Wed Apr 19 11:17:12 BST 2000com.sun.tools.doclets.standard

AllClassesFrameWriter

public class AllClassesFrameWriter extends HtmlStandardWriter
Generate the file with list of all the classes in this run. This page will be used in the left-hand bottom frame, when "All Classes" link is clicked in the left-hand top frame. The name of the generated file is "allclasses-frame.html".
author
Atul M Dambalkar
author
Doug Kramer

Fields Summary
protected IndexBuilder
indexbuilder
Index of all the classes.
Constructors Summary
public AllClassesFrameWriter(String filename, IndexBuilder indexbuilder)
Construct AllClassesFrameWriter object. Also initilises the indexbuilder variable in this class.

        super(filename);
        this.indexbuilder = indexbuilder;
    
Methods Summary
public static voidgenerate(IndexBuilder indexbuilder)
Create AllClassesFrameWriter object. Then use it to generate the "allclasses-frame.html" file. Generate the file in the current or the destination directory.

param
indexbuilder IndexBuilder object for all classes index.

        AllClassesFrameWriter allclassgen;
        String filename = "allclasses-frame.html";
        try {
            allclassgen = new AllClassesFrameWriter(filename, indexbuilder);
            allclassgen.generateAllClassesFile();
            allclassgen.close();
        } catch (IOException exc) {
            Standard.configuration().standardmessage.
                     error("doclet.exception_encountered",
                           exc.toString(), filename);
            throw new DocletAbortException();
        }
    
protected voidgenerateAllClassesFile()
Print all the classes in table format in the file.

        String label = getText("doclet.All_Classes");

        printHeader(label);

        printAllClassesTableHeader();
        printAllClasses();
        printAllClassesTableFooter();

        printBodyHtmlEnd();
    
protected voidgenerateContents(java.util.List classlist)
Given a list of classes, generate links for each class or interface. If the class lind is interface, print it in the italics font. Also all links should target the right-hand frame. If clicked on any class name in this page, appropriate class page should get opened in the right-hand frame.

param
classlist Sorted list of classes.

        for (int i = 0; i < classlist.size(); i++) {
            ClassDoc cd = (ClassDoc)(classlist.get(i));
            if (!Util.isCoreClass(cd)) {
                continue;
            }
            String label = italicsClassName(cd, false);
            printTargetHyperLink(pathToClass(cd), "classFrame", label);
            br();
        }
    
protected voidprintAllClasses()
Use the sorted index of all the classes and print all the classes.

        for (int i = 0; i < indexbuilder.elements().length; i++) {
            Character unicode = (Character)((indexbuilder.elements())[i]);
            generateContents(indexbuilder.getMemberList(unicode));
        }
    
protected voidprintAllClassesTableFooter()
Print Html closing table tag.

        fontEnd();
        tdEnd();
        trEnd();
        tableEnd();
    
protected voidprintAllClassesTableHeader()
Print the heading "All Classes" and also print Html table tag.

        fontSizeStyle("+1", "FrameHeadingFont");
        boldText("doclet.All_Classes"); 
        fontEnd();
        br();
        table();
        tr();
        tdNowrap();
        fontStyle("FrameItemFont");