Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/DataList.java @ 52:1d0be51ab93b
The DataList has a label now.
flys-client/trunk@1508 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 17 Mar 2011 18:20:05 +0000 |
parents | a2923d63f530 |
children | a7179e3a774e |
comparison
equal
deleted
inserted
replaced
51:a2923d63f530 | 52:1d0be51ab93b |
---|---|
29 public DataList() { | 29 public DataList() { |
30 data = new ArrayList<Data>(); | 30 data = new ArrayList<Data>(); |
31 } | 31 } |
32 | 32 |
33 | 33 |
34 /** | |
35 * Constructor. | |
36 * | |
37 * @param state The name of the state that this list belongs to. | |
38 * @param size The initial size of the list. | |
39 */ | |
34 public DataList(String state, int size) { | 40 public DataList(String state, int size) { |
35 this.state = state; | 41 this.state = state; |
36 this.data = new ArrayList<Data>(size); | 42 this.data = new ArrayList<Data>(size); |
37 } | 43 } |
38 | 44 |
39 | 45 |
40 /** | 46 /** |
41 * A constructor that creates a new DataList without Data objects and no | 47 * A constructor that creates a new DataList without Data objects and no |
42 * UIProvider. Size defines the initial size of the list. | 48 * UIProvider. Size defines the initial size of the list. |
43 * | 49 * |
50 * @param state The name of the state that this list belongs to. | |
44 * @param size The initial size of the list. | 51 * @param size The initial size of the list. |
52 * @param uiprovider The UIProvider that should be used to render this list. | |
45 */ | 53 */ |
46 public DataList(String state, int size, String uiprovider) { | 54 public DataList(String state, int size, String uiprovider) { |
47 this(state, size); | 55 this(state, size); |
48 this.uiprovider = uiprovider; | 56 this.uiprovider = uiprovider; |
57 } | |
58 | |
59 | |
60 /** | |
61 * A constructor that creates a new DataList without Data objects and no | |
62 * UIProvider. Size defines the initial size of the list. | |
63 * | |
64 * @param state The name of the state that this list belongs to. | |
65 * @param size The initial size of the list. | |
66 * @param uiprovider The UIProvider that should be used to render this list. | |
67 * @param label The label. | |
68 */ | |
69 public DataList(String state, int size, String uiprovider, String label) { | |
70 this(state, size, uiprovider); | |
71 this.label = label; | |
49 } | 72 } |
50 | 73 |
51 | 74 |
52 /** | 75 /** |
53 * Adds a new Data object to the list. | 76 * Adds a new Data object to the list. |
90 return null; | 113 return null; |
91 } | 114 } |
92 | 115 |
93 | 116 |
94 /** | 117 /** |
118 * Returns the whole list of Data objects. | |
119 * | |
120 * @return the whole list of Data objects. | |
121 */ | |
122 public List<Data> getAll() { | |
123 return data; | |
124 } | |
125 | |
126 /** | |
95 * Returns the number of Data objects in the list. | 127 * Returns the number of Data objects in the list. |
96 * | 128 * |
97 * @param the number of Data objects in the list. | 129 * @param the number of Data objects in the list. |
98 */ | 130 */ |
99 public int size() { | 131 public int size() { |