FileDocCategorySizeDatePackage
SingleIndexWriter.javaAPI DocExample3090Wed Apr 19 11:17:14 BST 2000com.sun.tools.doclets.standard

SingleIndexWriter

public class SingleIndexWriter extends AbstractIndexWriter
Generate only one index file for all the Member Names with Indexing in Unicode Order. The name of the generated file is "index-all.html" and it is generated in current or the destination directory.
see
java.lang.Character
author
Atul M Dambalkar

Fields Summary
Constructors Summary
public SingleIndexWriter(String filename, IndexBuilder indexbuilder)
Construct the SingleIndexWriter with filename "index-all.html" and the {@link IndexBuilder}

param
filename Name of the index file to be generated.
param
indexbuilder Unicode based Index from {@link IndexBuilder}

        super(filename, indexbuilder);
    
Methods Summary
public static voidgenerate(IndexBuilder indexbuilder)
Generate single index file, for all Unicode characters.

param
indexbuilder IndexBuilder built by {@link IndexBuilder}

        SingleIndexWriter indexgen;
        String filename = "index-all.html";
        try {
            indexgen = new SingleIndexWriter(filename, indexbuilder);
            indexgen.generateIndexFile();
            indexgen.close();
        } catch (IOException exc) {
 Standard.configuration().standardmessage.error("doclet.exception_encountered",
                                                 exc.toString(), filename);
            throw new DocletAbortException();
        }
    
protected voidgenerateIndexFile()
Generate the contents of each index file, with Header, Footer, Member Field, Method and Constructor Description.

        printHeader(getText("doclet.Window_Single_Index",
                            Standard.configuration().windowtitle));

        
        navLinks(true);
        printLinksForIndexes();
        
        hr();
    
        for (int i = 0; i < indexbuilder.elements().length; i++) {
            Character unicode = (Character)((indexbuilder.elements())[i]);
            generateContents(unicode, indexbuilder.getMemberList(unicode));
        }

        printLinksForIndexes();
        navLinks(false);
        
        printBottom(); 
        printBodyHtmlEnd();
    
protected voidprintLinksForIndexes()
Print Links for all the Index Files per unicode character.

        for (int i = 0; i < indexbuilder.elements().length; i++) {
            String unicode = (indexbuilder.elements())[i].toString();
            printHyperLink("#_" + unicode + "_", unicode);
            print(' ");
        }