Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/MeasurementStationPanel.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 |
line wrap: on
line source
package de.intevation.flys.client.client.ui.stationinfo; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.AsyncCallback; import de.intevation.flys.client.client.FLYS; import de.intevation.flys.client.shared.model.RiverInfo; /** * A Panel to show info about the MeasurementStations of a river * * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> */ public class MeasurementStationPanel extends InfoPanel { /** * MeasurementStationPanel loads the MeasurementStations from the * RiverInfoService and displays them in a tree underneath a RiverInfoPanel * * @param flys The FLYS object */ public MeasurementStationPanel(FLYS flys) { super(new MeasurementStationListGrid(flys)); } /** * Returns the title which should be displayed in the section */ @Override public String getSectionTitle() { return MSG.measurementStationPanelTitle(); } /** * Loads the river info and renders it afterwards */ @Override public void refresh() { GWT.log("MeasurementStationPanel - refresh"); contract(); riverInfoService.getMeasurementStations(this.river, new AsyncCallback<RiverInfo>() { @Override public void onFailure(Throwable e) { GWT.log("Could not load the river info." + e); } @Override public void onSuccess(RiverInfo riverinfo) { GWT.log("MeasurementStationPanel - Loaded river info"); render(riverinfo); expand(); } }); } }