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

FrameOutputWriter

public class FrameOutputWriter extends HtmlStandardWriter
Generate the documentation in the Html "frame" format in the browser. The generated documentation will have two or three frames depending upon the number of packages on the command line. In general there will be three frames in the output, a left-hand top frame will have a list of all packages with links to target left-hand bottom frame. The left-hand bottom frame will have the particular package contents or the all-classes list, where as the single right-hand frame will have overview or package summary or class file. Also take care of browsers which do not support Html frames.
author
Atul M Dambalkar

Fields Summary
int
noOfPackages
Number of packages specified on the command line.
Constructors Summary
public FrameOutputWriter(String filename)
Constructor to construct FrameOutputWriter object.

param
filename File to be generated.

        super(filename);
	noOfPackages = Standard.configuration().packages.length;
    
Methods Summary
public static voidgenerate()
Construct FrameOutputWriter object and then use it to generate the Html file which will have the description of all the frames in the documentation. The name of the generated file is "index.html" which is the default first file for Html documents.

        FrameOutputWriter framegen;
        String filename = "";
        try {
            filename = "index.html";
            framegen = new FrameOutputWriter(filename);
            framegen.generateFrameFile();
            framegen.close();
        } catch (IOException exc) {
            Standard.configuration().standardmessage.error(
                "doclet.exception_encountered",
                exc.toString(), filename);
            throw new DocletAbortException();
        }
    
protected voidgenerateFrameFile()
Generate the contants in the "index.html" file. Print the frame details as well as warning if browser is not supporting the Html frames.

        if (Standard.configuration().windowtitle.length() > 0) { 
            printPartialHeader(Standard.configuration().windowtitle);     
        } else {
            printPartialHeader(getText("doclet.Generated_Docs_Untitled")); 
        }
        printFrameDetails();
        printFrameWarning();
        printFrameFooter();
    
protected voidprintFrameDetails()
Print the frame sizes and their contents.

        frameSet("cols=\"20%,80%\"");
        if (noOfPackages <= 1) {
            frame("src=\"" + "allclasses-frame.html" 
                  + "\" name=\"packageFrame\"");
            frame("src=\"" + Standard.configuration().topFile + 
                  "\" name=\"classFrame\"");
        } else if (noOfPackages > 1) {
            frameSet("rows=\"30%,70%\"");
            frame("src=\"overview-frame.html\" name=\"packageListFrame\"");
            frame("src=\"" + "allclasses-frame.html" 
                  + "\" name=\"packageFrame\"");
            frameSetEnd();
            frame("src=\"" + Standard.configuration().topFile + 
                  "\" name=\"classFrame\"");
        }
        frameSetEnd();
    
protected voidprintFrameWarning()
Generate the code for issueing the warning for a non-frame capable web client. Also provide links to the non-frame version documentation.

        noFrames();
        h2();
        printText("doclet.Frame_Alert");
        h2End();
        p();
        printText("doclet.Frame_Warning_Message");
        br();
        printText("doclet.Link_To");
        printHyperLink(Standard.configuration().topFile, 
                       getText("doclet.Non_Frame_Version"));
        noFramesEnd();