src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java

changeset 182
47a62d8d98b4
parent 1
9a66ca7c79fa
child 233
5240b1120530
equal deleted inserted replaced
178:4efd44aa85ff 182:47a62d8d98b4
67 public TagletOutput deprecatedTagOutput(Doc doc) { 67 public TagletOutput deprecatedTagOutput(Doc doc) {
68 StringBuffer output = new StringBuffer(); 68 StringBuffer output = new StringBuffer();
69 Tag[] deprs = doc.tags("deprecated"); 69 Tag[] deprs = doc.tags("deprecated");
70 if (doc instanceof ClassDoc) { 70 if (doc instanceof ClassDoc) {
71 if (Util.isDeprecated((ProgramElementDoc) doc)) { 71 if (Util.isDeprecated((ProgramElementDoc) doc)) {
72 output.append("<B>" + 72 output.append("<STRONG>" +
73 ConfigurationImpl.getInstance(). 73 ConfigurationImpl.getInstance().
74 getText("doclet.Deprecated") + "</B>&nbsp;"); 74 getText("doclet.Deprecated") + "</STRONG>&nbsp;");
75 if (deprs.length > 0) { 75 if (deprs.length > 0) {
76 Tag[] commentTags = deprs[0].inlineTags(); 76 Tag[] commentTags = deprs[0].inlineTags();
77 if (commentTags.length > 0) { 77 if (commentTags.length > 0) {
78 78
79 output.append(commentTagsToOutput(null, doc, 79 output.append(commentTagsToOutput(null, doc,
84 output.append("<p>"); 84 output.append("<p>");
85 } 85 }
86 } else { 86 } else {
87 MemberDoc member = (MemberDoc) doc; 87 MemberDoc member = (MemberDoc) doc;
88 if (Util.isDeprecated((ProgramElementDoc) doc)) { 88 if (Util.isDeprecated((ProgramElementDoc) doc)) {
89 output.append("<DD><B>" + 89 output.append("<DD><STRONG>" +
90 ConfigurationImpl.getInstance(). 90 ConfigurationImpl.getInstance().
91 getText("doclet.Deprecated") + "</B>&nbsp;"); 91 getText("doclet.Deprecated") + "</STRONG>&nbsp;");
92 if (deprs.length > 0) { 92 if (deprs.length > 0) {
93 output.append("<I>"); 93 output.append("<I>");
94 output.append(commentTagsToOutput(null, doc, 94 output.append(commentTagsToOutput(null, doc,
95 deprs[0].inlineTags(), false).toString()); 95 deprs[0].inlineTags(), false).toString());
96 output.append("</I>"); 96 output.append("</I>");
99 output.append(DocletConstants.NL + "<P>" + 99 output.append(DocletConstants.NL + "<P>" +
100 DocletConstants.NL); 100 DocletConstants.NL);
101 } 101 }
102 } else { 102 } else {
103 if (Util.isDeprecated(member.containingClass())) { 103 if (Util.isDeprecated(member.containingClass())) {
104 output.append("<DD><B>" + 104 output.append("<DD><STRONG>" +
105 ConfigurationImpl.getInstance(). 105 ConfigurationImpl.getInstance().
106 getText("doclet.Deprecated") + "</B>&nbsp;"); 106 getText("doclet.Deprecated") + "</STRONG>&nbsp;");
107 } 107 }
108 } 108 }
109 } 109 }
110 return new TagletOutputImpl(output.toString()); 110 return new TagletOutputImpl(output.toString());
111 } 111 }
121 * {@inheritDoc} 121 * {@inheritDoc}
122 */ 122 */
123 public TagletOutput getParamHeader(String header) { 123 public TagletOutput getParamHeader(String header) {
124 StringBuffer result = new StringBuffer(); 124 StringBuffer result = new StringBuffer();
125 result.append("<DT>"); 125 result.append("<DT>");
126 result.append("<B>" + header + "</B>"); 126 result.append("<STRONG>" + header + "</STRONG>");
127 return new TagletOutputImpl(result.toString()); 127 return new TagletOutputImpl(result.toString());
128 } 128 }
129 129
130 /** 130 /**
131 * {@inheritDoc} 131 * {@inheritDoc}
139 /** 139 /**
140 * {@inheritDoc} 140 * {@inheritDoc}
141 */ 141 */
142 public TagletOutput returnTagOutput(Tag returnTag) { 142 public TagletOutput returnTagOutput(Tag returnTag) {
143 TagletOutput result = new TagletOutputImpl(DocletConstants.NL + "<DT>" + 143 TagletOutput result = new TagletOutputImpl(DocletConstants.NL + "<DT>" +
144 "<B>" + htmlWriter.configuration.getText("doclet.Returns") + 144 "<STRONG>" + htmlWriter.configuration.getText("doclet.Returns") +
145 "</B>" + "<DD>" + 145 "</STRONG>" + "<DD>" +
146 htmlWriter.commentTagsToString(returnTag, null, returnTag.inlineTags(), 146 htmlWriter.commentTagsToString(returnTag, null, returnTag.inlineTags(),
147 false)); 147 false));
148 return result; 148 return result;
149 } 149 }
150 150
187 187
188 private String addSeeHeader(String result) { 188 private String addSeeHeader(String result) {
189 if (result != null && result.length() > 0) { 189 if (result != null && result.length() > 0) {
190 return result + ", " + DocletConstants.NL; 190 return result + ", " + DocletConstants.NL;
191 } else { 191 } else {
192 return "<DT><B>" + htmlWriter.configuration().getText("doclet.See_Also") + "</B><DD>"; 192 return "<DT><STRONG>" + htmlWriter.configuration().getText("doclet.See_Also") + "</STRONG><DD>";
193 } 193 }
194 } 194 }
195 195
196 /** 196 /**
197 * {@inheritDoc} 197 * {@inheritDoc}
198 */ 198 */
199 public TagletOutput simpleTagOutput(Tag[] simpleTags, String header) { 199 public TagletOutput simpleTagOutput(Tag[] simpleTags, String header) {
200 String result = "<DT><B>" + header + "</B></DT>" + DocletConstants.NL + 200 String result = "<DT><STRONG>" + header + "</STRONG></DT>" + DocletConstants.NL +
201 " <DD>"; 201 " <DD>";
202 for (int i = 0; i < simpleTags.length; i++) { 202 for (int i = 0; i < simpleTags.length; i++) {
203 if (i > 0) { 203 if (i > 0) {
204 result += ", "; 204 result += ", ";
205 } 205 }
210 210
211 /** 211 /**
212 * {@inheritDoc} 212 * {@inheritDoc}
213 */ 213 */
214 public TagletOutput simpleTagOutput(Tag simpleTag, String header) { 214 public TagletOutput simpleTagOutput(Tag simpleTag, String header) {
215 return new TagletOutputImpl("<DT><B>" + header + "</B></DT>" + " <DD>" 215 return new TagletOutputImpl("<DT><STRONG>" + header + "</STRONG></DT>" + " <DD>"
216 + htmlWriter.commentTagsToString(simpleTag, null, simpleTag.inlineTags(), false) 216 + htmlWriter.commentTagsToString(simpleTag, null, simpleTag.inlineTags(), false)
217 + "</DD>" + DocletConstants.NL); 217 + "</DD>" + DocletConstants.NL);
218 } 218 }
219 219
220 /** 220 /**
221 * {@inheritDoc} 221 * {@inheritDoc}
222 */ 222 */
223 public TagletOutput getThrowsHeader() { 223 public TagletOutput getThrowsHeader() {
224 return new TagletOutputImpl(DocletConstants.NL + "<DT>" + "<B>" + 224 return new TagletOutputImpl(DocletConstants.NL + "<DT>" + "<STRONG>" +
225 htmlWriter.configuration().getText("doclet.Throws") + "</B>"); 225 htmlWriter.configuration().getText("doclet.Throws") + "</STRONG>");
226 } 226 }
227 227
228 /** 228 /**
229 * {@inheritDoc} 229 * {@inheritDoc}
230 */ 230 */

mercurial