comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java @ 4131:360e22afb98b

Cosmetics, warnings and minor TODOs.
author Christian Lins <christian.lins@intevation.de>
date Mon, 15 Oct 2012 00:04:35 +0200
parents 22cd60315e08
children 9be8d7942284
comparison
equal deleted inserted replaced
4130:df8ac7ff6b1a 4131:360e22afb98b
19 import de.intevation.flys.client.client.services.GaugeOverviewInfoServiceAsync; 19 import de.intevation.flys.client.client.services.GaugeOverviewInfoServiceAsync;
20 import de.intevation.flys.client.shared.model.DataList; 20 import de.intevation.flys.client.shared.model.DataList;
21 import de.intevation.flys.client.shared.model.RiverInfo; 21 import de.intevation.flys.client.shared.model.RiverInfo;
22 22
23 /** 23 /**
24 * The GaugePanel is intendet to be used within a SectionStackSection 24 * The GaugePanel is intended to be used within a SectionStackSection
25 * It extends the VLayout by two methods to show and hide the 25 * It extends the VLayout by two methods to show and hide the
26 * section stack section. 26 * section stack section.
27 * 27 *
28 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> 28 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a>
29 */ 29 */
35 /** Name of the river */ 35 /** Name of the river */
36 private String river; 36 private String river;
37 37
38 /** The message class that provides i18n strings.*/ 38 /** The message class that provides i18n strings.*/
39 protected FLYSConstants MSG = GWT.create(FLYSConstants.class); 39 protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
40
41 private FLYS flys;
42 40
43 protected GaugeOverviewInfoServiceAsync gaugeOverviewInfoService = 41 protected GaugeOverviewInfoServiceAsync gaugeOverviewInfoService =
44 GWT.create(GaugeOverviewInfoService.class); 42 GWT.create(GaugeOverviewInfoService.class);
45 43
46 protected GaugeTree gaugetree; 44 protected GaugeTree gaugetree;
84 /** 82 /**
85 * Loads the river info and renders it afterwards 83 * Loads the river info and renders it afterwards
86 */ 84 */
87 public void refresh() { 85 public void refresh() {
88 gaugeOverviewInfoService.getRiverInfo(this.river, new AsyncCallback<RiverInfo>() { 86 gaugeOverviewInfoService.getRiverInfo(this.river, new AsyncCallback<RiverInfo>() {
87 @Override
89 public void onFailure(Throwable e) { 88 public void onFailure(Throwable e) {
90 GWT.log("Could not load the river info." + e); 89 GWT.log("Could not load the river info." + e);
91 } 90 }
92 91
92 @Override
93 public void onSuccess(RiverInfo riverinfo) { 93 public void onSuccess(RiverInfo riverinfo) {
94 GWT.log("Loaded river info"); 94 GWT.log("Loaded river info");
95 renderGaugeOverviewInfo(riverinfo); 95 renderGaugeOverviewInfo(riverinfo);
96 } 96 }
97 }); 97 });
126 126
127 127
128 /** 128 /**
129 * Hide the section stack section. 129 * Hide the section stack section.
130 */ 130 */
131 @Override
131 public void hide() { 132 public void hide() {
132 GWT.log("GaugePanel - hide"); 133 GWT.log("GaugePanel - hide");
133 this.sectionStack.setHidden(true); 134 this.sectionStack.setHidden(true);
134 } 135 }
135 136
136 /** 137 /**
137 * Show the section stack section. 138 * Show the section stack section.
138 */ 139 */
140 @Override
139 public void show() { 141 public void show() {
140 GWT.log("GaugePanel - show"); 142 GWT.log("GaugePanel - show");
141 this.sectionStack.setHidden(false); 143 this.sectionStack.setHidden(false);
142 } 144 }
143 145

http://dive4elements.wald.intevation.org