comparison flys-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationPanel.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/MeasurementStationPanel.java@f46a07c11324
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 import de.intevation.flys.client.client.FLYS;
6 import de.intevation.flys.client.shared.model.RiverInfo;
7
8 /**
9 * A Panel to show info about the MeasurementStations of a river
10 *
11 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a>
12 */
13 public class MeasurementStationPanel extends InfoPanel {
14
15 /**
16 * MeasurementStationPanel loads the MeasurementStations from the
17 * RiverInfoService and displays them in a tree underneath a RiverInfoPanel
18 *
19 * @param flys The FLYS object
20 */
21 public MeasurementStationPanel(FLYS flys) {
22 super(new MeasurementStationListGrid(flys));
23 }
24
25 /**
26 * Returns the title which should be displayed in the section
27 */
28 @Override
29 public String getSectionTitle() {
30 return MSG.measurementStationPanelTitle();
31 }
32
33 /**
34 * Loads the river info and renders it afterwards
35 */
36 @Override
37 public void refresh() {
38 GWT.log("MeasurementStationPanel - refresh");
39 contract();
40
41 riverInfoService.getMeasurementStations(this.river,
42 new AsyncCallback<RiverInfo>() {
43 @Override
44 public void onFailure(Throwable e) {
45 GWT.log("Could not load the river info." + e);
46 }
47
48 @Override
49 public void onSuccess(RiverInfo riverinfo) {
50 GWT.log("MeasurementStationPanel - Loaded river info");
51 render(riverinfo);
52 expand();
53 }
54 });
55 }
56 }

http://dive4elements.wald.intevation.org