changeset 2482:cef4c624c68c

Cosmetics. flys-client/trunk@4254 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 17 Apr 2012 14:40:19 +0000
parents 37438d7228b4
children f9a7a5ae914c
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualPointsEditor.java
diffstat 3 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Tue Apr 17 14:20:35 2012 +0000
+++ b/flys-client/ChangeLog	Tue Apr 17 14:40:19 2012 +0000
@@ -1,3 +1,8 @@
+2012-04-17	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java:
+	  Cosmetics.
+
 2012-04-17	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java	Tue Apr 17 14:20:35 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java	Tue Apr 17 14:40:19 2012 +0000
@@ -386,6 +386,13 @@
     }
 
 
+    /**
+     * Callback for when a value has been accepted in the km-spinner
+     * of a Cross-Section Profile theme.
+     * @param item        The SpinnerItem which was manipulated.
+     * @param enteredKm   The double-parsed value that has been entered.
+     * @param facetRecord The underlying datastores record.
+     */
     public void spinnerValueEntered(final SpinnerItem item,
         final double enteredKm, final FacetRecord facetRecord
     ) {
@@ -407,7 +414,7 @@
 
         map.put(dbid, enteredKm);
 
-    
+        // Query the available cross section measurements.
         kmService.getCrossSectionKMs(locale, map, 2,
             new AsyncCallback<Map<Integer, Double[]>>() {
                 @Override
@@ -681,7 +688,7 @@
         Theme facetTheme = ((FacetRecord)records[0]).getTheme();
         String item = facetTheme.getFacet();
 
-        if(item.equals("cross_section")) {
+        if (item.equals("cross_section")) {
             // Synchron checking.
             MenuItem synchronNavigationMenuItem = new MenuItem();
             final String themeHash = themeHash(facetTheme);
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualPointsEditor.java	Tue Apr 17 14:20:35 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualPointsEditor.java	Tue Apr 17 14:40:19 2012 +0000
@@ -209,6 +209,9 @@
 
         CellEditValueFormatter cevf = new CellEditValueFormatter() {
             public Object format(Object value, ListGridRecord record, int rowNum, int colNum) {
+                if (value == null) {
+                    return "";
+                }
                 NumberFormat nf = NumberFormat.getDecimalFormat();
                 try {
                     double d = Double.valueOf(value.toString()).doubleValue();

http://dive4elements.wald.intevation.org