Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java @ 8446:75b84f139c1b
(issue1733) Clearly set location distance defaults
This fixes the default values for the distance panel.
The data values were set in initDefaults after the ctor.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 27 Oct 2014 12:32:04 +0100 |
parents | 9321b0cd4ad4 |
children | 4b315e5d2d4f |
comparison
equal
deleted
inserted
replaced
8445:fe43340352bc | 8446:75b84f139c1b |
---|---|
694 if (theMode.equals(FIELD_VALUE_DISTANCE)) { | 694 if (theMode.equals(FIELD_VALUE_DISTANCE)) { |
695 enableDistancePanel(); | 695 enableDistancePanel(); |
696 inputTables.selectTab(1); | 696 inputTables.selectTab(1); |
697 } | 697 } |
698 currentFiltered = (ListGrid)inputTables.getSelectedTab().getPane(); | 698 currentFiltered = (ListGrid)inputTables.getSelectedTab().getPane(); |
699 | |
700 distancePanel.setValues(getFrom(), getTo(), getStep()); | |
699 } | 701 } |
700 | 702 |
701 | 703 |
702 protected Canvas createWidget(DataList data) { | 704 protected Canvas createWidget(DataList data) { |
703 VLayout layout = new VLayout(); | 705 VLayout layout = new VLayout(); |
704 container = new HLayout(); | 706 container = new HLayout(); |
705 Canvas checkboxPanel = createRadioButtonPanel(); | 707 Canvas checkboxPanel = createRadioButtonPanel(); |
706 | 708 |
707 // the initial view will display the location input mode | |
708 locationPanel = new DoubleArrayPanel( | 709 locationPanel = new DoubleArrayPanel( |
709 MESSAGES.unitLocation(), | 710 MESSAGES.unitLocation(), |
710 getLocationValues(), | 711 getLocationValues(), |
711 this); | 712 this); |
713 | |
712 distancePanel = new DoubleRangePanel( | 714 distancePanel = new DoubleRangePanel( |
713 MESSAGES.unitFrom(), MESSAGES.unitTo(), MESSAGES.unitWidth(), | 715 MESSAGES.unitFrom(), MESSAGES.unitTo(), MESSAGES.unitWidth(), |
714 getFrom(), getTo(), getStep(), | 716 0, 0, 0, /* initDefaults set the default values for this. */ |
715 400, | 717 400, |
716 this); | 718 this); |
717 | 719 |
718 container.addMember(locationPanel); | 720 container.addMember(locationPanel); |
719 container.addMember(distancePanel); | 721 container.addMember(distancePanel); |
720 container.hideMember(locationPanel); | 722 container.hideMember(locationPanel); |
721 | 723 |