Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultData.java @ 514:b9127f876a6a
Enhanced the Data object to save default values/labels.
flys-client/trunk@1984 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 24 May 2011 10:44:59 +0000 |
parents | a2923d63f530 |
children | f6fbfdc813f0 |
comparison
equal
deleted
inserted
replaced
513:e090fbd5a535 | 514:b9127f876a6a |
---|---|
19 protected String type; | 19 protected String type; |
20 | 20 |
21 /** The DataItems.*/ | 21 /** The DataItems.*/ |
22 protected DataItem[] items; | 22 protected DataItem[] items; |
23 | 23 |
24 /** The default DataItem.*/ | |
25 protected DataItem defaultItem; | |
26 | |
24 | 27 |
25 public DefaultData() { | 28 public DefaultData() { |
26 } | 29 } |
27 | 30 |
28 | 31 |
38 String label, | 41 String label, |
39 String description, | 42 String description, |
40 String type, | 43 String type, |
41 DataItem[] items) | 44 DataItem[] items) |
42 { | 45 { |
46 this(label, description, type, items, null); | |
47 } | |
48 | |
49 | |
50 /** | |
51 * The constructor to create new DefaultData objects with a default value. | |
52 * | |
53 * @param label The label. | |
54 * @param description The description. | |
55 * @param type The type. | |
56 * @param items The DataItems. | |
57 * @param defaultItem The default DataItem. | |
58 */ | |
59 public DefaultData( | |
60 String label, | |
61 String description, | |
62 String type, | |
63 DataItem[] items, | |
64 DataItem defaultItem) | |
65 { | |
43 this.label = label; | 66 this.label = label; |
44 this.description = description; | 67 this.description = description; |
45 this.type = type; | 68 this.type = type; |
46 this.items = items; | 69 this.items = items; |
70 this.defaultItem = defaultItem; | |
47 } | 71 } |
48 | 72 |
49 | 73 |
50 public String getLabel() { | 74 public String getLabel() { |
51 return label; | 75 return label; |
63 | 87 |
64 | 88 |
65 public DataItem[] getItems() { | 89 public DataItem[] getItems() { |
66 return items; | 90 return items; |
67 } | 91 } |
92 | |
93 | |
94 public DataItem getDefault() { | |
95 return defaultItem; | |
96 } | |
68 } | 97 } |
69 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 98 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |