Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/shared/model/IntegerRangeData.java @ 1554:ae25566ce6f6
Implemented the createOld() method in RangePanel.
flys-client/trunk@3793 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 27 Jan 2012 12:47:25 +0000 |
parents | 487c3ff7e838 |
children | c408074c6409 |
line wrap: on
line source
package de.intevation.flys.client.shared.model; /** * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class IntegerRangeData implements RangeData { protected String label; protected String description; protected int lower; protected int upper; public IntegerRangeData() { } public IntegerRangeData(String label, String desc, int lower, int upper) { this.label = label; this.description = desc; this.lower = lower; this.upper = upper; } /** * Returns the label of the item. * * @return the label. */ public String getLabel() { return label; } /** * Returns the description of the item. * * @return the description. */ public String getDescription() { return description; } /** * Returns the type of the item. * * @return the type. */ public String getType() { return "intrange"; } /** * Returns a DataItem which value is a string that consists of the min and * max value separated by a ';'. * * @return the DataItem. */ public DataItem[] getItems() { String theMin = String.valueOf(lower); String theMax = String.valueOf(upper); String value = theMin + ";" + theMax; DataItem item = new DefaultDataItem(value, value, value); return new DataItem[] { item }; } /** * @return always null. */ public DataItem getDefault() { return null; } public Object getLower() { return lower; } public Object getUpper() { return upper; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :