Mercurial > dive4elements > river
changeset 8800:2aaf87bc3ea7
Backout revision d793caaf5b5e.
This introduced a regression because constants and getters are
overwritten in child classes.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 17 Dec 2015 18:34:28 +0100 |
parents | 5f344ee5116b |
children | dece88059a36 |
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 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);