Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/CrossSectionChartThemePanel.java @ 6195:de614089cc15
Cosmetics, TODO, doc.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 04 Jun 2013 11:51:06 +0200 |
parents | ea9eef426962 |
children | 8a425ee702e3 |
comparison
equal
deleted
inserted
replaced
6194:5319ecd0619c | 6195:de614089cc15 |
---|---|
77 protected VLayout layout; | 77 protected VLayout layout; |
78 | 78 |
79 /** Data item name for CrossSections selected km. */ | 79 /** Data item name for CrossSections selected km. */ |
80 protected static String CS_KM = "cross_section.km"; | 80 protected static String CS_KM = "cross_section.km"; |
81 | 81 |
82 /** Data item name for CrossSections selected km. */ | 82 /** Data item name for CrossSections reference ('master') flag. */ |
83 protected static String CS_IS_MASTER = "cross_section.master?"; | 83 protected static String CS_IS_MASTER = "cross_section.master?"; |
84 | 84 |
85 /** List of cross-section themes through which is moved through synchronously. */ | 85 /** List of cross-section themes through which is moved through synchronously. */ |
86 protected HashSet synchronCrossSectionThemes = new HashSet(); | 86 protected HashSet synchronCrossSectionThemes = new HashSet(); |
87 | 87 |
176 } | 176 } |
177 } | 177 } |
178 } | 178 } |
179 // There is none selected. Take the first one. | 179 // There is none selected. Take the first one. |
180 if (firstCSUuid != null) { | 180 if (firstCSUuid != null) { |
181 // TODO better take the one closest to first km! | |
182 // issue1157, query next/prev kms, select the one which is closest. | |
181 setCurrentCSMaster(firstCSUuid); | 183 setCurrentCSMaster(firstCSUuid); |
182 feedTellMaster(firstCSUuid); | 184 feedTellMaster(firstCSUuid); |
183 } | 185 } |
184 return null; | 186 return null; |
185 } | 187 } |
408 * @param up If true, numerically higher values are preferred if | 410 * @param up If true, numerically higher values are preferred if |
409 * two values in \param in are in the same distance to | 411 * two values in \param in are in the same distance to |
410 * \param to. | 412 * \param to. |
411 */ | 413 */ |
412 @Override | 414 @Override |
413 public void spinnerValueEntered(KMSpinner spinner, final double enteredKm, final FacetRecord facetRecord, final boolean up) { | 415 public void spinnerValueEntered(KMSpinner spinner, |
416 final double enteredKm, | |
417 final FacetRecord facetRecord, | |
418 final boolean up | |
419 ) { | |
414 disable(); | 420 disable(); |
415 Config config = Config.getInstance(); | 421 Config config = Config.getInstance(); |
416 final String locale = config.getLocale(); | 422 final String locale = config.getLocale(); |
417 | 423 |
418 Map<Integer, Double> map = new HashMap<Integer,Double>(); | 424 Map<Integer, Double> map = new HashMap<Integer,Double>(); |
500 return null; | 506 return null; |
501 } | 507 } |
502 | 508 |
503 String fieldName = this.getFieldName(colNum); | 509 String fieldName = this.getFieldName(colNum); |
504 | 510 |
511 // Place KMSpinner in Grid with currently chosen km value. | |
505 if (fieldName.equals(GRID_FIELD_ACTIONS)) { | 512 if (fieldName.equals(GRID_FIELD_ACTIONS)) { |
506 double currentValue = | 513 double currentValue = |
507 Double.valueOf(facetRecord.getTheme().getCollectionItem().getData().get(CS_KM)); | 514 Double.valueOf(facetRecord.getTheme().getCollectionItem().getData().get(CS_KM)); |
508 KMSpinner kmSpinner = new KMSpinner(currentValue, facetRecord); | 515 KMSpinner kmSpinner = new KMSpinner(currentValue, facetRecord); |
509 kmSpinner.addChangeListener(parent); | 516 kmSpinner.addChangeListener(parent); |
518 list.setShowRecordComponents(true); | 525 list.setShowRecordComponents(true); |
519 list.setShowRecordComponentsByCell(true); | 526 list.setShowRecordComponentsByCell(true); |
520 list.setShowAllRecords(true); | 527 list.setShowAllRecords(true); |
521 list.setShowHeaderContextMenu(false); | 528 list.setShowHeaderContextMenu(false); |
522 list.setLeaveScrollbarGap(false); | 529 list.setLeaveScrollbarGap(false); |
530 | |
523 return list; | 531 return list; |
524 } | 532 } |
525 | 533 |
526 | 534 |
527 /** | 535 /** |