changeset 1470:eef55d18f424

Cosmetics, refactoring, renamed Master to CSMaster to avoid confusion. flys-client/trunk@3512 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 21 Dec 2011 12:21:23 +0000
parents 31d0557f31a2
children e125f889cf2f
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java
diffstat 2 files changed, 40 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Dec 21 12:18:59 2011 +0000
+++ b/flys-client/ChangeLog	Wed Dec 21 12:21:23 2011 +0000
@@ -1,3 +1,21 @@
+2011-12-20	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java:
+	  Renamed 'Master' to 'CSMaster' to avoid confusion between
+	  MasterArtifact of Collection, CrossSection Master and Master of the
+	  Universe.
+
+2011-12-20	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java:
+	  Fix over axis case, added new "over axis" menu item.
+
+	* src/main/java/de/intevation/flys/client/client/FLYSConstants.java,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties:
+	  Added translation for new menuitem.
+
 2011-12-21  Raimund Renkert <raimund.renkert@intevation.de>
 
 	* src/main/webapp/FLYS.css:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java	Wed Dec 21 12:18:59 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java	Wed Dec 21 12:21:23 2011 +0000
@@ -63,7 +63,7 @@
         de.intevation.flys.client.client.services.CrossSectionKMService.class);
 
     /** UUID of the current "master" cross section. */
-    protected String currentMasterUUID;
+    protected String currentCSMasterUUID;
 
     /** The layout (used for visual active/inactive feedback). */
     protected VLayout layout;
@@ -100,7 +100,7 @@
                 }
                 public void onSuccess(Artifact artifact) {
                     GWT.log("Successfully injected master mark to " + artifact);
-                    setCurrentMaster(artifact.getUuid());
+                    setCurrentCSMaster(artifact.getUuid());
                     requestRedraw();
                     enable();
                 }
@@ -110,9 +110,9 @@
 
 
     /**
-     * Sets currentMasterUUID.
+     * Sets currentCSMasterUUID.
      */
-    public String findCurrentMaster() {
+    public String findCurrentCSMaster() {
         ThemeList themeList = getThemeList();
         int count = getThemeList().getThemeCount();
         String firstCSUuid = null;
@@ -125,15 +125,15 @@
                     firstCSUuid = theme.getArtifact();
                 }
                 if (!value.equals("0")) {
-                    setCurrentMaster(theme.getArtifact());
-                    GWT.log("found a master: " + currentMasterUUID + "/" + theme.getDescription());
+                    setCurrentCSMaster(theme.getArtifact());
+                    GWT.log("found a master: " + currentCSMasterUUID + "/" + theme.getDescription());
                     return theme.getDescription();
                 }
             }
         }
         // There is none selected. Take the first one.
         if (firstCSUuid != null) {
-            setCurrentMaster(firstCSUuid);
+            setCurrentCSMaster(firstCSUuid);
             feedTellMaster(firstCSUuid);
         }
         return null;
@@ -163,8 +163,8 @@
 
         Config config       = Config.getInstance();
         final String locale = config.getLocale();
-        findCurrentMaster();
-        cbItem.setValue(getCurrentMaster());
+        findCurrentCSMaster();
+        cbItem.setValue(getCurrentCSMaster());
 
         // Add Change Handler to first unset the old master and then set the
         // new master.
@@ -176,16 +176,16 @@
                 disable();
 
                 // Tell current master that he is not master anymore.
-                if (getCurrentMaster() != null) {
+                if (getCurrentCSMaster() != null) {
                     Data[] feedData = DefaultData.createSimpleStringDataArray(
                             "cross_section.master?", "0");
                     feedService.feed(
                         locale,
-                        new DefaultArtifact(getCurrentMaster(), "TODO:hash"),
+                        new DefaultArtifact(getCurrentCSMaster(), "TODO:hash"),
                         feedData,
                         new AsyncCallback<Artifact>() {
                             public void onFailure(Throwable caught) {
-                                GWT.log("Could not un-master artifact ("+getCurrentMaster()+"): " +
+                                GWT.log("Could not un-master artifact ("+getCurrentCSMaster()+"): " +
                                     caught.getMessage());
                                 SC.warn(MSG.getString(caught.getMessage()));
                                 enable();
@@ -249,6 +249,12 @@
     }
 
 
+    /** Feed the master (WINFO) artifact with the km of the crosssection, 
+     * such that it can be displayed in the diagrams subtitle. */
+    public void sendFeed(double kmD) {
+        ;
+    }
+
     /** Feed a single artifact with the km of the crosssection to display. */
     public void sendFeed(FacetRecord facetRecord, double kmD) {
         Config config          = Config.getInstance();
@@ -462,14 +468,14 @@
 
 
     /** Get Current Cross-section Masters uuid. */
-    public String getCurrentMaster() {
-        return currentMasterUUID;
+    public String getCurrentCSMaster() {
+        return currentCSMasterUUID;
     }
 
 
     /** Set Current Cross-section Masters uuid. */
-    public void setCurrentMaster(String currentMasterUuid) {
-        this.currentMasterUUID = currentMasterUuid;
+    public void setCurrentCSMaster(String currentMasterUuid) {
+        this.currentCSMasterUUID = currentMasterUuid;
     }
 
 

http://dive4elements.wald.intevation.org