< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java

Print this page




 171      * @param mdle        Module under consideration.
 172      */
 173     public ModuleWriterImpl(HtmlConfiguration configuration, ModuleElement mdle) {
 174         super(configuration, configuration.docPaths.moduleSummary(mdle));
 175         this.mdle = mdle;
 176         this.moduleMode = configuration.docEnv.getModuleMode();
 177         this.navBar = new Navigation(mdle, configuration, PageMode.MODULE, path);
 178         computeModulesData();
 179     }
 180 
 181     /**
 182      * Get the module header.
 183      *
 184      * @param heading the heading for the section
 185      */
 186     @Override
 187     public Content getModuleHeader(String heading) {
 188         HtmlTree bodyTree = getBody(getWindowTitle(mdle.getQualifiedName().toString()));
 189         Content headerContent = new ContentBuilder();
 190         addTop(headerContent);
 191         navBar.setDisplaySummaryModuleDescLink(!utils.getFullBody(mdle).isEmpty() && !configuration.nocomment);
 192         navBar.setDisplaySummaryModulesLink(display(requires) || display(indirectModules));
 193         navBar.setDisplaySummaryPackagesLink(display(packages) || display(indirectPackages)
 194                 || display(indirectOpenPackages));
 195         navBar.setDisplaySummaryServicesLink(displayServices(uses, usesTrees) || displayServices(provides.keySet(), providesTrees));
 196         navBar.setUserHeader(getUserHeaderFooter(true));
 197         headerContent.add(navBar.getContent(true));
 198         HtmlTree div = new HtmlTree(HtmlTag.DIV);
 199         div.setStyle(HtmlStyle.header);
 200         Content annotationContent = new HtmlTree(HtmlTag.P);
 201         addAnnotationInfo(mdle, annotationContent);
 202         div.add(annotationContent);
 203         Content label = mdle.isOpen() && (configuration.docEnv.getModuleMode() == ModuleMode.ALL)
 204                 ? contents.openModuleLabel : contents.moduleLabel;
 205         Content tHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
 206                 HtmlStyle.title, label);
 207         tHeading.add(Entity.NO_BREAK_SPACE);
 208         Content moduleHead = new RawHtml(heading);
 209         tHeading.add(moduleHead);
 210         div.add(tHeading);
 211         bodyContents.setHeader(headerContent)




 171      * @param mdle        Module under consideration.
 172      */
 173     public ModuleWriterImpl(HtmlConfiguration configuration, ModuleElement mdle) {
 174         super(configuration, configuration.docPaths.moduleSummary(mdle));
 175         this.mdle = mdle;
 176         this.moduleMode = configuration.docEnv.getModuleMode();
 177         this.navBar = new Navigation(mdle, configuration, PageMode.MODULE, path);
 178         computeModulesData();
 179     }
 180 
 181     /**
 182      * Get the module header.
 183      *
 184      * @param heading the heading for the section
 185      */
 186     @Override
 187     public Content getModuleHeader(String heading) {
 188         HtmlTree bodyTree = getBody(getWindowTitle(mdle.getQualifiedName().toString()));
 189         Content headerContent = new ContentBuilder();
 190         addTop(headerContent);
 191         navBar.setDisplaySummaryModuleDescLink(!utils.getFullBody(mdle).isEmpty() && !options.noComment);
 192         navBar.setDisplaySummaryModulesLink(display(requires) || display(indirectModules));
 193         navBar.setDisplaySummaryPackagesLink(display(packages) || display(indirectPackages)
 194                 || display(indirectOpenPackages));
 195         navBar.setDisplaySummaryServicesLink(displayServices(uses, usesTrees) || displayServices(provides.keySet(), providesTrees));
 196         navBar.setUserHeader(getUserHeaderFooter(true));
 197         headerContent.add(navBar.getContent(true));
 198         HtmlTree div = new HtmlTree(HtmlTag.DIV);
 199         div.setStyle(HtmlStyle.header);
 200         Content annotationContent = new HtmlTree(HtmlTag.P);
 201         addAnnotationInfo(mdle, annotationContent);
 202         div.add(annotationContent);
 203         Content label = mdle.isOpen() && (configuration.docEnv.getModuleMode() == ModuleMode.ALL)
 204                 ? contents.openModuleLabel : contents.moduleLabel;
 205         Content tHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
 206                 HtmlStyle.title, label);
 207         tHeading.add(Entity.NO_BREAK_SPACE);
 208         Content moduleHead = new RawHtml(heading);
 209         tHeading.add(moduleHead);
 210         div.add(tHeading);
 211         bodyContents.setHeader(headerContent)


< prev index next >