src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java
changeset 59294 48b88b9c11eb
parent 54596 86c1da00dd6a
equal deleted inserted replaced
59293:5af9fa90cd7b 59294:48b88b9c11eb
    29 
    29 
    30 import javax.lang.model.element.Element;
    30 import javax.lang.model.element.Element;
    31 import javax.lang.model.element.TypeElement;
    31 import javax.lang.model.element.TypeElement;
    32 
    32 
    33 import com.sun.source.doctree.DocTree;
    33 import com.sun.source.doctree.DocTree;
       
    34 import jdk.javadoc.internal.doclets.formats.html.markup.BodyContents;
    34 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
    35 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
    35 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
    36 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
    36 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
    37 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
    37 import jdk.javadoc.internal.doclets.toolkit.Content;
    38 import jdk.javadoc.internal.doclets.toolkit.Content;
    38 import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
    39 import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
    58  * @author Bhavesh Patel (Modified)
    59  * @author Bhavesh Patel (Modified)
    59  */
    60  */
    60 public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
    61 public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
    61 
    62 
    62     /**
    63     /**
    63      * The HTML tree for main tag.
    64      * The HTML builder for the body contents.
    64      */
    65      */
    65     protected HtmlTree mainTree = HtmlTree.MAIN();
    66     protected BodyContents bodyContents = new BodyContents();
    66 
    67 
    67     public SubWriterHolderWriter(HtmlConfiguration configuration, DocPath filename) {
    68     public SubWriterHolderWriter(HtmlConfiguration configuration, DocPath filename) {
    68         super(configuration, filename);
    69         super(configuration, filename);
    69     }
    70     }
    70 
    71 
   189     }
   190     }
   190 
   191 
   191     /**
   192     /**
   192      * Add the class content tree.
   193      * Add the class content tree.
   193      *
   194      *
   194      * @param contentTree content tree to which the class content will be added
       
   195      * @param classContentTree class content tree which will be added to the content tree
   195      * @param classContentTree class content tree which will be added to the content tree
   196      */
   196      */
   197     public void addClassContentTree(Content contentTree, Content classContentTree) {
   197     public void addClassContentTree(Content classContentTree) {
   198         mainTree.add(classContentTree);
   198         bodyContents.addMainContent(classContentTree);
   199         contentTree.add(mainTree);
       
   200     }
   199     }
   201 
   200 
   202     /**
   201     /**
   203      * Add the annotation content tree.
   202      * Add the annotation content tree.
   204      *
   203      *
   205      * @param contentTree content tree to which the annotation content will be added
       
   206      * @param annotationContentTree annotation content tree which will be added to the content tree
   204      * @param annotationContentTree annotation content tree which will be added to the content tree
   207      */
   205      */
   208     public void addAnnotationContentTree(Content contentTree, Content annotationContentTree) {
   206     public void addAnnotationContentTree(Content annotationContentTree) {
   209         addClassContentTree(contentTree, annotationContentTree);
   207         addClassContentTree(annotationContentTree);
   210     }
   208     }
   211 
   209 
   212     /**
   210     /**
   213      * Get the member header tree
   211      * Get the member header tree
   214      *
   212      *