PackageTreeWriterpublic class PackageTreeWriter extends AbstractTreeWriter Class to generate Tree page for a package. The name of the file generated is
"package-tree.html" and it is generated in the respective package directory. |
Fields Summary |
---|
protected PackageDoc | packagedocPackage for which tree is to be generated. | protected PackageDoc | prevThe previous package name in the alpha-order list. | protected PackageDoc | nextThe next package name in the alpha-order list. |
Constructors Summary |
---|
public PackageTreeWriter(String path, String filename, PackageDoc packagedoc, PackageDoc prev, PackageDoc next, boolean noDeprecated)Constructor.
super(path, filename,
new ClassTree(packagedoc.allClasses(), noDeprecated), packagedoc);
this.packagedoc = packagedoc;
this.prev = prev;
this.next = next;
|
Methods Summary |
---|
public static void | generate(com.sun.javadoc.PackageDoc pkg, com.sun.javadoc.PackageDoc prev, com.sun.javadoc.PackageDoc next, boolean noDeprecated)Construct a PackageTreeWriter object and then use it to generate the
package tree page.
PackageTreeWriter packgen;
String path = DirectoryManager.getDirectoryPath(pkg);
String filename = "package-tree.html";
try {
packgen = new PackageTreeWriter(path, filename, pkg,
prev, next, noDeprecated);
packgen.generatePackageTreeFile();
packgen.close();
} catch (IOException exc) {
Standard.configuration().standardmessage.
error("doclet.exception_encountered",
exc.toString(), filename);
throw new DocletAbortException();
}
| protected void | generatePackageTreeFile()Generate a separate tree file for each package.
printHeader(getText("doclet.Window_Package_Class_Hierarchy",
Standard.configuration().windowtitle,
packagedoc.name()));
printPackageTreeHeader();
if (Standard.configuration().packages.length > 1) {
printLinkToMainTree();
}
generateTree(classtree.baseclasses(), "doclet.Class_Hierarchy");
generateTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy");
printPackageTreeFooter();
printBottom();
printBodyHtmlEnd();
| protected void | navLinkNext()Link for the next package tree file.
if (next == null) {
navLinkNext(null);
} else {
String path = DirectoryManager.getRelativePath(packagedoc.name(),
next.name());
navLinkNext(path + "package-tree.html");
}
| protected void | navLinkPackage()Link to the package summary page for the package of this tree.
navCellStart();
printHyperLink("package-summary.html", "", getText("doclet.Package"),
true, "NavBarFont1");
navCellEnd();
| protected void | navLinkPrevious()Link for the previous package tree file.
if (prev == null) {
navLinkPrevious(null);
} else {
String path = DirectoryManager.getRelativePath(packagedoc.name(),
prev.name());
navLinkPrevious(path + "package-tree.html");
}
| protected void | printLinkToMainTree()Generate a link to the tree for all the packages.
dl();
dt();
boldText("doclet.Package_Hierarchies");
dd();
navLinkMainTree(getText("doclet.All_Packages"));
dlEnd();
hr();
| protected void | printPackageTreeFooter()Print the navigation bar footer for the package tree file.
hr();
navLinks(false);
| protected void | printPackageTreeHeader()Print the navigation bar header for the package tree file.
navLinks(true);
hr();
center();
h2(getText("doclet.Hierarchy_For_Package", packagedoc.name()));
centerEnd();
|
|