view flys-client/src/main/java/de/intevation/flys/client/client/event/RangeFilterEvent.java @ 3549:6a8f83c538e3

Merged revisions 5384 via svnmerge from file:///home/clients/bsh/bsh-generischer-viewer/Material/SVN/flys-client/trunk ........ r5384 | felix | 2012-09-07 15:02:46 +0200 (Fr, 07 Sep 2012) | 1 line Cosmetics, docs. ........ flys-client/tags/2.9@5389 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 07 Sep 2012 13:12:48 +0000
parents 4f4d29404dba
children
line wrap: on
line source
package de.intevation.flys.client.client.event;

import com.google.gwt.i18n.client.NumberFormat;

/**
 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
 */
public class RangeFilterEvent {

    protected Float from;
    protected Float to;


    public RangeFilterEvent(String from, String to) {
        NumberFormat nf = NumberFormat.getDecimalFormat();
        double d;

        try {
            d = nf.parse(from);
            this.from = Float.valueOf(String.valueOf(d));
        }
        catch(NumberFormatException nfe) {
            this.from = Float.NaN;
        }
        try {
            d = nf.parse(to);
            this.to = Float.valueOf(String.valueOf(d));
        }
        catch(NumberFormatException nfe) {
            this.to = Float.NaN;
        }
    }


    public Float getFrom() {
        return this.from;
    }


    public Float getTo() {
        return this.to;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org