comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java @ 2436:4c9486a6d628

Issue 572. Catch the header double click event and do nothing, do not allow field reorder and resized style row. flys-client/trunk@4101 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 01 Mar 2012 12:28:35 +0000
parents e0d665661a1d
children 61020a61ed38
comparison
equal deleted inserted replaced
2435:114fea2de638 2436:4c9486a6d628
16 import com.smartgwt.client.widgets.layout.VLayout; 16 import com.smartgwt.client.widgets.layout.VLayout;
17 import com.smartgwt.client.widgets.menu.Menu; 17 import com.smartgwt.client.widgets.menu.Menu;
18 import com.smartgwt.client.widgets.menu.MenuItem; 18 import com.smartgwt.client.widgets.menu.MenuItem;
19 import com.smartgwt.client.widgets.menu.events.ClickHandler; 19 import com.smartgwt.client.widgets.menu.events.ClickHandler;
20 import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent; 20 import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
21 import com.smartgwt.client.widgets.grid.events.HeaderDoubleClickHandler;
22 import com.smartgwt.client.widgets.grid.events.HeaderDoubleClickEvent;
21 23
22 import de.intevation.flys.client.shared.MapUtils; 24 import de.intevation.flys.client.shared.MapUtils;
23 import de.intevation.flys.client.shared.model.AttributedTheme; 25 import de.intevation.flys.client.shared.model.AttributedTheme;
24 import de.intevation.flys.client.shared.model.FacetRecord; 26 import de.intevation.flys.client.shared.model.FacetRecord;
25 import de.intevation.flys.client.shared.model.Theme; 27 import de.intevation.flys.client.shared.model.Theme;
34 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 36 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
35 */ 37 */
36 public class MapThemePanel extends ThemePanel { 38 public class MapThemePanel extends ThemePanel {
37 39
38 public static final int CELL_HEIGHT = 75; 40 public static final int CELL_HEIGHT = 75;
39 public static final int STYLE_CELL_WIDTH = 125; 41 public static final int STYLE_CELL_WIDTH = 150;
40 42
41 43
42 public interface ActivateCallback { 44 public interface ActivateCallback {
43 void activate(Theme theme, boolean activate); 45 void activate(Theme theme, boolean activate);
44 } 46 }
114 list.setCanSort(false); 116 list.setCanSort(false);
115 list.setShowRecordComponents(false); 117 list.setShowRecordComponents(false);
116 list.setShowRecordComponentsByCell(true); 118 list.setShowRecordComponentsByCell(true);
117 list.setShowHeader(true); 119 list.setShowHeader(true);
118 list.setShowHeaderContextMenu(false); 120 list.setShowHeaderContextMenu(false);
121 list.setCanReorderFields(false);
119 list.setWidth100(); 122 list.setWidth100();
120 list.setHeight100(); 123 list.setHeight100();
124
125 list.addHeaderDoubleClickHandler(new HeaderDoubleClickHandler() {
126 public void onHeaderDoubleClick(HeaderDoubleClickEvent event) {
127 // cancel the event.
128 return;
129 }
130 });
121 131
122 list.setCellHeight(CELL_HEIGHT); 132 list.setCellHeight(CELL_HEIGHT);
123 list.setShowRecordComponents(true); 133 list.setShowRecordComponents(true);
124 list.setShowRecordComponentsByCell(true); 134 list.setShowRecordComponentsByCell(true);
125 list.setShowAllRecords(true); 135 list.setShowAllRecords(true);

http://dive4elements.wald.intevation.org