comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugePanel.java @ 4956:f46a07c11324

Refactor Pegel- and Messtelleninfo in client ui Use SmartGWT ListGrid instead of GWT Tree to display the station entires.
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 01 Feb 2013 16:32:48 +0100
parents
children e70ff0a600a3
comparison
equal deleted inserted replaced
4950:4c7acc3a4ae1 4956:f46a07c11324
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 import de.intevation.flys.client.client.FLYS;
6 import de.intevation.flys.client.shared.model.RiverInfo;
7
8 /**
9 * The GaugePanel is intended to be used within a SectionStackSection
10 *
11 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a>
12 */
13 public class GaugePanel extends InfoPanel {
14
15 /**
16 * GaugePanel loads the GaugeInfo from the RiverInfoService and
17 * displays them in a tree underneath a RiverInfoPanel
18 *
19 * @param flys The FLYS object
20 */
21 public GaugePanel(FLYS flys) {
22 super(new GaugeListGrid(flys));
23 }
24
25
26 @Override
27 public String getSectionTitle() {
28 return MSG.gaugePanelTitle();
29 }
30
31 /**
32 * Loads the river info and renders it afterwards
33 */
34 public void refresh() {
35 contract();
36
37 riverInfoService.getGauges(this.river, new AsyncCallback<RiverInfo>() {
38 @Override
39 public void onFailure(Throwable e) {
40 GWT.log("Could not load the river info." + e);
41 }
42
43 @Override
44 public void onSuccess(RiverInfo riverinfo) {
45 GWT.log("Loaded river info");
46 render(riverinfo);
47 expand();
48 }
49 });
50 }
51
52 }

http://dive4elements.wald.intevation.org