37 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag; |
37 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag; |
38 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; |
38 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; |
39 import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml; |
39 import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml; |
40 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; |
40 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; |
41 import jdk.javadoc.internal.doclets.toolkit.Content; |
41 import jdk.javadoc.internal.doclets.toolkit.Content; |
|
42 import jdk.javadoc.internal.doclets.toolkit.Messages; |
42 import jdk.javadoc.internal.doclets.toolkit.util.DocPath; |
43 import jdk.javadoc.internal.doclets.toolkit.util.DocPath; |
43 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; |
44 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; |
44 import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException; |
45 import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException; |
45 |
46 |
46 /** |
47 /** |
77 ModuleIndexFrameWriter modulegen; |
78 ModuleIndexFrameWriter modulegen; |
78 DocPath filename = DocPaths.MODULE_OVERVIEW_FRAME; |
79 DocPath filename = DocPaths.MODULE_OVERVIEW_FRAME; |
79 try { |
80 try { |
80 modulegen = new ModuleIndexFrameWriter(configuration, filename); |
81 modulegen = new ModuleIndexFrameWriter(configuration, filename); |
81 modulegen.buildModuleIndexFile("doclet.Window_Overview", false); |
82 modulegen.buildModuleIndexFile("doclet.Window_Overview", false); |
82 modulegen.close(); |
|
83 } catch (IOException exc) { |
83 } catch (IOException exc) { |
84 configuration.standardmessage.error( |
84 Messages messages = configuration.getMessages(); |
85 "doclet.exception_encountered", |
85 messages.error("doclet.exception_encountered", |
86 exc.toString(), filename); |
86 exc.toString(), filename); |
87 throw new DocletAbortException(exc); |
87 throw new DocletAbortException(exc); |
88 } |
88 } |
89 } |
89 } |
90 |
90 |
92 * {@inheritDoc} |
92 * {@inheritDoc} |
93 */ |
93 */ |
94 protected void addModulesList(Map<ModuleElement, Set<PackageElement>> modules, String text, |
94 protected void addModulesList(Map<ModuleElement, Set<PackageElement>> modules, String text, |
95 String tableSummary, Content body) { |
95 String tableSummary, Content body) { |
96 Content heading = HtmlTree.HEADING(HtmlConstants.MODULE_HEADING, true, |
96 Content heading = HtmlTree.HEADING(HtmlConstants.MODULE_HEADING, true, |
97 modulesLabel); |
97 contents.modulesLabel); |
98 HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN)) |
98 HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN)) |
99 ? HtmlTree.MAIN(HtmlStyle.indexContainer, heading) |
99 ? HtmlTree.MAIN(HtmlStyle.indexContainer, heading) |
100 : HtmlTree.DIV(HtmlStyle.indexContainer, heading); |
100 : HtmlTree.DIV(HtmlStyle.indexContainer, heading); |
101 HtmlTree ul = new HtmlTree(HtmlTag.UL); |
101 HtmlTree ul = new HtmlTree(HtmlTag.UL); |
102 ul.setTitle(modulesLabel); |
102 ul.setTitle(contents.modulesLabel); |
103 for (ModuleElement mdle: modules.keySet()) { |
103 for (ModuleElement mdle: modules.keySet()) { |
104 ul.addContent(getModuleLink(mdle)); |
104 ul.addContent(getModuleLink(mdle)); |
105 } |
105 } |
106 htmlTree.addContent(ul); |
106 htmlTree.addContent(ul); |
107 body.addContent(htmlTree); |
107 body.addContent(htmlTree); |
148 * |
148 * |
149 * @param ul the Content object to which the all classes link should be added |
149 * @param ul the Content object to which the all classes link should be added |
150 */ |
150 */ |
151 protected void addAllClassesLink(Content ul) { |
151 protected void addAllClassesLink(Content ul) { |
152 Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME, |
152 Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME, |
153 allclassesLabel, "", "packageFrame"); |
153 contents.allClassesLabel, "", "packageFrame"); |
154 Content li = HtmlTree.LI(linkContent); |
154 Content li = HtmlTree.LI(linkContent); |
155 ul.addContent(li); |
155 ul.addContent(li); |
156 } |
156 } |
157 |
157 |
158 /** |
158 /** |
161 * |
161 * |
162 * @param ul the Content object to which the all packages link should be added |
162 * @param ul the Content object to which the all packages link should be added |
163 */ |
163 */ |
164 protected void addAllPackagesLink(Content ul) { |
164 protected void addAllPackagesLink(Content ul) { |
165 Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME, |
165 Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME, |
166 allpackagesLabel, "", "packageListFrame"); |
166 contents.allPackagesLabel, "", "packageListFrame"); |
167 Content li = HtmlTree.LI(linkContent); |
167 Content li = HtmlTree.LI(linkContent); |
168 ul.addContent(li); |
168 ul.addContent(li); |
169 } |
169 } |
170 |
170 |
171 /** |
171 /** |
172 * {@inheritDoc} |
172 * {@inheritDoc} |
173 */ |
173 */ |
174 protected void addNavigationBarFooter(Content body) { |
174 protected void addNavigationBarFooter(Content body) { |
175 Content p = HtmlTree.P(getSpace()); |
175 Content p = HtmlTree.P(Contents.SPACE); |
176 body.addContent(p); |
176 body.addContent(p); |
177 } |
177 } |
178 |
178 |
179 protected void addModulePackagesList(Map<ModuleElement, Set<PackageElement>> modules, String text, |
179 protected void addModulePackagesList(Map<ModuleElement, Set<PackageElement>> modules, String text, |
180 String tableSummary, Content body, ModuleElement mdle) { |
180 String tableSummary, Content body, ModuleElement mdle) { |