changeset 433:ad2c4fb17318

Adjusted the width of an export button and added a tooltip to distinguish different exports. flys-client/trunk@1935 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 17 May 2011 10:14:22 +0000
parents 8ea213bd8fba
children 2d045a65ec27
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties flys-client/src/main/java/de/intevation/flys/client/client/ui/ExportPanel.java
diffstat 5 files changed, 32 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Tue May 17 09:58:53 2011 +0000
+++ b/flys-client/ChangeLog	Tue May 17 10:14:22 2011 +0000
@@ -1,3 +1,16 @@
+2011-05-17  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/FLYSConstants.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.java:
+	  Added i18n string for wst export.
+
+	* src/main/java/de/intevation/flys/client/client/ui/ExportPanel.java:
+	  Set a maximum size of the export button and added a tooltip to
+	  distinguish exports.
+
+	  NOTE: We should consider using specific images for each export type.
+
 2011-05-17  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/server/ExportServiceImpl.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Tue May 17 09:58:53 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Tue May 17 10:14:22 2011 +0000
@@ -160,6 +160,8 @@
 
     String csv();
 
+    String wst();
+
     // ERRORS
 
     String error_create_artifact();
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Tue May 17 09:58:53 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Tue May 17 10:14:22 2011 +0000
@@ -76,6 +76,7 @@
 
 dataexport = Datenexport
 csv = CSV
+wst = WST
 
 error_create_artifact = Error while creating new project.
 error_describe_artifact = Error while loading the parameterization.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Tue May 17 09:58:53 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Tue May 17 10:14:22 2011 +0000
@@ -76,6 +76,7 @@
 
 dataexport = Datenexport
 csv = CSV
+wst = WST
 
 error_create_artifact = Fehler beim Erstellen eines neuen Projekts.
 error_describe_artifact = Fehler beim Laden der Parametrisierung.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ExportPanel.java	Tue May 17 09:58:53 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ExportPanel.java	Tue May 17 10:14:22 2011 +0000
@@ -91,6 +91,8 @@
 
         HTMLPane pane = new HTMLPane();
         pane.setContents("<a href='" + url + "'><img src='" + iUrl + "'></a>");
+        pane.setWidth(30);
+        pane.setTooltip(getTooltipText(name, facet));
 
         return pane;
     }
@@ -117,5 +119,18 @@
 
         return url;
     }
+
+
+    /**
+     * Creates a text used as tooltip for a specific export and type.
+     *
+     * @param name The name of the export.
+     * @param facet The name of the export type (e.g. CSV, WST).
+     *
+     * @return a tooltip text.
+     */
+    protected String getTooltipText(String name, String facet) {
+        return MSG.getString(name) + " | " + MSG.getString(facet);
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org