1 /* |
1 /* |
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
87 * Generate the contents of each index file, with Header, Footer, |
87 * Generate the contents of each index file, with Header, Footer, |
88 * Member Field, Method and Constructor Description. |
88 * Member Field, Method and Constructor Description. |
89 */ |
89 */ |
90 protected void generateIndexFile() throws IOException { |
90 protected void generateIndexFile() throws IOException { |
91 String title = configuration.getText("doclet.Window_Single_Index"); |
91 String title = configuration.getText("doclet.Window_Single_Index"); |
92 Content body = getBody(true, getWindowTitle(title)); |
92 HtmlTree body = getBody(true, getWindowTitle(title)); |
93 addTop(body); |
93 HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER)) |
94 addNavLinks(true, body); |
94 ? HtmlTree.HEADER() |
|
95 : body; |
|
96 addTop(htmlTree); |
|
97 addNavLinks(true, htmlTree); |
|
98 if (configuration.allowTag(HtmlTag.HEADER)) { |
|
99 body.addContent(htmlTree); |
|
100 } |
95 HtmlTree divTree = new HtmlTree(HtmlTag.DIV); |
101 HtmlTree divTree = new HtmlTree(HtmlTag.DIV); |
96 divTree.addStyle(HtmlStyle.contentContainer); |
102 divTree.addStyle(HtmlStyle.contentContainer); |
97 addLinksForIndexes(divTree); |
103 addLinksForIndexes(divTree); |
98 for (int i = 0; i < indexbuilder.elements().length; i++) { |
104 for (int i = 0; i < indexbuilder.elements().length; i++) { |
99 Character unicode = (Character)((indexbuilder.elements())[i]); |
105 Character unicode = (Character)((indexbuilder.elements())[i]); |
100 addContents(unicode, indexbuilder.getMemberList(unicode), divTree); |
106 addContents(unicode, indexbuilder.getMemberList(unicode), divTree); |
101 } |
107 } |
102 addLinksForIndexes(divTree); |
108 addLinksForIndexes(divTree); |
103 body.addContent(divTree); |
109 body.addContent((configuration.allowTag(HtmlTag.MAIN)) |
104 addNavLinks(false, body); |
110 ? HtmlTree.MAIN(divTree) |
105 addBottom(body); |
111 : divTree); |
|
112 if (configuration.allowTag(HtmlTag.FOOTER)) { |
|
113 htmlTree = HtmlTree.FOOTER(); |
|
114 } |
|
115 addNavLinks(false, htmlTree); |
|
116 addBottom(htmlTree); |
|
117 if (configuration.allowTag(HtmlTag.FOOTER)) { |
|
118 body.addContent(htmlTree); |
|
119 } |
106 printHtmlDocument(null, true, body); |
120 printHtmlDocument(null, true, body); |
107 } |
121 } |
108 |
122 |
109 /** |
123 /** |
110 * Add links for all the Index Files per unicode character. |
124 * Add links for all the Index Files per unicode character. |