# HG changeset patch # User Felix Wolfsteller # 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); }