[Dive4elements-commits] [PATCH 2 of 3] CollectionView: removed and use functionality that was moved to LockScreen

Wald Commits scm-commit at wald.intevation.org
Thu Mar 28 09:22:56 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1364459138 -3600
# Node ID a87fe0d2c928ec1f8876078b87c6b846f799636c
# Parent  b19f0fd301fcb5b45a2a782c0d30faed1dfa6c82
CollectionView: removed and use functionality that was moved to LockScreen.

diff -r b19f0fd301fc -r a87fe0d2c928 flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java
--- 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);
     }
 
 


More information about the Dive4elements-commits mailing list