1 | |
package net.sf.jolene.dom; |
2 | |
|
3 | |
import net.sf.jolene.constants.Tags; |
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | 1 | public final class Label extends HTMLElement { |
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | 18 | public Label() { |
17 | 18 | tag = Tags.label; |
18 | 18 | } |
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
@Override |
27 | |
public Label clone() { |
28 | 1 | return (Label) super.clone(); |
29 | |
} |
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
@Override |
36 | |
public void setValue(String value) { |
37 | 20 | super.setValue(value); |
38 | 20 | setContent(value); |
39 | 20 | } |
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
@Override |
48 | |
public String toString() { |
49 | |
|
50 | 31 | if (swapWith != null) { |
51 | 0 | return swapWith.toString(); |
52 | |
} |
53 | |
|
54 | 31 | if (!isRenderable() && !log.isDebugEnabled()) { |
55 | 0 | return ""; |
56 | |
} |
57 | |
|
58 | 31 | return super.toString() + getContent() + "</" + tag + '>'; |
59 | |
} |
60 | |
} |