[PATCH] Backout revision d793caaf5b5e

Wald Commits scm-commit at wald.intevation.org
Thu Dec 17 18:35:01 CET 2015


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1450373668 -3600
# Node ID 2aaf87bc3ea74fdcab3810cd30be5e833e1207f7
# Parent  5f344ee5116bb2b2d6492457e263e12908d982e4
Backout revision d793caaf5b5e.

This introduced a regression because constants and getters are
overwritten in child classes.

diff -r 5f344ee5116b -r 2aaf87bc3ea7 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DistancePanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DistancePanel.java	Thu Dec 17 18:31:26 2015 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DistancePanel.java	Thu Dec 17 18:34:28 2015 +0100
@@ -63,11 +63,11 @@
 
     private static final long serialVersionUID = -883142387908664588L;
 
-    private static final int DEFAULT_STEP_WIDTH = 100;
+    public static final int DEFAULT_STEP_WIDTH = 100;
 
-    private static final String FIELD_LOWER = "ld_from";
-    private static final String FIELD_UPPER = "ld_to";
-    private static final String FIELD_STEP  = "ld_step";
+    public static final String FIELD_LOWER = "ld_from";
+    public static final String FIELD_UPPER = "ld_to";
+    public static final String FIELD_STEP  = "ld_step";
 
 
     protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
@@ -149,9 +149,9 @@
     protected String getOldSelectionString(DataList dataList) {
         List<Data> items = dataList.getAll();
 
-        Data dFrom = getData(items, FIELD_LOWER);
-        Data dTo   = getData(items, FIELD_UPPER);
-        Data dStep = getData(items, FIELD_STEP);
+        Data dFrom = getData(items, getLowerField());
+        Data dTo   = getData(items, getUpperField());
+        Data dStep = getData(items, getStepField());
 
         DataItem[] from = dFrom.getItems();
         DataItem[] to   = dTo.getItems();
@@ -301,7 +301,7 @@
 
     protected Data getDataFrom() {
         String value = String.valueOf(distancePanel.getFrom());
-        String field = FIELD_LOWER;
+        String field = getLowerField();
 
         DataItem item = new DefaultDataItem(field, field, value);
         return new DefaultData(
@@ -311,7 +311,7 @@
 
     protected Data getDataTo() {
         String value = String.valueOf(distancePanel.getTo());
-        String field = FIELD_UPPER;
+        String field = getUpperField();
 
         DataItem item = new DefaultDataItem(field, field, value);
         return new DefaultData(
@@ -321,7 +321,7 @@
 
     protected Data getDataStep() {
         String value = String.valueOf(distancePanel.getStep());
-        String field = FIELD_STEP;
+        String field = getStepField();
 
         DataItem item = new DefaultDataItem(field, field, value);
         return new DefaultData(
@@ -336,8 +336,8 @@
 
 
     protected void initMinMaxValues(DataList data) {
-        Data f = getData(data.getAll(), FIELD_LOWER);
-        Data t = getData(data.getAll(), FIELD_UPPER);
+        Data f = getData(data.getAll(), getLowerField());
+        Data t = getData(data.getAll(), getUpperField());
 
         DataItem[] fItems = f.getItems();
         DataItem[] tItems = t.getItems();
@@ -361,7 +361,7 @@
 
 
     protected void initDefaultFrom(DataList data) {
-        Data f = getData(data.getAll(), FIELD_LOWER);
+        Data f = getData(data.getAll(), getLowerField());
 
         double from = getDefaultFrom();
 
@@ -382,7 +382,7 @@
 
 
     protected void initDefaultTo(DataList data) {
-        Data t = getData(data.getAll(), FIELD_UPPER);
+        Data t = getData(data.getAll(), getUpperField());
 
         double to = getDefaultTo();
 
@@ -403,9 +403,9 @@
 
 
     protected void initDefaultStep(DataList data) {
-        Data s = getData(data.getAll(), FIELD_STEP);
+        Data s = getData(data.getAll(), getStepField());
 
-        double step = DEFAULT_STEP_WIDTH;
+        double step = getDefaultStep();
 
         try {
             step = getDefaultValue(s);


More information about the Dive4Elements-commits mailing list