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

changeset 1737
7a9ef837e57f
parent 1735
8ea30d59ac41
child 1738
6ea964c78845
equal deleted inserted replaced
1736:74cd21f2c2fe 1737:7a9ef837e57f
25 25
26 26
27 package com.sun.tools.doclets.formats.html; 27 package com.sun.tools.doclets.formats.html;
28 28
29 import com.sun.javadoc.*; 29 import com.sun.javadoc.*;
30 import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
31 import com.sun.tools.doclets.formats.html.markup.StringContent;
32 import com.sun.tools.doclets.internal.toolkit.Content;
30 import com.sun.tools.doclets.internal.toolkit.util.*; 33 import com.sun.tools.doclets.internal.toolkit.util.*;
31 import com.sun.tools.doclets.internal.toolkit.util.links.*; 34 import com.sun.tools.doclets.internal.toolkit.util.links.*;
32 35
33 /** 36 /**
34 * <p><b>This is NOT part of any supported API. 37 * <p><b>This is NOT part of any supported API.
220 public String where = ""; 223 public String where = "";
221 224
222 /** 225 /**
223 * String style of text defined in style sheet. 226 * String style of text defined in style sheet.
224 */ 227 */
225 public String styleName =""; 228 public String styleName = "";
226 229
227 /** 230 /**
228 * The value of the target. 231 * The value of the target.
229 */ 232 */
230 public String target = ""; 233 public String target = "";
237 * @param classDoc the class to link to. 240 * @param classDoc the class to link to.
238 * @param label the label for the link. 241 * @param label the label for the link.
239 * @param target the value of the target attribute. 242 * @param target the value of the target attribute.
240 */ 243 */
241 public LinkInfoImpl(ConfigurationImpl configuration, 244 public LinkInfoImpl(ConfigurationImpl configuration,
242 Kind context, ClassDoc classDoc, String label, String target) { 245 Kind context, ClassDoc classDoc, Content label, String target) {
243 this.configuration = configuration; 246 this.configuration = configuration;
244 this.classDoc = classDoc; 247 this.classDoc = classDoc;
245 this.label = label; 248 this.label = label;
246 this.target = target; 249 this.target = target;
247 setContext(context); 250 setContext(context);
248 } 251 }
249 252
250 /** 253 /**
254 * {@inherotDoc}
255 */
256 protected Content newContent() {
257 return new ContentBuilder();
258 }
259
260 /**
251 * Construct a LinkInfo object. 261 * Construct a LinkInfo object.
252 * 262 *
253 * @param configuration the configuration data for the doclet 263 * @param configuration the configuration data for the doclet
254 * @param context the context of the link. 264 * @param context the context of the link.
255 * @param classDoc the class to link to. 265 * @param classDoc the class to link to.
257 * @param label the label for the link. 267 * @param label the label for the link.
258 * @param isStrong true if the link should be strong. 268 * @param isStrong true if the link should be strong.
259 * @param styleName String style of text defined in style sheet. 269 * @param styleName String style of text defined in style sheet.
260 */ 270 */
261 public LinkInfoImpl(ConfigurationImpl configuration, 271 public LinkInfoImpl(ConfigurationImpl configuration,
262 Kind context, ClassDoc classDoc, String where, String label, 272 Kind context, ClassDoc classDoc, String where, Content label,
263 boolean isStrong, String styleName) { 273 boolean isStrong, String styleName) {
264 this.configuration = configuration; 274 this.configuration = configuration;
265 this.classDoc = classDoc; 275 this.classDoc = classDoc;
266 this.where = where; 276 this.where = where;
267 this.label = label; 277 this.label = label;
275 * 285 *
276 * @param configuration the configuration data for the doclet 286 * @param configuration the configuration data for the doclet
277 * @param context the context of the link. 287 * @param context the context of the link.
278 * @param classDoc the class to link to. 288 * @param classDoc the class to link to.
279 * @param where the value of the marker #. 289 * @param where the value of the marker #.
280 * @param label the label for the link. 290 * @param label the plain-text label for the link.
281 * @param isStrong true if the link should be strong. 291 * @param isStrong true if the link should be strong.
282 */ 292 */
283 public LinkInfoImpl(ConfigurationImpl configuration, 293 public LinkInfoImpl(ConfigurationImpl configuration,
284 Kind context, ClassDoc classDoc, String where, String label, 294 Kind context, ClassDoc classDoc, String where, String label,
285 boolean isStrong) { 295 boolean isStrong) {
286 this.configuration = configuration; 296 this(configuration, context, classDoc, where, new StringContent(label),
287 this.classDoc = classDoc; 297 isStrong, "");
288 this.where = where; 298 }
289 this.label = label; 299
290 this.isStrong = isStrong; 300 /**
291 setContext(context); 301 * Construct a LinkInfo object.
292 } 302 *
293 303 * @param configuration the configuration data for the doclet
294 /** 304 * @param context the context of the link.
295 * Construct a LinkInfo object. 305 * @param classDoc the class to link to.
296 * 306 * @param where the value of the marker #.
297 * @param configuration the configuration data for the doclet 307 * @param label the label for the link.
298 * @param classDoc the class to link to. 308 * @param isStrong true if the link should be strong.
299 * @param label the label for the link. 309 */
300 */ 310 public LinkInfoImpl(ConfigurationImpl configuration,
301 public LinkInfoImpl(ConfigurationImpl configuration, 311 Kind context, ClassDoc classDoc, String where, Content label,
302 ClassDoc classDoc, String label) { 312 boolean isStrong) {
313 this(configuration, context, classDoc, where, label,
314 isStrong, "");
315 }
316
317 /**
318 * Construct a LinkInfo object.
319 *
320 * @param configuration the configuration data for the doclet
321 * @param classDoc the class to link to.
322 * @param label the label for the link.
323 */
324 public LinkInfoImpl(ConfigurationImpl configuration,
325 ClassDoc classDoc, Content label) {
303 this.configuration = configuration; 326 this.configuration = configuration;
304 this.classDoc = classDoc; 327 this.classDoc = classDoc;
305 this.label = label; 328 this.label = label;
329 setContext(context);
330 }
331
332 /**
333 * Construct a LinkInfo object.
334 *
335 * @param configuration the configuration data for the doclet
336 * @param classDoc the class to link to.
337 * @param label the label for the link.
338 */
339 public LinkInfoImpl(ConfigurationImpl configuration,
340 ClassDoc classDoc, String label) {
341 this.configuration = configuration;
342 this.classDoc = classDoc;
343 this.label = new StringContent(label);
306 setContext(context); 344 setContext(context);
307 } 345 }
308 346
309 /** 347 /**
310 * Construct a LinkInfo object. 348 * Construct a LinkInfo object.
373 * Construct a LinkInfo object. 411 * Construct a LinkInfo object.
374 * 412 *
375 * @param configuration the configuration data for the doclet 413 * @param configuration the configuration data for the doclet
376 * @param context the context of the link. 414 * @param context the context of the link.
377 * @param type the class to link to. 415 * @param type the class to link to.
378 * @param label the label for the link. 416 * @param label plain-text label for the link.
379 * @param isStrong true if the link should be strong. 417 * @param isStrong true if the link should be strong.
380 */ 418 */
381 public LinkInfoImpl(ConfigurationImpl configuration, 419 public LinkInfoImpl(ConfigurationImpl configuration,
382 Kind context, Type type, String label, 420 Kind context, Type type, String label,
421 boolean isStrong) {
422 this(configuration, context, type, new StringContent(label), isStrong);
423 }
424
425 /**
426 * Construct a LinkInfo object.
427 *
428 * @param configuration the configuration data for the doclet
429 * @param context the context of the link.
430 * @param type the class to link to.
431 * @param label the label for the link.
432 * @param isStrong true if the link should be strong.
433 */
434 public LinkInfoImpl(ConfigurationImpl configuration,
435 Kind context, Type type, Content label,
383 boolean isStrong) { 436 boolean isStrong) {
384 this.configuration = configuration; 437 this.configuration = configuration;
385 this.type = type; 438 this.type = type;
386 this.label = label; 439 this.label = label;
387 this.isStrong = isStrong; 440 this.isStrong = isStrong;
392 * Construct a LinkInfo object. 445 * Construct a LinkInfo object.
393 * 446 *
394 * @param configuration the configuration data for the doclet 447 * @param configuration the configuration data for the doclet
395 * @param context the context of the link. 448 * @param context the context of the link.
396 * @param classDoc the class to link to. 449 * @param classDoc the class to link to.
397 * @param label the label for the link. 450 * @param label plain-text label for the link.
398 * @param isStrong true if the link should be strong. 451 * @param isStrong true if the link should be strong.
399 */ 452 */
400 public LinkInfoImpl(ConfigurationImpl configuration, 453 public LinkInfoImpl(ConfigurationImpl configuration,
401 Kind context, ClassDoc classDoc, String label, 454 Kind context, ClassDoc classDoc, String label,
455 boolean isStrong) {
456 this(configuration, context, classDoc, new StringContent(label), isStrong);
457 }
458
459 /**
460 * Construct a LinkInfo object.
461 *
462 * @param configuration the configuration data for the doclet
463 * @param context the context of the link.
464 * @param classDoc the class to link to.
465 * @param label the label for the link.
466 * @param isStrong true if the link should be strong.
467 */
468 public LinkInfoImpl(ConfigurationImpl configuration,
469 Kind context, ClassDoc classDoc, Content label,
402 boolean isStrong) { 470 boolean isStrong) {
403 this.configuration = configuration; 471 this.configuration = configuration;
404 this.classDoc = classDoc; 472 this.classDoc = classDoc;
405 this.label = label; 473 this.label = label;
406 this.isStrong = isStrong; 474 this.isStrong = isStrong;

mercurial