202 |
if (!optionNoTree.getValue()) { |
if (!optionNoTree.getValue()) { |
203 |
output.print(" "); |
output.print(" "); |
204 |
|
|
205 |
if ("tree".equals(currentPage) || "package-tree".equals(currentPage)) { |
if ("full-tree".equals(currentPage) || "package-tree".equals(currentPage)) { |
206 |
output.beginSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
output.beginSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
207 |
output.print("Tree"); |
output.print("Tree"); |
208 |
output.endSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
output.endSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
226 |
indexName = "alphaindex"; |
indexName = "alphaindex"; |
227 |
} |
} |
228 |
|
|
229 |
output.beginAnchor(output.getPathToRoot() + "/" + indexName + filenameExtension); |
if ("index".equals(currentPage)) { |
230 |
output.print("Index"); |
output.beginSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
231 |
output.endAnchor(); |
output.print("Index"); |
232 |
|
output.endSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
233 |
|
} |
234 |
|
else { |
235 |
|
output.beginSpan(CssClass.NAVBAR_ITEM_ENABLED); |
236 |
|
output.beginAnchor(output.getPathToRoot() + "/" + indexName + filenameExtension); |
237 |
|
output.print("Index"); |
238 |
|
output.endAnchor(); |
239 |
|
output.endSpan(CssClass.NAVBAR_ITEM_ENABLED); |
240 |
|
} |
241 |
|
|
242 |
if (!optionNoDeprecatedList.getValue()) { |
if (!optionNoDeprecatedList.getValue()) { |
243 |
output.print(" "); |
output.print(" "); |
244 |
|
|
245 |
output.beginAnchor(output.getPathToRoot() + "/deprecated" + filenameExtension); |
if ("deprecated".equals(currentPage)) { |
246 |
output.print("Deprecated"); |
output.beginSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
247 |
output.endAnchor(); |
output.print("Deprecated"); |
248 |
|
output.endSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
249 |
|
} |
250 |
|
else { |
251 |
|
output.beginSpan(CssClass.NAVBAR_ITEM_ENABLED); |
252 |
|
output.beginAnchor(output.getPathToRoot() + "/deprecated" + filenameExtension); |
253 |
|
output.print("Deprecated"); |
254 |
|
output.endAnchor(); |
255 |
|
output.endSpan(CssClass.NAVBAR_ITEM_ENABLED); |
256 |
|
} |
257 |
} |
} |
258 |
|
|
259 |
if (!optionNoHelp.getValue()) { |
if (!optionNoHelp.getValue()) { |
260 |
output.print(" "); |
output.print(" "); |
261 |
|
|
262 |
output.beginAnchor(output.getPathToRoot() + "/help" + filenameExtension); |
if ("help".equals(currentPage)) { |
263 |
output.print("Help"); |
output.beginSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
264 |
output.endAnchor(); |
output.print("Help"); |
265 |
|
output.endSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
266 |
|
} |
267 |
|
else { |
268 |
|
output.beginSpan(CssClass.NAVBAR_ITEM_ENABLED); |
269 |
|
output.beginAnchor(output.getPathToRoot() + "/help" + filenameExtension); |
270 |
|
output.print("Help"); |
271 |
|
output.endAnchor(); |
272 |
|
output.endSpan(CssClass.NAVBAR_ITEM_ENABLED); |
273 |
|
} |
274 |
} |
} |
275 |
|
|
276 |
output.print(" "); |
output.print(" "); |
277 |
|
|
278 |
output.beginAnchor(output.getPathToRoot() + "/about" + filenameExtension); |
if ("about".equals(currentPage)) { |
279 |
output.print("About"); |
output.beginSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
280 |
output.endAnchor(); |
output.print("About"); |
281 |
|
output.endSpan(CssClass.NAVBAR_ITEM_ACTIVE); |
282 |
|
} |
283 |
|
else { |
284 |
|
output.beginSpan(CssClass.NAVBAR_ITEM_ENABLED); |
285 |
|
output.beginAnchor(output.getPathToRoot() + "/about" + filenameExtension); |
286 |
|
output.print("About"); |
287 |
|
output.endAnchor(); |
288 |
|
output.endSpan(CssClass.NAVBAR_ITEM_ENABLED); |
289 |
|
} |
290 |
|
|
291 |
output.endDiv(CssClass.NAVBAR_TOP); |
output.endDiv(CssClass.NAVBAR_TOP); |
292 |
} |
} |
301 |
if (!optionNoNavBar.getValue()) { |
if (!optionNoNavBar.getValue()) { |
302 |
output.beginTable(CssClass.NAVBAR_TOP); |
output.beginTable(CssClass.NAVBAR_TOP); |
303 |
output.beginRow(); |
output.beginRow(); |
304 |
output.beginCell(); |
output.beginCell(CssClass.NAVBAR_TOP); |
305 |
printNavBar(output, currentPage, currentClass); |
printNavBar(output, currentPage, currentClass); |
306 |
output.endCell(); |
output.endCell(); |
307 |
if (null != optionHeader.getValue()) { |
if (null != optionHeader.getValue()) { |
414 |
pathToRoot, |
pathToRoot, |
415 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
416 |
output.beginPage(packageDoc.name(), getOutputCharset()); |
output.beginPage(packageDoc.name(), getOutputCharset()); |
417 |
output.beginBody(); |
output.beginBody(CssClass.BODY_CONTENT_PACKAGE); |
418 |
printNavBarTop(output, "package"); |
printNavBarTop(output, "package"); |
419 |
|
|
420 |
output.beginDiv(CssClass.PACKAGE_TITLE); |
output.beginDiv(CssClass.PACKAGE_TITLE); |
617 |
pathToRoot, |
pathToRoot, |
618 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
619 |
output.beginPage(packageDoc.name() + " Hierarchy", getOutputCharset()); |
output.beginPage(packageDoc.name() + " Hierarchy", getOutputCharset()); |
620 |
output.beginBody(); |
output.beginBody(CssClass.BODY_CONTENT_PACKAGE_TREE); |
621 |
printNavBarTop(output, "package-tree"); |
printNavBarTop(output, "package-tree"); |
622 |
|
|
623 |
output.div(CssClass.PACKAGE_TREE_TITLE, "Hierarchy for Package " + packageDoc.name()); |
output.div(CssClass.PACKAGE_TREE_TITLE, "Hierarchy for Package " + packageDoc.name()); |
640 |
".", |
".", |
641 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
642 |
output.beginPage("Hierarchy", getOutputCharset()); |
output.beginPage("Hierarchy", getOutputCharset()); |
643 |
output.beginBody(); |
output.beginBody(CssClass.BODY_CONTENT_FULL_TREE); |
644 |
printNavBarTop(output, "full-tree"); |
printNavBarTop(output, "full-tree"); |
645 |
|
|
646 |
output.div(CssClass.PACKAGE_TREE_TITLE, "Hierarchy for All Packages"); |
output.div(CssClass.PACKAGE_TREE_TITLE, "Hierarchy for All Packages"); |
781 |
".", |
".", |
782 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
783 |
output.beginPage("Package Menu", getOutputCharset()); |
output.beginPage("Package Menu", getOutputCharset()); |
784 |
output.beginBody(false); |
output.beginBody(CssClass.BODY_MENU_PACKAGES, false); |
785 |
|
|
786 |
output.beginSpan(CssClass.PACKAGE_MENU_ENTRY); |
output.beginSpan(CssClass.PACKAGE_MENU_ENTRY); |
787 |
output.beginAnchor("all-classes" + filenameExtension, |
output.beginAnchor("all-classes" + filenameExtension, |
855 |
".", |
".", |
856 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
857 |
output.beginPage("Class Menu", getOutputCharset()); |
output.beginPage("Class Menu", getOutputCharset()); |
858 |
output.beginBody(false); |
output.beginBody(CssClass.BODY_MENU_CLASSES, false); |
859 |
|
|
860 |
output.div(CssClass.CLASS_MENU_TITLE, "All Classes"); |
output.div(CssClass.CLASS_MENU_TITLE, "All Classes"); |
861 |
|
|
875 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
876 |
|
|
877 |
output.beginPage(packageDoc.name() + " Class Menu", getOutputCharset()); |
output.beginPage(packageDoc.name() + " Class Menu", getOutputCharset()); |
878 |
output.beginBody(false); |
output.beginBody(CssClass.BODY_MENU_CLASSES, false); |
879 |
|
|
880 |
output.beginDiv(CssClass.CLASS_MENU_TITLE); |
output.beginDiv(CssClass.CLASS_MENU_TITLE); |
881 |
output.beginAnchor("package-summary" + filenameExtension, "", "content"); |
output.beginAnchor("package-summary" + filenameExtension, "", "content"); |
926 |
".", |
".", |
927 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
928 |
output.beginPage("Alphabetical Index", getOutputCharset()); |
output.beginPage("Alphabetical Index", getOutputCharset()); |
929 |
output.beginBody(); |
output.beginBody(CssClass.BODY_CONTENT_INDEX); |
930 |
printNavBarTop(output, "index"); |
printNavBarTop(output, "index"); |
931 |
|
|
932 |
{ |
{ |
1040 |
".", |
".", |
1041 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1042 |
output.beginPage("Deprecated API", getOutputCharset()); |
output.beginPage("Deprecated API", getOutputCharset()); |
1043 |
output.beginBody(); |
output.beginBody(CssClass.BODY_CONTENT_DEPRECATED); |
1044 |
printNavBarTop(output, "deprecated"); |
printNavBarTop(output, "deprecated"); |
1045 |
|
|
1046 |
output.div(CssClass.DEPRECATION_TITLE, "Deprecated API"); |
output.div(CssClass.DEPRECATION_TITLE, "Deprecated API"); |
1172 |
".", |
".", |
1173 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1174 |
output.beginPage("About", getOutputCharset()); |
output.beginPage("About", getOutputCharset()); |
1175 |
output.beginBody(); |
output.beginBody(CssClass.BODY_CONTENT_ABOUT); |
1176 |
|
|
1177 |
printNavBarTop(output, "about"); |
printNavBarTop(output, "about"); |
1178 |
|
|
1198 |
".", |
".", |
1199 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1200 |
output.beginPage("Help", getOutputCharset()); |
output.beginPage("Help", getOutputCharset()); |
1201 |
output.beginBody(); |
output.beginBody(CssClass.BODY_CONTENT_HELP); |
1202 |
|
|
1203 |
printNavBarTop(output, "help"); |
printNavBarTop(output, "help"); |
1204 |
|
|
1227 |
".", |
".", |
1228 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1229 |
output.beginPage(getWindowTitle(), getOutputCharset()); |
output.beginPage(getWindowTitle(), getOutputCharset()); |
1230 |
output.beginBody(); |
output.beginBody(CssClass.BODY_CONTENT_OVERVIEW); |
1231 |
|
|
1232 |
printNavBarTop(output, "overview"); |
printNavBarTop(output, "overview"); |
1233 |
|
|
1326 |
pathToRoot, |
pathToRoot, |
1327 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1328 |
output.beginPage(classDoc.name(), getOutputCharset()); |
output.beginPage(classDoc.name(), getOutputCharset()); |
1329 |
output.beginBody(); |
output.beginBody(CssClass.BODY_CONTENT_USES); |
1330 |
printNavBarTop(output, "uses", classDoc); |
printNavBarTop(output, "uses", classDoc); |
1331 |
|
|
1332 |
output.div(CssClass.USAGE_TITLE, "Uses of class " + classDoc.qualifiedName()); |
output.div(CssClass.USAGE_TITLE, "Uses of class " + classDoc.qualifiedName()); |
1413 |
output.close(); |
output.close(); |
1414 |
} |
} |
1415 |
|
|
1416 |
private void printSuperTreeRec(HtmlPage output, ListIterator it) |
private void printSuperTreeRec(HtmlPage output, ListIterator it, int level) |
1417 |
{ |
{ |
1418 |
if (it.hasPrevious()) { |
if (it.hasPrevious()) { |
1419 |
ClassDoc cd = (ClassDoc)it.previous(); |
ClassDoc cd = (ClassDoc)it.previous(); |
1420 |
output.beginElement("li"); |
output.beginElement("li", new String[] { "class" }, new String[] { "inheritance " + level }); |
1421 |
output.beginElement("code"); |
output.beginElement("code"); |
1422 |
if (it.hasPrevious()) { |
if (it.hasPrevious()) { |
1423 |
printType(output, cd, true); |
printType(output, cd, true); |
1429 |
output.endElement("li"); |
output.endElement("li"); |
1430 |
|
|
1431 |
if (it.hasPrevious()) { |
if (it.hasPrevious()) { |
1432 |
output.beginElement("ul"); |
output.beginElement("ul", new String[] { "class" }, new String[] { "inheritance " + (level + 1) }); |
1433 |
printSuperTreeRec(output, it); |
printSuperTreeRec(output, it, level + 1); |
1434 |
output.endElement("ul"); |
output.endElement("ul"); |
1435 |
} |
} |
1436 |
} |
} |
1480 |
pathToRoot, |
pathToRoot, |
1481 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1482 |
output.beginPage(classDoc.name(), getOutputCharset()); |
output.beginPage(classDoc.name(), getOutputCharset()); |
1483 |
output.beginBody(); |
output.beginBody(CssClass.BODY_CONTENT_CLASS); |
1484 |
printNavBarTop(output, "class", classDoc); |
printNavBarTop(output, "class", classDoc); |
1485 |
|
|
1486 |
output.beginDiv(CssClass.CLASS_TITLE); |
output.beginDiv(CssClass.CLASS_TITLE); |
1489 |
output.div(CssClass.CLASS_TITLE_CLASS, |
output.div(CssClass.CLASS_TITLE_CLASS, |
1490 |
getClassTypeName(classDoc) |
getClassTypeName(classDoc) |
1491 |
+ " " + classDoc.name()); |
+ " " + classDoc.name()); |
1492 |
|
output.endDiv(CssClass.CLASS_TITLE); |
1493 |
|
|
1494 |
if (classDoc.isInterface()) { |
if (classDoc.isInterface()) { |
1495 |
|
|
1536 |
for (ClassDoc cd = classDoc; cd != null; cd = cd.superclass()) { |
for (ClassDoc cd = classDoc; cd != null; cd = cd.superclass()) { |
1537 |
superClasses.add(cd); |
superClasses.add(cd); |
1538 |
} |
} |
1539 |
output.beginElement("ul"); |
output.beginDiv(CssClass.CLASS_INHERITANCETREE); |
1540 |
printSuperTreeRec(output, superClasses.listIterator(superClasses.size())); |
output.beginElement("ul", new String[] { "class" }, new String[] { "inheritance 0" }); |
1541 |
|
printSuperTreeRec(output, superClasses.listIterator(superClasses.size()), 0); |
1542 |
output.endElement("ul"); |
output.endElement("ul"); |
1543 |
|
output.endDiv(CssClass.CLASS_INHERITANCETREE); |
1544 |
|
|
1545 |
if (null != classDoc.containingClass()) { |
if (null != classDoc.containingClass()) { |
1546 |
output.beginDiv(CssClass.CLASS_ENCLOSINGCLASS); |
output.beginDiv(CssClass.CLASS_ENCLOSINGCLASS); |
1700 |
output.rowDiv(CssClass.TABLE_HEADER, header); |
output.rowDiv(CssClass.TABLE_HEADER, header); |
1701 |
|
|
1702 |
output.beginRow(); |
output.beginRow(); |
1703 |
output.beginCell(); |
output.beginCell(CssClass.CLASS_SUMMARY_INHERITED); |
1704 |
for (int i=0; i<memberDocs.length; ++i) { |
for (int i=0; i<memberDocs.length; ++i) { |
1705 |
ProgramElementDoc memberDoc = memberDocs[i]; |
ProgramElementDoc memberDoc = memberDocs[i]; |
1706 |
if (i > 0) { |
if (i > 0) { |
1707 |
output.print(", "); |
output.print(", "); |
1708 |
} |
} |
1709 |
output.beginAnchor(getMemberDocURL(output, memberDoc)); |
output.beginAnchor(getMemberDocURL(output, memberDoc)); |
1710 |
|
output.beginSpan(CssClass.CLASS_SUMMARY_INHERITED_MEMBER); |
1711 |
output.print(memberDoc.name()); |
output.print(memberDoc.name()); |
1712 |
|
output.endSpan(CssClass.CLASS_SUMMARY_INHERITED_MEMBER); |
1713 |
output.endAnchor(); |
output.endAnchor(); |
1714 |
} |
} |
1715 |
output.endCell(); |
output.endCell(); |
1743 |
ProgramElementDoc[] memberDocs, String header) |
ProgramElementDoc[] memberDocs, String header) |
1744 |
{ |
{ |
1745 |
if (memberDocs.length > 0) { |
if (memberDocs.length > 0) { |
1746 |
output.div(CssClass.TABLE_HEADER, header); |
output.div(CssClass.SECTION_HEADER, header); |
1747 |
|
|
1748 |
for (int i=0; i<memberDocs.length; ++i) { |
for (int i=0; i<memberDocs.length; ++i) { |
1749 |
if (i>0) { |
if (i>0) { |
2288 |
throw new IOException("Cannot create directory " + resourcesDir); |
throw new IOException("Cannot create directory " + resourcesDir); |
2289 |
} |
} |
2290 |
|
|
2291 |
// Copy Javascript file |
// Copy resources |
2292 |
|
|
2293 |
File javascriptTargetFile = new File(resourcesDir, |
String[] resourceNames = { |
2294 |
"gjdoc.js"); |
"gjdoc.js", |
2295 |
InputStream javascriptIn = getClass().getResourceAsStream("/htmldoclet/gjdoc.js"); |
"gjdochtml-clean-layout.css", |
2296 |
FileOutputStream javascriptOut = new FileOutputStream(javascriptTargetFile); |
"gjdochtml-clean-color1.css", |
2297 |
IOToolkit.copyStream(javascriptIn, javascriptOut); |
"inherit.png", |
2298 |
javascriptIn.close(); |
}; |
2299 |
javascriptOut.close(); |
|
2300 |
|
for (int i=0; i<resourceNames.length; ++i) { |
2301 |
|
String resourceName = resourceNames[i]; |
2302 |
|
File targetFile = new File(resourcesDir, |
2303 |
|
resourceName); |
2304 |
|
InputStream in = getClass().getResourceAsStream("/htmldoclet/" + resourceName); |
2305 |
|
FileOutputStream out = new FileOutputStream(targetFile); |
2306 |
|
IOToolkit.copyStream(in, out); |
2307 |
|
in.close(); |
2308 |
|
out.close(); |
2309 |
|
} |
2310 |
|
|
2311 |
// Copy stylesheets |
// Copy stylesheets |
2312 |
|
|