diff flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java @ 4243:e68a710d9652

Convert GaugeOverviewInfoService into RiverInfoService The service will be reused for the MeasurementStation info too and it returns a RiverInfo in both cases. Therefore rename the current GaugeOverviewInfoService into RiverInfoService.
author Björn Ricks <bjoern.ricks@intevation.de>
date Wed, 24 Oct 2012 15:50:41 +0200
parents 207de712d79d
children a1bc5b8cff0f
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java	Wed Oct 24 14:44:12 2012 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java	Wed Oct 24 15:50:41 2012 +0200
@@ -16,8 +16,8 @@
 
 import de.intevation.flys.client.client.FLYS;
 import de.intevation.flys.client.client.FLYSConstants;
-import de.intevation.flys.client.client.services.GaugeOverviewInfoService;
-import de.intevation.flys.client.client.services.GaugeOverviewInfoServiceAsync;
+import de.intevation.flys.client.client.services.RiverInfoService;
+import de.intevation.flys.client.client.services.RiverInfoServiceAsync;
 import de.intevation.flys.client.shared.model.DataList;
 import de.intevation.flys.client.shared.model.RiverInfo;
 
@@ -39,8 +39,8 @@
     /** The message class that provides i18n strings.*/
     protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
 
-    protected GaugeOverviewInfoServiceAsync gaugeOverviewInfoService =
-        GWT.create(GaugeOverviewInfoService.class);
+    protected RiverInfoServiceAsync riverInfoService =
+        GWT.create(RiverInfoService.class);
 
     protected GaugeTree gaugetree;
     protected Canvas gaugetreecanvas;
@@ -88,7 +88,7 @@
      * Loads the river info and renders it afterwards
      */
     public void refresh() {
-        gaugeOverviewInfoService.getRiverInfo(this.river, new AsyncCallback<RiverInfo>() {
+        riverInfoService.getGauges(this.river, new AsyncCallback<RiverInfo>() {
             @Override
             public void onFailure(Throwable e) {
                 GWT.log("Could not load the river info." + e);

http://dive4elements.wald.intevation.org