1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.struts.tiles.beans;
20
21 import java.io.Serializable;
22
23 /***
24 * A MenuItem implementation.
25 * Used to read menu items in definitions.
26 */
27 public class SimpleMenuItem implements MenuItem, Serializable {
28
29 private String value = null;
30
31 private String link = null;
32
33 private String icon = null;
34
35 private String tooltip = null;
36
37 /***
38 * Constructor.
39 */
40 public SimpleMenuItem() {
41 super();
42 }
43
44 /***
45 * Set value property.
46 */
47 public void setValue(String value) {
48 this.value = value;
49 }
50
51 /***
52 * Get value property.
53 */
54 public String getValue() {
55 return value;
56 }
57
58 /***
59 * Set link property.
60 */
61 public void setLink(String link) {
62 this.link = link;
63 }
64
65 /***
66 * Get link property.
67 */
68 public String getLink() {
69 return link;
70 }
71
72 /***
73 * Set icon property.
74 */
75 public void setIcon(String icon) {
76 this.icon = icon;
77 }
78
79 /***
80 * Get icon property.
81 */
82 public String getIcon() {
83 return icon;
84 }
85
86 /***
87 * Set tooltip property.
88 */
89 public void setTooltip(String tooltip) {
90 this.tooltip = tooltip;
91 }
92
93 /***
94 * Get tooltip property.
95 */
96 public String getTooltip() {
97 return tooltip;
98 }
99
100 /***
101 * Return String representation.
102 */
103 public String toString() {
104 StringBuffer buff = new StringBuffer("SimpleMenuItem[");
105
106 if (getValue() != null) {
107 buff.append("value=").append(getValue()).append(", ");
108 }
109
110 if (getLink() != null) {
111 buff.append("link=").append(getLink()).append(", ");
112 }
113
114 if (getTooltip() != null) {
115 buff.append("tooltip=").append(getTooltip()).append(", ");
116 }
117
118 if (getIcon() != null) {
119 buff.append("icon=").append(getIcon()).append(", ");
120 }
121
122 buff.append("]");
123 return buff.toString();
124 }
125
126 }