src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java
changeset 54350 4f9772f4403d
parent 54060 53a95878619f
child 54544 97a4b8f46a49
equal deleted inserted replaced
54349:492af1f4b6d5 54350:4f9772f4403d
    42 import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
    42 import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
    43 import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
    43 import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
    44 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
    44 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
    45 
    45 
    46 /**
    46 /**
    47  * Generate the module index page "overview-summary.html" for the right-hand
    47  * Generate the module index page "index.html".
    48  * frame.
       
    49  *
    48  *
    50  *  <p><b>This is NOT part of any supported API.
    49  *  <p><b>This is NOT part of any supported API.
    51  *  If you write code that depends on this, you do so at your own risk.
    50  *  If you write code that depends on this, you do so at your own risk.
    52  *  This code and its internal interfaces are subject to change or
    51  *  This code and its internal interfaces are subject to change or
    53  *  deletion without notice.</b>
    52  *  deletion without notice.</b>
    64     public ModuleIndexWriter(HtmlConfiguration configuration, DocPath filename) {
    63     public ModuleIndexWriter(HtmlConfiguration configuration, DocPath filename) {
    65         super(configuration, filename);
    64         super(configuration, filename);
    66     }
    65     }
    67 
    66 
    68     /**
    67     /**
    69      * Generate the module index page for the right-hand frame.
    68      * Generate the module index page.
    70      *
    69      *
    71      * @param configuration the current configuration of the doclet.
    70      * @param configuration the current configuration of the doclet.
    72      * @throws DocFileIOException if there is a problem generating the module index page
    71      * @throws DocFileIOException if there is a problem generating the module index page
    73      */
    72      */
    74     public static void generate(HtmlConfiguration configuration) throws DocFileIOException {
    73     public static void generate(HtmlConfiguration configuration) throws DocFileIOException {
    75         DocPath filename = DocPaths.overviewSummary(configuration.frames);
    74         DocPath filename = DocPaths.INDEX;
    76         ModuleIndexWriter mdlgen = new ModuleIndexWriter(configuration, filename);
    75         ModuleIndexWriter mdlgen = new ModuleIndexWriter(configuration, filename);
    77         mdlgen.buildModuleIndexFile("doclet.Window_Overview_Summary", "module index", true);
    76         mdlgen.buildModuleIndexFile("doclet.Window_Overview_Summary", "module index");
    78     }
    77     }
    79 
    78 
    80     /**
    79     /**
    81      * Add the module index.
    80      * Add the module index.
    82      *
    81      *
    93      *
    92      *
    94      * @param header the document tree to which the navigational links will be added
    93      * @param header the document tree to which the navigational links will be added
    95      * @param main the document tree to which the modules list will be added
    94      * @param main the document tree to which the modules list will be added
    96      */
    95      */
    97     protected void addIndexContents(Content header, Content main) {
    96     protected void addIndexContents(Content header, Content main) {
    98         HtmlTree htmltree = HtmlTree.NAV();
       
    99         htmltree.setStyle(HtmlStyle.indexNav);
       
   100         HtmlTree ul = new HtmlTree(HtmlTag.UL);
       
   101         addAllClassesLink(ul);
       
   102         if (configuration.showModules) {
       
   103             addAllModulesLink(ul);
       
   104         }
       
   105         htmltree.add(ul);
       
   106         header.add(htmltree);
       
   107         addModulesList(main);
    97         addModulesList(main);
   108     }
    98     }
   109 
    99 
   110     /**
   100     /**
   111      * Add the list of modules.
   101      * Add the list of modules.