langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java
changeset 44195 5860769fe2f4
parent 43755 ae42964e27e3
child 45157 f5f796453339
equal deleted inserted replaced
44194:c868c8c24e18 44195:5860769fe2f4
   132         addPackagesList(packages, tbody);
   132         addPackagesList(packages, tbody);
   133         table.addContent(tbody);
   133         table.addContent(tbody);
   134         Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table);
   134         Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table);
   135         if (configuration.allowTag(HtmlTag.MAIN)) {
   135         if (configuration.allowTag(HtmlTag.MAIN)) {
   136             htmlTree.addContent(div);
   136             htmlTree.addContent(div);
   137             body.addContent(htmlTree);
       
   138         } else {
   137         } else {
   139             body.addContent(div);
   138             body.addContent(div);
   140         }
   139         }
   141     }
   140     }
   142 
   141 
   180             HtmlTree div = new HtmlTree(HtmlTag.DIV);
   179             HtmlTree div = new HtmlTree(HtmlTag.DIV);
   181             div.addStyle(HtmlStyle.contentContainer);
   180             div.addStyle(HtmlStyle.contentContainer);
   182             addOverviewComment(div);
   181             addOverviewComment(div);
   183             if (configuration.allowTag(HtmlTag.MAIN)) {
   182             if (configuration.allowTag(HtmlTag.MAIN)) {
   184                 htmlTree.addContent(div);
   183                 htmlTree.addContent(div);
   185                 body.addContent(htmlTree);
       
   186             } else {
   184             } else {
   187                 body.addContent(div);
   185                 body.addContent(div);
   188             }
   186             }
   189         }
   187         }
   190     }
   188     }
   201             addInlineComment(configuration.overviewElement, htmltree);
   199             addInlineComment(configuration.overviewElement, htmltree);
   202         }
   200         }
   203     }
   201     }
   204 
   202 
   205     /**
   203     /**
   206      * Not required for this page.
   204      * For HTML 5, add the htmlTree to the body. For HTML 4, do nothing.
   207      *
   205      *
   208      * @param body the documentation tree to which the overview will be added
   206      * @param body the documentation tree to which the overview will be added
   209      */
   207      */
   210     @Override
   208     @Override
   211     protected void addOverview(Content body) {}
   209     protected void addOverview(Content body) {
       
   210         if (configuration.allowTag(HtmlTag.MAIN)) {
       
   211             body.addContent(htmlTree);
       
   212         }
       
   213     }
   212 
   214 
   213     /**
   215     /**
   214      * Adds the top text (from the -top option), the upper
   216      * Adds the top text (from the -top option), the upper
   215      * navigation bar, and then the title (from the"-title"
   217      * navigation bar, and then the title (from the"-title"
   216      * option), at the top of page.
   218      * option), at the top of page.