Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/LoadingPanel.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 | 40f4137a2c31 |
children |
comparison
equal
deleted
inserted
replaced
4130:df8ac7ff6b1a | 4131:360e22afb98b |
---|---|
1 package de.intevation.flys.client.client.ui; | 1 package de.intevation.flys.client.client.ui; |
2 | |
3 import java.util.ArrayList; | |
4 import java.util.List; | |
5 | 2 |
6 import com.google.gwt.core.client.GWT; | 3 import com.google.gwt.core.client.GWT; |
7 import com.google.gwt.user.client.Timer; | 4 import com.google.gwt.user.client.Timer; |
8 import com.google.gwt.user.client.rpc.AsyncCallback; | 5 import com.google.gwt.user.client.rpc.AsyncCallback; |
9 | 6 |
28 import de.intevation.flys.client.shared.model.Artifact; | 25 import de.intevation.flys.client.shared.model.Artifact; |
29 import de.intevation.flys.client.shared.model.ArtifactDescription; | 26 import de.intevation.flys.client.shared.model.ArtifactDescription; |
30 import de.intevation.flys.client.shared.model.CalculationMessage; | 27 import de.intevation.flys.client.shared.model.CalculationMessage; |
31 import de.intevation.flys.client.shared.model.DataList; | 28 import de.intevation.flys.client.shared.model.DataList; |
32 | 29 |
30 import java.util.ArrayList; | |
31 import java.util.List; | |
32 | |
33 | 33 |
34 public class LoadingPanel extends Canvas implements HasStepBackHandlers { | 34 public class LoadingPanel extends Canvas implements HasStepBackHandlers { |
35 | |
36 private static final long serialVersionUID = -7806425431408987601L; | |
35 | 37 |
36 public static final int UPDATE_INTERVAL = 1000 * 3; | 38 public static final int UPDATE_INTERVAL = 1000 * 3; |
37 | 39 |
38 public static final DescribeArtifactServiceAsync describe = | 40 public static final DescribeArtifactServiceAsync describe = |
39 GWT.create(DescribeArtifactService.class); | 41 GWT.create(DescribeArtifactService.class); |
195 | 197 |
196 final Config config = Config.getInstance(); | 198 final Config config = Config.getInstance(); |
197 final String locale = config.getLocale(); | 199 final String locale = config.getLocale(); |
198 | 200 |
199 describe.describe(locale, artifact, new AsyncCallback<Artifact>() { | 201 describe.describe(locale, artifact, new AsyncCallback<Artifact>() { |
202 @Override | |
200 public void onFailure(Throwable t) { | 203 public void onFailure(Throwable t) { |
201 GWT.log("Error while DESCRIBE artifact: " + t.getMessage()); | 204 GWT.log("Error while DESCRIBE artifact: " + t.getMessage()); |
202 | 205 |
203 startTimer(); | 206 startTimer(); |
204 } | 207 } |
205 | 208 |
209 @Override | |
206 public void onSuccess(Artifact artifact) { | 210 public void onSuccess(Artifact artifact) { |
207 GWT.log("Successfully DESCRIBE artifact."); | 211 GWT.log("Successfully DESCRIBE artifact."); |
208 | 212 |
209 setArtifact(artifact); | 213 setArtifact(artifact); |
210 | 214 |