changeset 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 114fea2de638
children 18478c9baa67
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java
diffstat 2 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Mar 01 12:26:34 2012 +0000
+++ b/flys-client/ChangeLog	Thu Mar 01 12:28:35 2012 +0000
@@ -1,3 +1,11 @@
+2012-03-01  Raimund Renkert <raimund.renkert@intevation.de>
+
+	Issue 572.
+
+	* src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java:
+	  Catch the header double click event and do nothing, do not allow field
+	  reorder and resized style row.
+
 2012-03-01  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java	Thu Mar 01 12:26:34 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java	Thu Mar 01 12:28:35 2012 +0000
@@ -18,6 +18,8 @@
 import com.smartgwt.client.widgets.menu.MenuItem;
 import com.smartgwt.client.widgets.menu.events.ClickHandler;
 import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
+import com.smartgwt.client.widgets.grid.events.HeaderDoubleClickHandler;
+import com.smartgwt.client.widgets.grid.events.HeaderDoubleClickEvent;
 
 import de.intevation.flys.client.shared.MapUtils;
 import de.intevation.flys.client.shared.model.AttributedTheme;
@@ -36,7 +38,7 @@
 public class MapThemePanel extends ThemePanel {
 
     public static final int CELL_HEIGHT      = 75;
-    public static final int STYLE_CELL_WIDTH = 125;
+    public static final int STYLE_CELL_WIDTH = 150;
 
 
     public interface ActivateCallback {
@@ -116,9 +118,17 @@
         list.setShowRecordComponentsByCell(true);
         list.setShowHeader(true);
         list.setShowHeaderContextMenu(false);
+        list.setCanReorderFields(false);
         list.setWidth100();
         list.setHeight100();
 
+        list.addHeaderDoubleClickHandler(new HeaderDoubleClickHandler() {
+            public void onHeaderDoubleClick(HeaderDoubleClickEvent event) {
+                // cancel the event.
+                return;
+            }
+        });
+
         list.setCellHeight(CELL_HEIGHT);
         list.setShowRecordComponents(true);
         list.setShowRecordComponentsByCell(true);

http://dive4elements.wald.intevation.org