/** * Print the frames version of the Html file header. Called only when generating an HTML frames * file. * * @param title Title of this HTML document * @param configuration the configuration object * @param body the body content tree to be added to the HTML document */ public void printFramesDocument(String title, ConfigurationImpl configuration, HtmlTree body) throws IOException { Content htmlDocType = configuration.isOutputHtml5() ? DocType.HTML5 : DocType.TRANSITIONAL; Content htmlComment = new Comment(configuration.getText("doclet.New_Page")); Content head = new HtmlTree(HtmlTag.HEAD); head.addContent(getGeneratedBy(!configuration.notimestamp)); Content windowTitle = HtmlTree.TITLE(new StringContent(title)); head.addContent(windowTitle); Content meta = HtmlTree.META( "Content-Type", CONTENT_TYPE, (configuration.charset.length() > 0) ? configuration.charset : HtmlConstants.HTML_DEFAULT_CHARSET); head.addContent(meta); head.addContent(getStyleSheetProperties(configuration)); head.addContent(getFramesJavaScript()); Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(), head, body); Content htmlDocument = new HtmlDocument(htmlDocType, htmlComment, htmlTree); write(htmlDocument); }
/* Most of the code is ripped from the base class. I just want to generate a different kind of the summary page here. */ @Override protected void generatePackageFiles(ClassTree classtree) throws Exception { // super.generatePackageFiles(classtree); PackageDoc[] packages = configuration.packages; if (packages.length > 1) { PackageIndexFrameWriter.generate(configuration); } PackageDoc prev = null, next; for (int i = 0; i < packages.length; i++) { PackageFrameWriter.generate(configuration, packages[i]); next = (i + 1 < packages.length && packages[i + 1].name().length() > 0) ? packages[i + 1] : null; // If the next package is unnamed package, skip 2 ahead if possible next = (i + 2 < packages.length && next == null) ? packages[i + 2] : next; AbstractBuilder packageSummaryBuilder; if (containsArchDocTag(packages[i])) { packageSummaryBuilder = CustomPackageSummaryBuilder.getInstance( configuration, packages[i], new CustomPackageWriterImpl( ConfigurationImpl.getInstance(), packages[i], prev, next)); } else { packageSummaryBuilder = configuration.getBuilderFactory().getPackageSummaryBuilder(packages[i], prev, next); } packageSummaryBuilder.build(); prev = packages[i]; } }