diff 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
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/IntegerRangeData.java	Wed Jan 18 09:19:36 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/IntegerRangeData.java	Wed Jan 18 15:04:30 2012 +0000
@@ -53,18 +53,20 @@
 
 
     /**
-     * Returns the DataItems provided by this Data object.
+     * Returns a DataItem which value is a string that consists of the min and
+     * max value separated by a ';'.
      *
-     * @return the DataItems.
+     * @return the DataItem.
      */
     public DataItem[] getItems() {
         String theMin = String.valueOf(lower);
-        DataItem min  = new DefaultDataItem(theMin, theMin, theMin);
-
         String theMax = String.valueOf(upper);
-        DataItem max  = new DefaultDataItem(theMax, theMax, theMax);
 
-        return new DataItem[] { min, max };
+        String value = theMin + ";" + theMax;
+
+        DataItem item  = new DefaultDataItem(value, value, value);
+
+        return new DataItem[] { item };
     }
 
 

http://dive4elements.wald.intevation.org