Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/ExportPanel.java @ 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 | 50b88b641be6 |
children | 0d3d3860beb5 |
line wrap: on
line diff
--- 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 :