예제 #1
0
 /**
  * Get the contents list.
  *
  * @param deprapi the deprecated list builder
  * @return a content tree for the contents list
  */
 public Content getContentsList(DeprecatedAPIListBuilder deprapi) {
   Content headContent = getResource("doclet.Deprecated_API");
   Content heading =
       HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.title, headContent);
   Content div = HtmlTree.DIV(HtmlStyle.header, heading);
   Content headingContent = getResource("doclet.Contents");
   div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true, headingContent));
   Content ul = new HtmlTree(HtmlTag.UL);
   for (int i = 0; i < DeprecatedAPIListBuilder.NUM_TYPES; i++) {
     addIndexLink(deprapi, i, ul);
   }
   div.addContent(ul);
   return div;
 }
 /** {@inheritDoc} */
 public Content getConstructorDetailsTreeHeader(ClassDoc classDoc, Content memberDetailsTree) {
   memberDetailsTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_DETAILS);
   Content constructorDetailsTree = writer.getMemberTreeHeader();
   constructorDetailsTree.addContent(writer.getMarkerAnchor(SectionName.CONSTRUCTOR_DETAIL));
   Content heading =
       HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, writer.constructorDetailsLabel);
   constructorDetailsTree.addContent(heading);
   return constructorDetailsTree;
 }
 /**
  * Get the header for the package use listing.
  *
  * @return a content tree representing the package use header
  */
 protected Content getPackageUseHeader() {
   String packageText = configuration.getText("doclet.Package");
   String name = pkgdoc.name();
   String title = configuration.getText("doclet.Window_ClassUse_Header", packageText, name);
   Content bodyTree = getBody(true, getWindowTitle(title));
   addTop(bodyTree);
   addNavLinks(true, bodyTree);
   ContentBuilder headContent = new ContentBuilder();
   headContent.addContent(getResource("doclet.ClassUse_Title", packageText));
   headContent.addContent(new HtmlTree(HtmlTag.BR));
   headContent.addContent(name);
   Content heading =
       HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true, HtmlStyle.title, headContent);
   Content div = HtmlTree.DIV(HtmlStyle.header, heading);
   bodyTree.addContent(div);
   return bodyTree;
 }
 /**
  * Get the header for the class use Listing.
  *
  * @return a content tree representing the class use header
  */
 protected Content getClassUseHeader() {
   String cltype =
       configuration.getText(classdoc.isInterface() ? "doclet.Interface" : "doclet.Class");
   String clname = classdoc.qualifiedName();
   String title = configuration.getText("doclet.Window_ClassUse_Header", cltype, clname);
   Content bodyTree = getBody(true, getWindowTitle(title));
   addTop(bodyTree);
   addNavLinks(true, bodyTree);
   ContentBuilder headContent = new ContentBuilder();
   headContent.addContent(getResource("doclet.ClassUse_Title", cltype));
   headContent.addContent(new HtmlTree(HtmlTag.BR));
   headContent.addContent(clname);
   Content heading =
       HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, true, HtmlStyle.title, headContent);
   Content div = HtmlTree.DIV(HtmlStyle.header, heading);
   bodyTree.addContent(div);
   return bodyTree;
 }
 /**
  * Add the class list that use the given class.
  *
  * @param contentTree the content tree to which the class list will be added
  */
 protected void addClassList(Content contentTree) throws IOException {
   HtmlTree ul = new HtmlTree(HtmlTag.UL);
   ul.addStyle(HtmlStyle.blockList);
   for (PackageDoc pkg : pkgSet) {
     Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(pkg.name()));
     Content link =
         getResource(
             "doclet.ClassUse_Uses.of.0.in.1",
             getLink(
                 new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc)),
             getPackageLink(pkg, Util.getPackageName(pkg)));
     Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link);
     li.addContent(heading);
     addClassUse(pkg, li);
     ul.addContent(li);
   }
   Content li = HtmlTree.LI(HtmlStyle.blockList, ul);
   contentTree.addContent(li);
 }
 /**
  * Get the header for the section.
  *
  * @param member the member being documented.
  * @return a header content for the section.
  */
 protected Content getHead(MemberDoc member) {
   Content memberContent = new StringContent(member.name());
   Content heading = HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING, memberContent);
   return heading;
 }
 /** {@inheritDoc} */
 public void addSummaryLabel(Content memberTree) {
   Content label =
       HtmlTree.HEADING(
           HtmlConstants.SUMMARY_HEADING, writer.getResource("doclet.Constructor_Summary"));
   memberTree.addContent(label);
 }