52 * deletion without notice.</b>
53 *
54 * @see AbstractMemberWriter
55 * @see ClassWriterImpl
56 */
57 public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
58
59 /**
60 * The HTML builder for the body contents.
61 */
62 protected BodyContents bodyContents = new BodyContents();
63
64 public SubWriterHolderWriter(HtmlConfiguration configuration, DocPath filename) {
65 super(configuration, filename);
66 }
67
68 /**
69 * Add the summary header.
70 *
71 * @param mw the writer for the member being documented
72 * @param typeElement the type element to be documented
73 * @param memberTree the content tree to which the summary header will be added
74 */
75 public void addSummaryHeader(AbstractMemberWriter mw, TypeElement typeElement,
76 Content memberTree) {
77 mw.addSummaryAnchor(typeElement, memberTree);
78 mw.addSummaryLabel(memberTree);
79 }
80
81 /**
82 * Add the inherited summary header.
83 *
84 * @param mw the writer for the member being documented
85 * @param typeElement the te to be documented
86 * @param inheritedTree the content tree to which the inherited summary header will be added
87 */
88 public void addInheritedSummaryHeader(AbstractMemberWriter mw, TypeElement typeElement,
89 Content inheritedTree) {
90 mw.addInheritedSummaryLabel(typeElement, inheritedTree);
91 mw.addInheritedSummaryAnchor(typeElement, inheritedTree);
92 }
93
94 /**
95 * Add the index comment.
96 *
97 * @param member the member being documented
98 * @param contentTree the content tree to which the comment will be added
99 */
100 protected void addIndexComment(Element member, Content contentTree) {
101 List<? extends DocTree> tags = utils.getFirstSentenceTrees(member);
102 addIndexComment(member, tags, contentTree);
103 }
104
105 /**
106 * Add the index comment.
107 *
108 * @param member the member being documented
109 * @param firstSentenceTags the first sentence tags for the member to be documented
110 * @param tdSummary the content tree to which the comment will be added
111 */
204 }
205
206 /**
207 * Get the member header tree
208 *
209 * @return a content tree for the member header
210 */
211 public Content getMemberTreeHeader() {
212 HtmlTree ul = new HtmlTree(HtmlTag.UL);
213 ul.setStyle(HtmlStyle.blockList);
214 return ul;
215 }
216
217 public Content getMemberInheritedTree() {
218 HtmlTree div = new HtmlTree(HtmlTag.DIV);
219 div.setStyle(HtmlStyle.inheritedList);
220 return div;
221 }
222
223 /**
224 * Adds the member tree with css style.
225 * @param style the css style to be applied to member tree
226 * @param memberSummaryTree the content tree representing the member summary
227 * @param memberTree the content tree representing the member
228 */
229 public void addMemberTree(HtmlStyle style, Content memberSummaryTree, Content memberTree) {
230 HtmlTree htmlTree = HtmlTree.SECTION(style, memberTree);
231 memberSummaryTree.add(getMemberTree(htmlTree));
232 }
233
234 /**
235 * Get the member tree
236 *
237 * @param contentTree the tree used to generate the complete member tree
238 * @return a content tree for the member
239 */
240 public Content getMemberTree(Content contentTree) {
241 return HtmlTree.LI(HtmlStyle.blockList, contentTree);
242 }
243
244 /**
245 * Get the member summary tree
246 *
247 * @param contentTree the tree used to generate the member summary tree
248 * @return a content tree for the member summary
249 */
250 public Content getMemberSummaryTree(Content contentTree) {
|
52 * deletion without notice.</b>
53 *
54 * @see AbstractMemberWriter
55 * @see ClassWriterImpl
56 */
57 public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
58
59 /**
60 * The HTML builder for the body contents.
61 */
62 protected BodyContents bodyContents = new BodyContents();
63
64 public SubWriterHolderWriter(HtmlConfiguration configuration, DocPath filename) {
65 super(configuration, filename);
66 }
67
68 /**
69 * Add the summary header.
70 *
71 * @param mw the writer for the member being documented
72 * @param memberTree the content tree to which the summary header will be added
73 */
74 public void addSummaryHeader(AbstractMemberWriter mw, Content memberTree) {
75 mw.addSummaryLabel(memberTree);
76 }
77
78 /**
79 * Add the inherited summary header.
80 *
81 * @param mw the writer for the member being documented
82 * @param typeElement the te to be documented
83 * @param inheritedTree the content tree to which the inherited summary header will be added
84 */
85 public void addInheritedSummaryHeader(AbstractMemberWriter mw, TypeElement typeElement,
86 Content inheritedTree) {
87 mw.addInheritedSummaryLabel(typeElement, inheritedTree);
88 }
89
90 /**
91 * Add the index comment.
92 *
93 * @param member the member being documented
94 * @param contentTree the content tree to which the comment will be added
95 */
96 protected void addIndexComment(Element member, Content contentTree) {
97 List<? extends DocTree> tags = utils.getFirstSentenceTrees(member);
98 addIndexComment(member, tags, contentTree);
99 }
100
101 /**
102 * Add the index comment.
103 *
104 * @param member the member being documented
105 * @param firstSentenceTags the first sentence tags for the member to be documented
106 * @param tdSummary the content tree to which the comment will be added
107 */
200 }
201
202 /**
203 * Get the member header tree
204 *
205 * @return a content tree for the member header
206 */
207 public Content getMemberTreeHeader() {
208 HtmlTree ul = new HtmlTree(HtmlTag.UL);
209 ul.setStyle(HtmlStyle.blockList);
210 return ul;
211 }
212
213 public Content getMemberInheritedTree() {
214 HtmlTree div = new HtmlTree(HtmlTag.DIV);
215 div.setStyle(HtmlStyle.inheritedList);
216 return div;
217 }
218
219 /**
220 * Adds the member tree with css style and id attribute.
221 * @param style the css style to be applied to member tree
222 * @param sectionName the section name to use for the section id attribute
223 * @param memberSummaryTree the content tree representing the member summary
224 * @param memberTree the content tree representing the member
225 */
226 public void addMemberTree(HtmlStyle style, SectionName sectionName, Content memberSummaryTree, Content memberTree) {
227 HtmlTree htmlTree = HtmlTree.SECTION(style, memberTree)
228 .setId(sectionName.getName());
229 memberSummaryTree.add(getMemberTree(htmlTree));
230 }
231
232 /**
233 * Get the member tree
234 *
235 * @param contentTree the tree used to generate the complete member tree
236 * @return a content tree for the member
237 */
238 public Content getMemberTree(Content contentTree) {
239 return HtmlTree.LI(HtmlStyle.blockList, contentTree);
240 }
241
242 /**
243 * Get the member summary tree
244 *
245 * @param contentTree the tree used to generate the member summary tree
246 * @return a content tree for the member summary
247 */
248 public Content getMemberSummaryTree(Content contentTree) {
|