Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java @ 4605:c1c4c95ae9e4
Hide the manage project button if the project list is shown
If a user closes the project list the manage projects button should be shown and
hidden otherwise.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 30 Nov 2012 10:15:44 +0100 |
parents | 7f86ab48284c |
children | 62091b0ef789 |
comparison
equal
deleted
inserted
replaced
4604:488db475613d | 4605:c1c4c95ae9e4 |
---|---|
18 import com.smartgwt.client.types.VerticalAlignment; | 18 import com.smartgwt.client.types.VerticalAlignment; |
19 import com.smartgwt.client.util.BooleanCallback; | 19 import com.smartgwt.client.util.BooleanCallback; |
20 import com.smartgwt.client.util.SC; | 20 import com.smartgwt.client.util.SC; |
21 import com.smartgwt.client.widgets.Canvas; | 21 import com.smartgwt.client.widgets.Canvas; |
22 import com.smartgwt.client.widgets.Label; | 22 import com.smartgwt.client.widgets.Label; |
23 import com.smartgwt.client.widgets.events.VisibilityChangedEvent; | |
24 import com.smartgwt.client.widgets.events.VisibilityChangedHandler; | |
23 import com.smartgwt.client.widgets.grid.CellFormatter; | 25 import com.smartgwt.client.widgets.grid.CellFormatter; |
24 import com.smartgwt.client.widgets.grid.HoverCustomizer; | 26 import com.smartgwt.client.widgets.grid.HoverCustomizer; |
25 import com.smartgwt.client.widgets.grid.ListGrid; | 27 import com.smartgwt.client.widgets.grid.ListGrid; |
26 import com.smartgwt.client.widgets.grid.ListGridField; | 28 import com.smartgwt.client.widgets.grid.ListGridField; |
27 import com.smartgwt.client.widgets.grid.ListGridRecord; | 29 import com.smartgwt.client.widgets.grid.ListGridRecord; |
88 * | 90 * |
89 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 91 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
90 */ | 92 */ |
91 public class ProjectList | 93 public class ProjectList |
92 extends VLayout | 94 extends VLayout |
93 implements CollectionChangeHandler, EditCompleteHandler, FilterHandler | 95 implements CollectionChangeHandler, EditCompleteHandler, FilterHandler, |
96 VisibilityChangedHandler | |
94 { | 97 { |
95 /** Interval to refresh the user's projects.*/ | 98 /** Interval to refresh the user's projects.*/ |
96 public static final int UPDATE_INTERVAL = 30000; | 99 public static final int UPDATE_INTERVAL = 30000; |
97 | 100 |
98 /** Min Interval to refresh the user's projects.*/ | 101 /** Min Interval to refresh the user's projects.*/ |
188 initGrid(); | 191 initGrid(); |
189 init(); | 192 init(); |
190 initTimer(); | 193 initTimer(); |
191 | 194 |
192 grid.addEditCompleteHandler(this); | 195 grid.addEditCompleteHandler(this); |
196 | |
197 addVisibilityChangedHandler(this); | |
193 | 198 |
194 updateUserCollections(); | 199 updateUserCollections(); |
195 } | 200 } |
196 | 201 |
197 | 202 |
961 updateUserCollections(); | 966 updateUserCollections(); |
962 } | 967 } |
963 } | 968 } |
964 ); | 969 ); |
965 } | 970 } |
971 | |
972 | |
973 @Override | |
974 public void onVisibilityChanged(VisibilityChangedEvent event) { | |
975 if (event.getIsVisible()) { | |
976 this.flys.hideHeaderProjectButton(); | |
977 } | |
978 else { | |
979 this.flys.shoHeaderProjectButton(); | |
980 } | |
981 } | |
966 } | 982 } |
967 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 983 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |