changeset 6195:de614089cc15

Cosmetics, TODO, doc.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 04 Jun 2013 11:51:06 +0200
parents 5319ecd0619c
children fa73e79ae208
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/CrossSectionChartThemePanel.java
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/CrossSectionChartThemePanel.java	Tue Jun 04 17:57:30 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/CrossSectionChartThemePanel.java	Tue Jun 04 11:51:06 2013 +0200
@@ -79,7 +79,7 @@
     /** Data item name for CrossSections selected km. */
     protected static String CS_KM = "cross_section.km";
 
-    /** Data item name for CrossSections selected km. */
+    /** Data item name for CrossSections reference ('master') flag. */
     protected static String CS_IS_MASTER = "cross_section.master?";
 
     /** List of cross-section themes through which is moved through synchronously. */
@@ -178,6 +178,8 @@
         }
         // There is none selected. Take the first one.
         if (firstCSUuid != null) {
+            // TODO better take the one closest to first km!
+            // issue1157, query next/prev kms, select the one which is closest.
             setCurrentCSMaster(firstCSUuid);
             feedTellMaster(firstCSUuid);
         }
@@ -410,7 +412,11 @@
      *                    \param to.
      */
     @Override
-    public void spinnerValueEntered(KMSpinner spinner, final double enteredKm, final FacetRecord facetRecord, final boolean up) {
+    public void spinnerValueEntered(KMSpinner spinner,
+        final double enteredKm,
+        final FacetRecord facetRecord,
+        final boolean up
+    ) {
         disable();
         Config config       = Config.getInstance();
         final String locale = config.getLocale();
@@ -502,6 +508,7 @@
 
                     String fieldName = this.getFieldName(colNum);
 
+                    // Place KMSpinner in Grid with currently chosen km value.
                     if (fieldName.equals(GRID_FIELD_ACTIONS)) {
                         double currentValue =
                             Double.valueOf(facetRecord.getTheme().getCollectionItem().getData().get(CS_KM));
@@ -520,6 +527,7 @@
         list.setShowAllRecords(true);
         list.setShowHeaderContextMenu(false);
         list.setLeaveScrollbarGap(false);
+
         return list;
     }
 

http://dive4elements.wald.intevation.org