diff gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java @ 9523:d421c2bf0195

Allow to edit colors in vegetation zones
author gernotbelger
date Mon, 01 Oct 2018 17:08:50 +0200
parents e2da9c8a7c57
children 7f3444cbba5f
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java	Mon Oct 01 16:37:12 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java	Mon Oct 01 17:08:50 2018 +0200
@@ -172,7 +172,6 @@
         toField.setCanEdit(true);// neue Anforderung - doch nicht?
 
         final ListGridField colorField = new ListGridField("color", this.MSG.uinfo_vegetation_zone_color());
-        colorField.setHidden(VegetationZoneServerClientXChange.HAS_COLORS_EDITABLE ? false : true);
         final ColorItem item = new ColorItem();
         colorField.setEditorProperties(item);
 
@@ -188,7 +187,7 @@
         if (editable) {
             final ListGridField removeField = PanelHelper.createRemoveField(this.elements, GWT.getHostPageBaseURL() + this.MSG.removeFeature());
             this.elements.addRecordClickHandler(new RecordClickHandler() { // adding another custom record-Remove-Handler which is not included in the
-                                                                           // Panelhelper TODO: MERGE WITH SupraRegionalPanel!!
+                // Panelhelper TODO: MERGE WITH SupraRegionalPanel!!
                 @Override
                 public void onRecordClick(final RecordClickEvent event) {
                     if (event.getField().getName().equals(removeField.getName())) {
@@ -341,9 +340,9 @@
         final Integer from = row.getMin_day_overflow();
         final Integer to = row.getMax_day_overflow();
         final String colorStr = row.getHexColor();
-        if (vegzone == null || from == null || to == null) {
+
+        if (vegzone == null)
             return null;
-        }
 
         final ListGridRecord r = new ListGridRecord();
         r.setAttribute("vegzone", vegzone);
@@ -377,7 +376,7 @@
 
             return null;
         }
-        catch (final NumberFormatException e) {
+        catch (@SuppressWarnings("unused") final NumberFormatException e) {
             return this.MSG.error_invalid_integer();
         }
     }

http://dive4elements.wald.intevation.org