[Dive4elements-commits] [PATCH] GaugeInfoHead: Removed (not used anymore)

Wald Commits scm-commit at wald.intevation.org
Thu Feb 14 09:49:52 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1360832204 -3600
# Node ID 6baf466e8cb56b45273cf830bc2cb77d900a30e0
# Parent  8679d16fe11a9f8feb121f25950845e387461abd
GaugeInfoHead: Removed (not used anymore).

diff -r 8679d16fe11a -r 6baf466e8cb5 flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeInfoHead.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeInfoHead.java	Thu Feb 14 09:34:02 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-package de.intevation.flys.client.client.ui.stationinfo;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.i18n.client.NumberFormat;
-import com.google.gwt.user.client.ui.Anchor;
-import com.smartgwt.client.widgets.Label;
-import com.smartgwt.client.widgets.layout.HLayout;
-
-import de.intevation.flys.client.client.FLYS;
-import de.intevation.flys.client.client.FLYSConstants;
-import de.intevation.flys.client.shared.model.GaugeInfo;
-
-public class GaugeInfoHead extends HLayout {
-
-    /** The message class that provides i18n strings.*/
-    private FLYSConstants MSG = GWT.create(FLYSConstants.class);
-
-    public GaugeInfoHead(FLYS flys, GaugeInfo gauge) {
-        setStyleName("gaugeinfohead");
-        setAutoHeight();
-        setAutoWidth();
-
-        NumberFormat nf = NumberFormat.getDecimalFormat();
-
-        Label label = new Label(gauge.getName());
-        addMember(label);
-
-        Double start;
-        Double end;
-
-        if (!gauge.isKmUp()) {
-            start = gauge.getKmStart();
-            end   = gauge.getKmEnd();
-        }
-        else {
-            start = gauge.getKmEnd();
-            end   = gauge.getKmStart();
-        }
-
-        String kmtext = "";
-        if (start != null) {
-            kmtext += nf.format(start);
-            kmtext += " - ";
-        }
-        if (end != null) {
-            kmtext += nf.format(end);
-        }
-        if (start != null || end != null) {
-            kmtext += " km";
-        }
-
-        label = new Label(kmtext);
-
-        addMember(label);
-
-        Double station = gauge.getStation();
-        if (station != null) {
-            String stext = nf.format(station);
-            stext += " km";
-            label = new Label(stext);
-            addMember(label);
-        }
-
-        Long number = gauge.getOfficialNumber();
-        String url = number != null ?
-                MSG.gauge_url() + number :
-                    MSG.gauge_url();
-        Anchor anchor = new Anchor(MSG.gauge_info_link(), url, "_blank");
-        addMember(anchor);
-
-        addMember(new GaugeCurveAnchor(flys, gauge));
-    }
-
-    class GaugeCurveAnchor extends Anchor implements ClickHandler {
-
-        private FLYS flys;
-        private GaugeInfo gauge;
-
-        public GaugeCurveAnchor(FLYS flys, GaugeInfo gauge) {
-            super(MSG.gauge_curve_link());
-            this.flys = flys;
-            this.gauge = gauge;
-
-            addClickHandler(this);
-        }
-
-        @Override
-        public void onClick(ClickEvent ev) {
-            GWT.log("GaugeCurveAnchor - onClick " + gauge.getRiverName() +
-                    " " + gauge.getOfficialNumber());
-            flys.newGaugeDischargeCurve(gauge.getRiverName(),
-                    gauge.getOfficialNumber());
-        }
-    }
-
-}


More information about the Dive4elements-commits mailing list