[Dive4elements-commits] [PATCH 1 of 2] Cosmetics, TODO, doc

Wald Commits scm-commit at wald.intevation.org
Wed Jun 5 11:32:45 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1370339466 -7200
# Node ID de614089cc15aea0397e6496f191868ac111ef45
# Parent  5319ecd0619ca51728e8e195f3998ff6caa14390
Cosmetics, TODO, doc.

diff -r 5319ecd0619c -r de614089cc15 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/CrossSectionChartThemePanel.java
--- 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;
     }
 


More information about the Dive4elements-commits mailing list