PackageFrameWriterpublic class PackageFrameWriter extends AbstractPackageWriter Class to generate file for each package contents in the left-hand bottom
frame. This will list all the Class Kinds in the package. A click on any
class-kind will update the right-hand frame with the clicked class-kind page. |
Constructors Summary |
---|
public PackageFrameWriter(String path, String filename, PackageDoc packagedoc)Constructor to construct PackageFrameWriter object and to generate
"package-frame.html" file in the respective package directory.
For example for package "java.lang" this will generate file
"package-frame.html" file in the "java/lang" directory. It will also
create "java/lang" directory in the current or the destination directory
if it doesen't exist.
super(path, filename, packagedoc);
|
Methods Summary |
---|
public static void | generate(com.sun.javadoc.PackageDoc pkg)Generate a package summary page for the left-hand bottom frame. Construct
the PackageFrameWriter object and then uses it generate the file.
PackageFrameWriter packgen;
String path = DirectoryManager.getDirectoryPath(pkg);
String filename = "package-frame" + ".html";
try {
packgen = new PackageFrameWriter(path, filename, pkg);
packgen.generatePackageFile();
packgen.close();
} catch (IOException exc) {
Standard.configuration().standardmessage.
error("doclet.exception_encountered",
exc.toString(), filename);
throw new DocletAbortException();
}
| protected void | generateClassKindListing(com.sun.javadoc.ClassDoc[] arr, java.lang.String label)Generate specific class kind listing. Also add label to the listing.
if(arr.length > 0) {
Arrays.sort(arr);
printPackageTableHeader();
fontSizeStyle("+1", "FrameHeadingFont");
print(label);
fontEnd();
println(" ");
fontStyle("FrameItemFont");
for (int i = 0; i < arr.length; i++) {
if (!Util.isCoreClass(arr[i]) || !isGeneratedDoc(arr[i])) {
continue;
}
br();
printTargetClassLink(arr[i], "classFrame");
}
fontEnd();
printPackageTableFooter();
println();
}
| protected void | generateClassListing()Generate class listing for all the classes in this package. Divide class
listing as per the class kind and generate separate listing for
Classes, Interfaces, Exceptions and Errors.
generateClassKindListing(packagedoc.interfaces(),
getText("doclet.Interfaces"));
generateClassKindListing(packagedoc.ordinaryClasses(),
getText("doclet.Classes"));
generateClassKindListing(packagedoc.exceptions(),
getText("doclet.Exceptions"));
generateClassKindListing(packagedoc.errors(),
getText("doclet.Errors"));
| protected void | printPackageDescription()Do nothing. Package Description is not generted in this page.
| protected void | printPackageFooter()Do nothing. No footer is generated for this page.
| protected void | printPackageHeader(java.lang.String heading)Print the package link at the top of the class kind listing. Clicking
this link, package-summary page will appear in the right hand frame.
fontSizeStyle("+1", "FrameTitleFont");
printTargetPackageLink(packagedoc, "classFrame", heading);
fontEnd();
| protected void | printPackageTableFooter()Closing Html tags for table of class kind listing.
tdEnd();
trEnd();
tableEnd();
| protected void | printPackageTableHeader()The table for the class kind listing.
table();
tr();
tdNowrap();
|
|