Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Text |
|
| 0.0;0 |
1 | package net.sf.jolene.dom; | |
2 | ||
3 | /** | |
4 | * This represents arbitrary text to be rendered in an html document. | |
5 | * These objects are created when the Parser detects a LABEL tag containing other HTML elements. | |
6 | * | |
7 | * @author Dan Howard | |
8 | * @since Feb 11, 2006 8:21:44 AM | |
9 | */ | |
10 | 5 | public final class Text extends HTMLElement { |
11 | /** | |
12 | * Returns a clone of the text object. | |
13 | * | |
14 | * @return Text object. | |
15 | */ | |
16 | @Override | |
17 | public Text clone() { | |
18 | 0 | return (Text) super.clone(); |
19 | } | |
20 | ||
21 | /** | |
22 | * Sets the text on the text object. Same as setText. | |
23 | * @param value text to set. | |
24 | */ | |
25 | @Override | |
26 | public void setValue(String value) { | |
27 | 4 | super.setValue(value); |
28 | 4 | setContent(value); |
29 | 4 | } |
30 | ||
31 | /** | |
32 | * Renders the text. | |
33 | * | |
34 | * @return The text as a html string. | |
35 | */ | |
36 | @Override | |
37 | public String toString() { | |
38 | 8 | return getContent(); |
39 | } | |
40 | } |