changeset 8790:d793caaf5b5e

Remove indirections internally.
author Tom Gottfried <tom@intevation.de>
date Thu, 10 Dec 2015 14:38:32 +0100
parents d199860fb087
children 22169da49f9b
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DistancePanel.java
diffstat 1 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DistancePanel.java	Tue Dec 08 20:44:18 2015 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DistancePanel.java	Thu Dec 10 14:38:32 2015 +0100
@@ -63,11 +63,11 @@
 
     private static final long serialVersionUID = -883142387908664588L;
 
-    public static final int DEFAULT_STEP_WIDTH = 100;
+    private static final int DEFAULT_STEP_WIDTH = 100;
 
-    public static final String FIELD_LOWER = "ld_from";
-    public static final String FIELD_UPPER = "ld_to";
-    public static final String FIELD_STEP  = "ld_step";
+    private static final String FIELD_LOWER = "ld_from";
+    private static final String FIELD_UPPER = "ld_to";
+    private 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, getLowerField());
-        Data dTo   = getData(items, getUpperField());
-        Data dStep = getData(items, getStepField());
+        Data dFrom = getData(items, FIELD_LOWER);
+        Data dTo   = getData(items, FIELD_UPPER);
+        Data dStep = getData(items, FIELD_STEP);
 
         DataItem[] from = dFrom.getItems();
         DataItem[] to   = dTo.getItems();
@@ -301,7 +301,7 @@
 
     protected Data getDataFrom() {
         String value = String.valueOf(distancePanel.getFrom());
-        String field = getLowerField();
+        String field = FIELD_LOWER;
 
         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 = getUpperField();
+        String field = FIELD_UPPER;
 
         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 = getStepField();
+        String field = FIELD_STEP;
 
         DataItem item = new DefaultDataItem(field, field, value);
         return new DefaultData(
@@ -336,8 +336,8 @@
 
 
     protected void initMinMaxValues(DataList data) {
-        Data f = getData(data.getAll(), getLowerField());
-        Data t = getData(data.getAll(), getUpperField());
+        Data f = getData(data.getAll(), FIELD_LOWER);
+        Data t = getData(data.getAll(), FIELD_UPPER);
 
         DataItem[] fItems = f.getItems();
         DataItem[] tItems = t.getItems();
@@ -361,7 +361,7 @@
 
 
     protected void initDefaultFrom(DataList data) {
-        Data f = getData(data.getAll(), getLowerField());
+        Data f = getData(data.getAll(), FIELD_LOWER);
 
         double from = getDefaultFrom();
 
@@ -382,7 +382,7 @@
 
 
     protected void initDefaultTo(DataList data) {
-        Data t = getData(data.getAll(), getUpperField());
+        Data t = getData(data.getAll(), FIELD_UPPER);
 
         double to = getDefaultTo();
 
@@ -403,9 +403,9 @@
 
 
     protected void initDefaultStep(DataList data) {
-        Data s = getData(data.getAll(), getStepField());
+        Data s = getData(data.getAll(), FIELD_STEP);
 
-        double step = getDefaultStep();
+        double step = DEFAULT_STEP_WIDTH;
 
         try {
             step = getDefaultValue(s);

http://dive4elements.wald.intevation.org