Mercurial > dive4elements > river
comparison flys-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugePanel.java @ 5834:f507086aa94b
Repaired internal references.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:31:32 +0200 |
parents | flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugePanel.java@3d01658d9c9c |
children | 821a02bbfb4e |
comparison
equal
deleted
inserted
replaced
5833:a2bdc0f524e8 | 5834:f507086aa94b |
---|---|
1 package de.intevation.flys.client.client.ui.stationinfo; | |
2 | |
3 import com.google.gwt.core.client.GWT; | |
4 import com.google.gwt.user.client.rpc.AsyncCallback; | |
5 | |
6 import de.intevation.flys.client.client.FLYS; | |
7 import de.intevation.flys.client.shared.model.RiverInfo; | |
8 | |
9 | |
10 /** | |
11 * The GaugePanel is intended to be used within a SectionStackSection | |
12 * | |
13 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> | |
14 */ | |
15 public class GaugePanel extends InfoPanel { | |
16 | |
17 /** | |
18 * GaugePanel loads the GaugeInfo from the RiverInfoService and | |
19 * displays them in a tree underneath a RiverInfoPanel | |
20 * | |
21 * @param flys The FLYS object | |
22 */ | |
23 public GaugePanel(FLYS flys) { | |
24 super(new GaugeListGrid(flys)); | |
25 } | |
26 | |
27 | |
28 @Override | |
29 public String getSectionTitle() { | |
30 return MSG.gaugePanelTitle(); | |
31 } | |
32 | |
33 /** | |
34 * Loads the river info and renders it afterwards. | |
35 */ | |
36 public void refresh() { | |
37 contract(); | |
38 | |
39 riverInfoService.getGauges(this.river, new AsyncCallback<RiverInfo>() { | |
40 @Override | |
41 public void onFailure(Throwable e) { | |
42 GWT.log("Could not load the river info." + e); | |
43 } | |
44 | |
45 @Override | |
46 public void onSuccess(RiverInfo riverinfo) { | |
47 GWT.log("Loaded river info"); | |
48 render(riverinfo); | |
49 expand(); | |
50 } | |
51 }); | |
52 } | |
53 } |