[PATCH 2 of 2] Fixed location distance panel. TODO: Switch to location table and select tabs
Wald Commits
scm-commit at wald.intevation.org
Fri Sep 12 08:42:55 CEST 2014
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1410504161 -7200
# Node ID 9321b0cd4ad446fa49ba08d36eec7b6895304038
# Parent 229fce4a1d3e7f59e2ba9ecfe0cbf99e4ef37131
Fixed location distance panel. TODO: Switch to location table and select tabs.
diff -r 229fce4a1d3e -r 9321b0cd4ad4 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java Fri Sep 12 08:39:10 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java Fri Sep 12 08:42:41 2014 +0200
@@ -709,7 +709,15 @@
MESSAGES.unitLocation(),
getLocationValues(),
this);
+ distancePanel = new DoubleRangePanel(
+ MESSAGES.unitFrom(), MESSAGES.unitTo(), MESSAGES.unitWidth(),
+ getFrom(), getTo(), getStep(),
+ 400,
+ this);
+
container.addMember(locationPanel);
+ container.addMember(distancePanel);
+ container.hideMember(locationPanel);
layout.addMember(checkboxPanel);
layout.addMember(container);
@@ -1148,13 +1156,8 @@
* Activates the location panel.
*/
protected void enableLocationPanel() {
- locationPanel = new DoubleArrayPanel(
- MESSAGES.unitLocation(),
- getLocationValues(),
- this);
-
- container.removeMembers(container.getMembers());
- container.addMember(locationPanel);
+ container.hideMember(distancePanel);
+ container.showMember(locationPanel);
}
@@ -1162,14 +1165,8 @@
* Activates the distance panel.
*/
protected void enableDistancePanel() {
- distancePanel = new DoubleRangePanel(
- MESSAGES.unitFrom(), MESSAGES.unitTo(), MESSAGES.unitWidth(),
- getFrom(), getTo(), getStep(),
- 400,
- this);
-
- container.removeMembers(container.getMembers());
- container.addMember(distancePanel);
+ container.hideMember(locationPanel);
+ container.showMember(distancePanel);
}
@@ -1186,6 +1183,7 @@
return;
}
if (value.equals(FIELD_VALUE_LOCATION)) {
+ event.getItem().setValue(FIELD_VALUE_LOCATION);
enableLocationPanel();
filterDescription.clear();
filterRange.clear();
@@ -1205,6 +1203,7 @@
inputTables.selectTab(0);
}
else {
+ event.getItem().setValue(FIELD_VALUE_DISTANCE);
enableDistancePanel();
filterDescription.clear();
filterRange.clear();
More information about the Dive4Elements-commits
mailing list