src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
changeset 59294 48b88b9c11eb
parent 55266 fb250e9cfe67
equal deleted inserted replaced
59293:5af9fa90cd7b 59294:48b88b9c11eb
   186     /**
   186     /**
   187      * To check whether the container annotations is documented or not.
   187      * To check whether the container annotations is documented or not.
   188      */
   188      */
   189     private boolean isContainerDocumented = false;
   189     private boolean isContainerDocumented = false;
   190 
   190 
   191     HtmlTree fixedNavDiv = new HtmlTree(HtmlTag.DIV);
       
   192 
       
   193     /**
   191     /**
   194      * The window title of this file.
   192      * The window title of this file.
   195      */
   193      */
   196     protected String winTitle;
   194     protected String winTitle;
   197 
   195 
   507      *
   505      *
   508      * @param htmlTree the content tree to which user specified top will be added
   506      * @param htmlTree the content tree to which user specified top will be added
   509      */
   507      */
   510     public void addTop(Content htmlTree) {
   508     public void addTop(Content htmlTree) {
   511         Content top = new RawHtml(replaceDocRootDir(configuration.top));
   509         Content top = new RawHtml(replaceDocRootDir(configuration.top));
   512         fixedNavDiv.add(top);
   510         htmlTree.add(top);
   513     }
   511     }
   514 
   512 
   515     /**
   513     /**
   516      * Adds the user specified bottom.
   514      * Adds the user specified bottom.
   517      *
   515      *
  2110     static String getGenerator(Class<?> clazz) {
  2108     static String getGenerator(Class<?> clazz) {
  2111         return "javadoc/" + clazz.getSimpleName();
  2109         return "javadoc/" + clazz.getSimpleName();
  2112     }
  2110     }
  2113 
  2111 
  2114     /**
  2112     /**
  2115      * Returns an HtmlTree for the SCRIPT tag.
       
  2116      *
       
  2117      * @return an HtmlTree for the SCRIPT tag
       
  2118      */
       
  2119     protected Script getWinTitleScript() {
       
  2120         Script script = new Script();
       
  2121         if (winTitle != null && winTitle.length() > 0) {
       
  2122             script.append("<!--\n" +
       
  2123                     "    try {\n" +
       
  2124                     "        if (location.href.indexOf('is-external=true') == -1) {\n" +
       
  2125                     "            parent.document.title=")
       
  2126                     .appendStringLiteral(winTitle)
       
  2127                     .append(";\n" +
       
  2128                     "        }\n" +
       
  2129                     "    }\n" +
       
  2130                     "    catch(err) {\n" +
       
  2131                     "    }\n" +
       
  2132                     "//-->\n");
       
  2133         }
       
  2134         return script;
       
  2135     }
       
  2136 
       
  2137     /**
       
  2138      * Returns an HtmlTree for the BODY tag.
  2113      * Returns an HtmlTree for the BODY tag.
  2139      *
  2114      *
  2140      * @param title title for the window
  2115      * @param title title for the window
  2141      * @return an HtmlTree for the BODY tag
  2116      * @return an HtmlTree for the BODY tag
  2142      */
  2117      */