src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractOverviewIndexWriter.java
changeset 59294 48b88b9c11eb
parent 54544 97a4b8f46a49
equal deleted inserted replaced
59293:5af9fa90cd7b 59294:48b88b9c11eb
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package jdk.javadoc.internal.doclets.formats.html;
    26 package jdk.javadoc.internal.doclets.formats.html;
    27 
    27 
       
    28 import jdk.javadoc.internal.doclets.formats.html.markup.BodyContents;
       
    29 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
    28 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
    30 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
    29 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
    31 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
    30 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
    32 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
    31 import jdk.javadoc.internal.doclets.formats.html.markup.Navigation;
    33 import jdk.javadoc.internal.doclets.formats.html.markup.Navigation;
    32 import jdk.javadoc.internal.doclets.formats.html.markup.Navigation.PageMode;
    34 import jdk.javadoc.internal.doclets.formats.html.markup.Navigation.PageMode;
    55      * @param filename Name of the module index file to be generated.
    57      * @param filename Name of the module index file to be generated.
    56      */
    58      */
    57     public AbstractOverviewIndexWriter(HtmlConfiguration configuration,
    59     public AbstractOverviewIndexWriter(HtmlConfiguration configuration,
    58                                       DocPath filename) {
    60                                       DocPath filename) {
    59         super(configuration, filename);
    61         super(configuration, filename);
    60         this.navBar = new Navigation(null, configuration, fixedNavDiv, PageMode.OVERVIEW, path);
    62         this.navBar = new Navigation(null, configuration, PageMode.OVERVIEW, path);
    61     }
    63     }
    62 
    64 
    63     /**
    65     /**
    64      * Adds the top text (from the -top option), the upper
    66      * Adds the top text (from the -top option), the upper
    65      * navigation bar, and then the title (from the"-title"
    67      * navigation bar, and then the title (from the"-header"
    66      * option), at the top of page.
    68      * option), at the top of page.
    67      *
    69      *
    68      * @param header the documentation tree to which the navigation bar header will be added
    70      * @param header the documentation tree to which the navigation bar header will be added
    69      */
    71      */
    70     protected void addNavigationBarHeader(Content header) {
    72     protected void addNavigationBarHeader(Content header) {
   124      */
   126      */
   125     protected void buildOverviewIndexFile(String title, String description)
   127     protected void buildOverviewIndexFile(String title, String description)
   126             throws DocFileIOException {
   128             throws DocFileIOException {
   127         String windowOverview = resources.getText(title);
   129         String windowOverview = resources.getText(title);
   128         Content body = getBody(getWindowTitle(windowOverview));
   130         Content body = getBody(getWindowTitle(windowOverview));
   129         Content header = HtmlTree.HEADER();
   131         Content header = new ContentBuilder();
   130         addNavigationBarHeader(header);
   132         addNavigationBarHeader(header);
   131         Content main = HtmlTree.MAIN();
   133         Content main = new ContentBuilder();
   132         addOverviewHeader(main);
   134         addOverviewHeader(main);
   133         addIndex(main);
   135         addIndex(main);
   134         Content footer = HtmlTree.FOOTER();
   136         Content footer = HtmlTree.FOOTER();
   135         addNavigationBarFooter(footer);
   137         addNavigationBarFooter(footer);
   136         body.add(header);
   138         body.add(new BodyContents()
   137         body.add(main);
   139                 .setHeader(header)
   138         body.add(footer);
   140                 .addMainContent(main)
       
   141                 .setFooter(footer)
       
   142                 .toContent());
   139         printHtmlDocument(
   143         printHtmlDocument(
   140                 configuration.metakeywords.getOverviewMetaKeywords(title, configuration.doctitle),
   144                 configuration.metakeywords.getOverviewMetaKeywords(title, configuration.doctitle),
   141                 description, body);
   145                 description, body);
   142     }
   146     }
   143 
   147