langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractPackageIndexWriter.java
changeset 40587 1c355ea550ed
parent 40303 96a1226aca18
child 44879 49beafe2faf3
equal deleted inserted replaced
40519:e17429a7e843 40587:1c355ea550ed
    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 java.io.*;
       
    29 import java.util.*;
    28 import java.util.*;
    30 
    29 
    31 import javax.lang.model.element.PackageElement;
    30 import javax.lang.model.element.PackageElement;
    32 
    31 
    33 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
    32 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
    34 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
    33 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
    35 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
    34 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
    36 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
    35 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
    37 import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
    36 import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
    38 import jdk.javadoc.internal.doclets.toolkit.Content;
    37 import jdk.javadoc.internal.doclets.toolkit.Content;
       
    38 import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
    39 import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
    39 import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
    40 
    40 
    41 /**
    41 /**
    42  * Abstract class to generate the overview files in
    42  * Abstract class to generate the overview files in
    43  * Frame and Non-Frame format. This will be sub-classed by to
    43  * Frame and Non-Frame format. This will be sub-classed by to
   107      * methods from the sub-class in order to generate Frame or Non
   107      * methods from the sub-class in order to generate Frame or Non
   108      * Frame format.
   108      * Frame format.
   109      *
   109      *
   110      * @param title the title of the window.
   110      * @param title the title of the window.
   111      * @param includeScript boolean set true if windowtitle script is to be included
   111      * @param includeScript boolean set true if windowtitle script is to be included
   112      */
   112      * @throws DocFileIOException if there is a problem building the package index file
   113     protected void buildPackageIndexFile(String title, boolean includeScript) throws IOException {
   113      */
       
   114     protected void buildPackageIndexFile(String title, boolean includeScript) throws DocFileIOException {
   114         String windowOverview = configuration.getText(title);
   115         String windowOverview = configuration.getText(title);
   115         Content body = getBody(includeScript, getWindowTitle(windowOverview));
   116         Content body = getBody(includeScript, getWindowTitle(windowOverview));
   116         addNavigationBarHeader(body);
   117         addNavigationBarHeader(body);
   117         addOverviewHeader(body);
   118         addOverviewHeader(body);
   118         addIndex(body);
   119         addIndex(body);
   125     /**
   126     /**
   126      * Default to no overview, override to add overview.
   127      * Default to no overview, override to add overview.
   127      *
   128      *
   128      * @param body the document tree to which the overview will be added
   129      * @param body the document tree to which the overview will be added
   129      */
   130      */
   130     protected void addOverview(Content body) throws IOException {
   131     protected void addOverview(Content body) { }
   131     }
       
   132 
   132 
   133     /**
   133     /**
   134      * Adds the frame or non-frame package index to the documentation tree.
   134      * Adds the frame or non-frame package index to the documentation tree.
   135      *
   135      *
   136      * @param body the document tree to which the index will be added
   136      * @param body the document tree to which the index will be added
   188      * Returns highlighted "Overview", in the navigation bar as this is the
   188      * Returns highlighted "Overview", in the navigation bar as this is the
   189      * overview page.
   189      * overview page.
   190      *
   190      *
   191      * @return a Content object to be added to the documentation tree
   191      * @return a Content object to be added to the documentation tree
   192      */
   192      */
       
   193     @Override
   193     protected Content getNavLinkContents() {
   194     protected Content getNavLinkContents() {
   194         Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, contents.overviewLabel);
   195         Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, contents.overviewLabel);
   195         return li;
   196         return li;
   196     }
   197     }
   197 
   198