Mercurial > dive4elements > river
changeset 8262:9321b0cd4ad4
Fixed location distance panel. TODO: Switch to location table and select tabs.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 12 Sep 2014 08:42:41 +0200 |
parents | 229fce4a1d3e |
children | 9bb8d581f6ca 4d99606a844e |
files | gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java |
diffstat | 1 files changed, 14 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- 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();