changeset 1496:a882297ce63d

Changed CrossSection spinner-stepsize, adjusted km- and mastersetting. flys-client/trunk@3594 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 05 Jan 2012 12:01:11 +0000
parents bd6c8b06cb94
children 895e6bc4bb73
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java
diffstat 2 files changed, 15 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Jan 04 16:05:39 2012 +0000
+++ b/flys-client/ChangeLog	Thu Jan 05 12:01:11 2012 +0000
@@ -1,3 +1,12 @@
+2012-01-04  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	Adjusted the 'master' and 'km' mechanisms of CrossSections to
+	server-side changes, set stepwidth of spinner to hektokilometer.
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java:
+	  Do not need to sendFeed for km/master setting, set spinners
+	  stepwidth to hektokilometer.
+
 2012-01-04  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java	Wed Jan 04 16:05:39 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java	Thu Jan 05 12:01:11 2012 +0000
@@ -152,19 +152,6 @@
                     setCurrentCSMaster(theme.getArtifact());
                     GWT.log("found a master: " + currentCSMasterUUID
                         + "/" + theme.getDescription());
-                    Theme collectionMaster = getThemeList().getTheme(
-                        view.getArtifact().getUuid());
-                    if (!dataOf(theme, CS_KM)
-                            .equals(dataOf(collectionMaster, CS_KM))
-                    ) {
-                        // Tell Collection Master which kilometer the Cross-
-                        // Section Master is at, to have consistent subtitle
-                        // in diagram.
-                        // TODO fix
-                        //sendFeed(view.getArtifact().getUuid(),
-                        //    Double.valueOf(dataOf(theme, CS_KM)));
-                    }
-
                     return theme.getDescription();
                 }
             }
@@ -173,12 +160,6 @@
         if (firstCSUuid != null) {
             setCurrentCSMaster(firstCSUuid);
             feedTellMaster(firstCSUuid);
-            // Tell Collection Master which kilometer the Cross-
-            // Section Master is at, to have consistent subtitle
-            // in diagram.
-            // TODO fix
-            //sendFeed(view.getArtifact().getUuid(),
-            //    Double.valueOf(dataOf(firstCS, CS_KM)));
         }
         return null;
     }
@@ -319,14 +300,7 @@
                 public void onSuccess(Artifact artifact) {
                     GWT.log("Successfully fed with km");
                     requestRedraw();
-                    // Also feed the winfo/masterartifact (for plot subtitle)
-                    if (artUUID.equals(getCurrentCSMaster())
-                        && !artUUID.equals(view.getArtifact().getUuid())) {
-                        sendFeed(view.getArtifact().getUuid(), kmD);
-                    }
-                    else {
-                        enable();
-                    }
+                    enable();
                 }
         });
     }
@@ -344,8 +318,8 @@
         final FeedServiceAsync feedService,
         final FacetRecord      facetRecord)
     {
-        Config config          = Config.getInstance();
-        final String locale    = config.getLocale();
+        Config config       = Config.getInstance();
+        final String locale = config.getLocale();
 
         ChangedHandler handler = new ChangedHandler()
             {
@@ -416,13 +390,13 @@
         spinnerItem.setShowTitle(false);
         spinnerItem.setTitle("Waterlevel-Spinner");
         spinnerItem.setWidth(45);
-        spinnerItem.setDefaultValue(facetRecord.getTheme()
+        spinnerItem.setDefaultValue(Double.valueOf(facetRecord.getTheme()
             .getCollectionItem()
-            .getData().get(CS_KM));
+            .getData().get(CS_KM)));
 
         spinnerItem.setMin(0);
         spinnerItem.setMax(2000);
-        spinnerItem.setStep(0.5f);
+        spinnerItem.setStep(0.1f);
         spinnerItem.setChangeOnKeypress(true);
         return spinnerItem;
     }

http://dive4elements.wald.intevation.org