changeset 5487:a87fe0d2c928

CollectionView: removed and use functionality that was moved to LockScreen.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 28 Mar 2013 09:25:38 +0100
parents b19f0fd301fc
children 6ec7c8ebb2c9
files flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java
diffstat 1 files changed, 4 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Thu Mar 28 09:24:41 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Thu Mar 28 09:25:38 2013 +0100
@@ -39,6 +39,7 @@
 import de.intevation.flys.client.client.services.DescribeCollectionServiceAsync;
 import de.intevation.flys.client.client.services.LoadArtifactService;
 import de.intevation.flys.client.client.services.LoadArtifactServiceAsync;
+import de.intevation.flys.client.client.ui.ScreenLock;
 import de.intevation.flys.client.shared.model.Artifact;
 import de.intevation.flys.client.shared.model.ArtifactDescription;
 import de.intevation.flys.client.shared.model.Collection;
@@ -117,6 +118,7 @@
     /** The layout. */
     protected Layout layout;
 
+    /** Layout to show spinning wheel of joy. */
     protected VLayout lockScreen;
 
     protected int artifactsQueue;
@@ -296,36 +298,13 @@
 
     /** Disables input, grey out, show spinning wheel of joy. */
     public void lockUI() {
-        if (lockScreen == null) {
-            lockScreen = new VLayout();
-            lockScreen.setWidth100();
-            lockScreen.setHeight100();
-            lockScreen.setBackgroundColor("#7f7f7f");
-            lockScreen.setOpacity(50);
-            lockScreen.setAlign(VerticalAlignment.CENTER);
-            lockScreen.setDefaultLayoutAlign(VerticalAlignment.CENTER);
-
-            HLayout inner = new HLayout();
-            inner.setAlign(Alignment.CENTER);
-            inner.setDefaultLayoutAlign(Alignment.CENTER);
-            inner.setOpacity(100);
-
-            Img img = new Img(
-                GWT.getHostPageBaseURL() + messages.loadingImg(),
-                25, 25);
-
-            inner.addMember(img);
-
-            lockScreen.addMember(inner);
-        }
-
-        layout.addChild(lockScreen);
+        lockScreen = ScreenLock.lockUI(layout, lockScreen);
     }
 
 
     /** Enable input, remove grey, remove spinning wheel of joy. */
     public void unlockUI() {
-        layout.removeChild(lockScreen);
+        ScreenLock.unlockUI(layout, lockScreen);
     }
 
 

http://dive4elements.wald.intevation.org