comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/DataList.java @ 2500:69a498896c9c

Create a link to an online help page and put it in front of the input panels. flys-client/trunk@4336 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 03 May 2012 06:19:04 +0000
parents c087137a8584
children
comparison
equal deleted inserted replaced
2499:8f36d4b5890c 2500:69a498896c9c
19 protected String uiprovider; 19 protected String uiprovider;
20 20
21 /** The label that should be used to label data objects. */ 21 /** The label that should be used to label data objects. */
22 protected String label; 22 protected String label;
23 23
24 /** The help text (URL) that should be displayed for this data object. */
25 protected String helpText;
26
24 27
25 /** 28 /**
26 * The default constructor that creates a new DataList without Data objects 29 * The default constructor that creates a new DataList without Data objects
27 * and no UIProvider. 30 * and no UIProvider.
28 */ 31 */
67 * @param label The label. 70 * @param label The label.
68 */ 71 */
69 public DataList(String state, int size, String uiprovider, String label) { 72 public DataList(String state, int size, String uiprovider, String label) {
70 this(state, size, uiprovider); 73 this(state, size, uiprovider);
71 this.label = label; 74 this.label = label;
75 }
76
77
78 /**
79 * A constructor that creates a new DataList without Data objects and no
80 * UIProvider. Size defines the initial size of the list.
81 *
82 * @param state The name of the state that this list belongs to.
83 * @param size The initial size of the list.
84 * @param uiprovider The UIProvider that should be used to render this list.
85 * @param label The label.
86 * @param helpText The help text (should be an URL).
87 */
88 public DataList(
89 String state,
90 int size,
91 String uiprovider,
92 String label,
93 String helpText
94 ) {
95 this(state, size, uiprovider, label);
96 this.helpText = helpText;
72 } 97 }
73 98
74 99
75 /** 100 /**
76 * Adds a new Data object to the list. 101 * Adds a new Data object to the list.
161 public String getUIProvider() { 186 public String getUIProvider() {
162 return uiprovider; 187 return uiprovider;
163 } 188 }
164 189
165 190
191 /**
192 * Returns the help text which should be an URL.
193 *
194 * @return the help text.
195 */
196 public String getHelpText() {
197 return helpText;
198 }
199
200
166 public Object clone() { 201 public Object clone() {
167 DataList clone = new DataList( 202 DataList clone = new DataList(
168 this.state, 203 this.state,
169 this.data.size(), 204 this.data.size(),
170 this.uiprovider, 205 this.uiprovider,
171 this.label); 206 this.label,
207 this.helpText);
172 clone.data = (List<Data>) ((ArrayList<Data>)data).clone(); 208 clone.data = (List<Data>) ((ArrayList<Data>)data).clone();
173 209
174 return clone; 210 return clone;
175 } 211 }
176 } 212 }

http://dive4elements.wald.intevation.org