comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java @ 806:e50da1f74e58

The layers created in the floodmap reflect to the facets this output mode has. flys-client/trunk@2374 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 20 Jul 2011 13:31:20 +0000
parents f43d06d6a4a2
children 84c50f1d939b
comparison
equal deleted inserted replaced
805:f43d06d6a4a2 806:e50da1f74e58
17 /** 17 /**
18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
19 */ 19 */
20 public class MapThemePanel extends ThemePanel { 20 public class MapThemePanel extends ThemePanel {
21 21
22 public interface ActivateCallback {
23 void activate(Theme theme, boolean activate);
24 }
25
26
27
22 private FLYSConstants MSG = GWT.create(FLYSConstants.class); 28 private FLYSConstants MSG = GWT.create(FLYSConstants.class);
29
30
31 protected ActivateCallback activateCallback;
23 32
24 33
25 public static final String GRID_FIELD_ACTIVE = "active"; 34 public static final String GRID_FIELD_ACTIVE = "active";
26 public static final String GRID_FIELD_NAME = "name"; 35 public static final String GRID_FIELD_NAME = "name";
27 36
28 37
29 protected MapOutputTab mapOut; 38 protected MapOutputTab mapOut;
30 39
31 40
32 public MapThemePanel(Collection collection, OutputMode mode) { 41 public MapThemePanel(
42 Collection collection,
43 OutputMode mode,
44 ActivateCallback activateCallback)
45 {
33 super(collection, mode); 46 super(collection, mode);
47
48 this.activateCallback = activateCallback;
34 49
35 initGrid(); 50 initGrid();
36 initLayout(); 51 initLayout();
37 52
38 updateGrid(); 53 updateGrid();
77 } 92 }
78 93
79 94
80 @Override 95 @Override
81 public void activateTheme(Theme theme, boolean active) { 96 public void activateTheme(Theme theme, boolean active) {
97 if (activateCallback != null) {
98 activateCallback.activate(theme, active);
99 }
100
82 theme.setActive(active ? 1 : 0); 101 theme.setActive(active ? 1 : 0);
83 } 102 }
84 } 103 }
85 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 104 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org