Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/IntegerRangeData.java @ 1524:487c3ff7e838
Improved the code of IntegerRangePanel: it now returns the inserted values as IntegerRangeData object.
flys-client/trunk@3709 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 18 Jan 2012 15:04:30 +0000 |
parents | df9baca681a0 |
children | ae25566ce6f6 |
comparison
equal
deleted
inserted
replaced
1523:07b532f9e057 | 1524:487c3ff7e838 |
---|---|
51 return "intrange"; | 51 return "intrange"; |
52 } | 52 } |
53 | 53 |
54 | 54 |
55 /** | 55 /** |
56 * Returns the DataItems provided by this Data object. | 56 * Returns a DataItem which value is a string that consists of the min and |
57 * max value separated by a ';'. | |
57 * | 58 * |
58 * @return the DataItems. | 59 * @return the DataItem. |
59 */ | 60 */ |
60 public DataItem[] getItems() { | 61 public DataItem[] getItems() { |
61 String theMin = String.valueOf(lower); | 62 String theMin = String.valueOf(lower); |
62 DataItem min = new DefaultDataItem(theMin, theMin, theMin); | 63 String theMax = String.valueOf(upper); |
63 | 64 |
64 String theMax = String.valueOf(upper); | 65 String value = theMin + ";" + theMax; |
65 DataItem max = new DefaultDataItem(theMax, theMax, theMax); | |
66 | 66 |
67 return new DataItem[] { min, max }; | 67 DataItem item = new DefaultDataItem(value, value, value); |
68 | |
69 return new DataItem[] { item }; | |
68 } | 70 } |
69 | 71 |
70 | 72 |
71 /** | 73 /** |
72 * @return always null. | 74 * @return always null. |