annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/ExportPanel.java @ 2931:d6983b78de45

Export panel: Make code more robust when trying to resolve missing i18n strings. flys-client/trunk@4846 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 02 Jul 2012 09:11:43 +0000
parents db1bf06012db
children b67af5b44d68
rev   line source
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.client.client.ui;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import java.util.List;
2931
d6983b78de45 Export panel: Make code more robust when trying to resolve missing i18n strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1356
diff changeset
4 import java.util.MissingResourceException;
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 import com.google.gwt.core.client.GWT;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 import com.smartgwt.client.widgets.Canvas;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 import com.smartgwt.client.widgets.Label;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 import com.smartgwt.client.widgets.layout.HLayout;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import com.smartgwt.client.widgets.layout.VLayout;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 import de.intevation.flys.client.shared.model.Collection;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 import de.intevation.flys.client.shared.model.ExportMode;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 import de.intevation.flys.client.shared.model.Facet;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 import de.intevation.flys.client.client.Config;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 import de.intevation.flys.client.client.FLYSConstants;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 /**
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 * A panel that displays an download icon for all available export modes of a
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 * Collection.
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 *
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 */
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 public class ExportPanel extends VLayout {
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 /** The message class that provides i18n strings.*/
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 protected Collection c;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 protected List<ExportMode> exports;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 /** This layout will store a list of available export types.*/
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 protected HLayout container;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 public ExportPanel(Collection c, List<ExportMode> exports) {
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 super();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 this.c = c;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 this.exports = exports;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 this.container = new HLayout();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45 Label title = new Label(MSG.dataexport());
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 title.setHeight(15);
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 title.setStyleName("fontNormalSmallUnderlined");
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 addMember(title);
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 addMember(createExportItems());
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51
277
50b88b641be6 Changed the height of the export panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 275
diff changeset
52 setHeight(45);
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 setMembersMargin(5);
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54 }
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 /**
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58 * This method is used to create an item (created by createExportButton) for
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 * each facet for each export mode.
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 *
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 * @return a horizontal list of buttons.
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62 */
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 protected HLayout createExportItems() {
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 HLayout layout = new HLayout();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66 for (ExportMode mode: exports) {
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67 String name = mode.getName();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 List<Facet> facets = mode.getFacets();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 for (Facet facet: facets) {
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 layout.addMember(createExportButton(name, facet.getName()));
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 }
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73 }
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 return layout;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76 }
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 /**
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 * This method is used to create a button (with click handler) for a
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81 * concrete export mode / type.
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82 *
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 * @param name The name of the export.
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84 * @param facet The name of the export type (e.g. CSV, WST).
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85 *
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
86 * @return an image with click handler.
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
87 */
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
88 protected Canvas createExportButton(String name, String facet) {
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
89 String url = getExportUrl(name, facet);
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
90 String iUrl = GWT.getHostPageBaseURL() + MSG.imageSave();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
91
1343
0d3d3860beb5 Added a ImgLink class which creates an html link with an image.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 433
diff changeset
92 ImgLink link = new ImgLink(iUrl, url, 30, 30);
0d3d3860beb5 Added a ImgLink class which creates an html link with an image.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 433
diff changeset
93 link.setTooltip(getTooltipText(name, facet));
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
94
1343
0d3d3860beb5 Added a ImgLink class which creates an html link with an image.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 433
diff changeset
95 return link;
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
96 }
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
97
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
98
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
99 /**
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
100 * Creates the URL used to trigger an export.
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
101 *
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
102 * @param name The name of the export.
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
103 * @param facet The name of the export type (e.g. CSV, WST).
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
104 *
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
105 * @return the export URL.
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
106 */
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
107 protected String getExportUrl(String name, String facet) {
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
108 Config config = Config.getInstance();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
109
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
110 String url = GWT.getModuleBaseURL();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
111 url += "export";
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
112 url += "?uuid=" + c.identifier();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
113 url += "&mode=" + name;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114 url += "&type=" + facet;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
115 url += "&server=" + config.getServerUrl();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
116 url += "&locale=" + config.getLocale();
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
117
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
118 return url;
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
119 }
433
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
120
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
121
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
122 /**
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
123 * Creates a text used as tooltip for a specific export and type.
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
124 *
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
125 * @param name The name of the export.
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
126 * @param facet The name of the export type (e.g. CSV, WST).
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
127 *
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
128 * @return a tooltip text.
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
129 */
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
130 protected String getTooltipText(String name, String facet) {
2931
d6983b78de45 Export panel: Make code more robust when trying to resolve missing i18n strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1356
diff changeset
131 try {
d6983b78de45 Export panel: Make code more robust when trying to resolve missing i18n strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1356
diff changeset
132 return MSG.getString(name) + " | " + MSG.getString(facet);
d6983b78de45 Export panel: Make code more robust when trying to resolve missing i18n strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1356
diff changeset
133 }
d6983b78de45 Export panel: Make code more robust when trying to resolve missing i18n strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1356
diff changeset
134 catch (MissingResourceException mre) {
d6983b78de45 Export panel: Make code more robust when trying to resolve missing i18n strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1356
diff changeset
135 return name + " | " + facet;
d6983b78de45 Export panel: Make code more robust when trying to resolve missing i18n strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1356
diff changeset
136 }
433
ad2c4fb17318 Adjusted the width of an export button and added a tooltip to distinguish different exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
137 }
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
138 }
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
139 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org