1 /* |
1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2013, 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 |
120 } |
121 } |
121 |
122 |
122 /** |
123 /** |
123 * {@inheritDoc} |
124 * {@inheritDoc} |
124 */ |
125 */ |
|
126 protected void addProfilesList(String profileSummary, String profilesTableSummary, |
|
127 Content body) { |
|
128 Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, profilesTableSummary, |
|
129 getTableCaption(profileSummary)); |
|
130 table.addContent(getSummaryTableHeader(profileTableHeader, "col")); |
|
131 Content tbody = new HtmlTree(HtmlTag.TBODY); |
|
132 addProfilesList(tbody); |
|
133 table.addContent(tbody); |
|
134 Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table); |
|
135 body.addContent(div); |
|
136 } |
|
137 |
|
138 /** |
|
139 * {@inheritDoc} |
|
140 */ |
125 protected void addPackagesList(PackageDoc[] packages, String text, |
141 protected void addPackagesList(PackageDoc[] packages, String text, |
126 String tableSummary, Content body) { |
142 String tableSummary, Content body) { |
127 Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, tableSummary, |
143 Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, tableSummary, |
128 getTableCaption(text)); |
144 getTableCaption(text)); |
129 table.addContent(getSummaryTableHeader(packageTableHeader, "col")); |
145 table.addContent(getSummaryTableHeader(packageTableHeader, "col")); |
130 Content tbody = new HtmlTree(HtmlTag.TBODY); |
146 Content tbody = new HtmlTree(HtmlTag.TBODY); |
131 addPackagesList(packages, tbody); |
147 addPackagesList(packages, tbody); |
132 table.addContent(tbody); |
148 table.addContent(tbody); |
133 Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table); |
149 Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table); |
134 body.addContent(div); |
150 body.addContent(div); |
|
151 } |
|
152 |
|
153 /** |
|
154 * Adds list of profiles in the index table. Generate link to each profile. |
|
155 * |
|
156 * @param tbody the documentation tree to which the list will be added |
|
157 */ |
|
158 protected void addProfilesList(Content tbody) { |
|
159 for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { |
|
160 String profileName = Profile.lookup(i).name; |
|
161 Content profileLinkContent = getTargetProfileLink("classFrame", |
|
162 new StringContent(profileName), profileName); |
|
163 Content tdProfile = HtmlTree.TD(HtmlStyle.colFirst, profileLinkContent); |
|
164 HtmlTree tdSummary = new HtmlTree(HtmlTag.TD); |
|
165 tdSummary.addStyle(HtmlStyle.colLast); |
|
166 tdSummary.addContent(getSpace()); |
|
167 HtmlTree tr = HtmlTree.TR(tdProfile); |
|
168 tr.addContent(tdSummary); |
|
169 if (i % 2 == 0) { |
|
170 tr.addStyle(HtmlStyle.altColor); |
|
171 } else { |
|
172 tr.addStyle(HtmlStyle.rowColor); |
|
173 } |
|
174 tbody.addContent(tr); |
|
175 } |
135 } |
176 } |
136 |
177 |
137 /** |
178 /** |
138 * Adds list of packages in the index table. Generate link to each package. |
179 * Adds list of packages in the index table. Generate link to each package. |
139 * |
180 * |