comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugePanel.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugePanel.java@821a02bbfb4e
children 172338b1407f
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
1 package org.dive4elements.river.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 org.dive4elements.river.client.client.FLYS;
7 import org.dive4elements.river.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 }

http://dive4elements.wald.intevation.org