comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeListGrid.java @ 9275:ff9372d0cc1c

All gauges should be collapsed during selection of calc mode
author gernotbelger
date Thu, 19 Jul 2018 17:36:52 +0200
parents 7337034eb5d5
children 486b6160962f
comparison
equal deleted inserted replaced
9274:1c8eeaf6031f 9275:ff9372d0cc1c
208 } 208 }
209 } 209 }
210 } 210 }
211 if (!locations.isEmpty()) { 211 if (!locations.isEmpty()) {
212 openOnLocations(locations); 212 openOnLocations(locations);
213 } else { 213 } else if( this.data != null && this.data.length == 1 ){
214 // During selection of calc-mode: all gauges should be collapsed
215 collapseAll();
216 }
217 else {
214 openAll(); 218 openAll();
215 } 219 }
216 } 220 }
217 221
218 @Override 222 @Override
221 GWT.log("InfoListGrid - openAll"); 225 GWT.log("InfoListGrid - openAll");
222 226
223 setData(new ListGridRecord[] {}); 227 setData(new ListGridRecord[] {});
224 for (final GaugeInfo gauge : this.gauges) { 228 for (final GaugeInfo gauge : this.gauges) {
225 addExpandedRecord(gauge); 229 addExpandedRecord(gauge);
230 }
231 }
232
233 private void collapseAll() {
234
235 GWT.log("InfoListGrid - openAll");
236
237 setData(new ListGridRecord[] {});
238 for (final GaugeInfo gauge : this.gauges) {
239 addCollapsedRecord(gauge);
226 } 240 }
227 } 241 }
228 242
229 void getLocations(final String labelname, final List<Double> locations, final DataList dl) { 243 void getLocations(final String labelname, final List<Double> locations, final DataList dl) {
230 for (int j = dl.size() - 1; j >= 0; --j) { 244 for (int j = dl.size() - 1; j >= 0; --j) {

http://dive4elements.wald.intevation.org