annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java @ 2927:f978058dc835

Nicen Manual WSP editor. flys-client/trunk@4825 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 28 Jun 2012 14:50:05 +0000
parents 59491a730461
children a805118fffa6
rev   line source
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.client.client.ui.chart;
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import com.google.gwt.core.client.GWT;
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 import com.smartgwt.client.widgets.Button;
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
6 import com.smartgwt.client.widgets.Canvas;
543
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
7 import com.smartgwt.client.widgets.ImgButton;
534
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
8 import com.smartgwt.client.widgets.Label;
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 import com.smartgwt.client.widgets.events.ClickEvent;
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 import com.smartgwt.client.widgets.events.ClickHandler;
2452
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
11 import com.smartgwt.client.widgets.events.ResizedEvent;
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
12 import com.smartgwt.client.widgets.events.ResizedHandler;
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 import de.intevation.flys.client.client.FLYSConstants;
2431
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
15 import de.intevation.flys.client.client.event.ZoomEvent;
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
16 import de.intevation.flys.client.client.event.ZoomHandler;
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
17 import de.intevation.flys.client.client.ui.ImgLink;
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1350
diff changeset
18 import de.intevation.flys.client.client.ui.Toolbar;
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 /**
1540
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
22 * Toolbar with buttons/icons to open datacage, switch to zoom mode, zoom out
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
23 * etc.
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
24 *
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 */
2431
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
27 public class ChartToolbar extends Toolbar implements ZoomHandler {
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 protected static FLYSConstants MSG = GWT.create(FLYSConstants.class);
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 public static final int PANEL_HEIGHT = 30;
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
534
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
33 protected ChartOutputTab chartTab;
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34
534
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
35 protected Button datacage;
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
36
2431
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
37 protected ImgLink downloadPNG;
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
38
2431
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
39 protected ImgLink downloadPDF;
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
40
2431
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
41 protected ImgLink downloadSVG;
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
42
1587
45cd2364adad Issue 466.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1568
diff changeset
43 protected Canvas downloadCSV;
45cd2364adad Issue 466.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1568
diff changeset
44
534
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
45 protected MousePositionPanel position;
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
46
540
a866cdf1ca40 Implemented a zoombox control and added it to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 539
diff changeset
47 protected ZoomboxControl zoombox;
a866cdf1ca40 Implemented a zoombox control and added it to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 539
diff changeset
48
543
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
49 protected ImgButton zoomToMaxExtent;
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
50
1281
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
51 protected ImgButton historyBack;
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
52
544
0f4095a522ab Added a zoom-out control to the chart toolbar which zooms 10% of the current ranges out.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 543
diff changeset
53 protected ImgButton zoomOut;
0f4095a522ab Added a zoom-out control to the chart toolbar which zooms 10% of the current ranges out.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 543
diff changeset
54
1429
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
55 protected ImgButton chartProperties;
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
56
1541
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
57 protected Button addPoints;
1540
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
58
2925
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
59 protected Button addWSP;
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
60
552
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
61 protected PanControl panControl;
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
62
534
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
63
1545
2f0150f21e77 Added basic UI to enter manual points.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1541
diff changeset
64 /** @param chartTab Output-Tab on which this toolbar is located. */
2f0150f21e77 Added basic UI to enter manual points.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1541
diff changeset
65 public ChartToolbar(ChartOutputTab chartTab) {
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1350
diff changeset
66 super(chartTab);
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67
538
75df57220104 Adapted the MousePositionPanel to use the Transform2D object for computing the chart coordinates from image coordinates.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 534
diff changeset
68 this.chartTab = chartTab;
543
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
69 datacage = new Button(MSG.databasket());
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
70 position = new MousePositionPanel(chartTab);
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
71 zoombox = new ZoomboxControl(chartTab, MSG.zoom_in());
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
72 zoomToMaxExtent = new ImgButton();
544
0f4095a522ab Added a zoom-out control to the chart toolbar which zooms 10% of the current ranges out.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 543
diff changeset
73 zoomOut = new ImgButton();
1281
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
74 historyBack = new ImgButton();
552
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
75 panControl = new PanControl(chartTab, MSG.pan());
1429
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
76 chartProperties = new ImgButton();
1558
eff394f9714a Fix i18n issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1551
diff changeset
77 addPoints = new Button(MSG.points());
1541
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
78
2925
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
79 if (this.chartTab.getMode().getName().equals("cross_section")) {
2926
59491a730461 New i18n for WSP editor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2925
diff changeset
80 addWSP = new Button(MSG.addWSPButton());
2927
f978058dc835 Nicen Manual WSP editor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2926
diff changeset
81 addWSP.setTooltip(MSG.addWSPTooltip());
2925
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
82 final ChartOutputTab finalChartTab = chartTab;
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
83 addWSP.addClickHandler(new ClickHandler() {
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
84 public void onClick(ClickEvent ce) {
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
85 new ManualWSPEditor(finalChartTab.getView().getCollection(),
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
86 finalChartTab, finalChartTab.getMode().getName()).show();
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
87 }});
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
88 }
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
89
1541
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
90 addPoints.addClickHandler(new ClickHandler() {
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
91 public void onClick(ClickEvent event) {
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
92 openPointWindow();
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
93 }
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
94 });
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
95 addPoints.setTooltip(MSG.addPointsTooltip());
538
75df57220104 Adapted the MousePositionPanel to use the Transform2D object for computing the chart coordinates from image coordinates.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 534
diff changeset
96
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
97 datacage.addClickHandler(new ClickHandler() {
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
98 public void onClick(ClickEvent event) {
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
99 GWT.log("Clicked 'datacage' button.");
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1350
diff changeset
100 openDatacageWindow((ChartOutputTab) getOutputTab());
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
101 }
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
102 });
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
103
543
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
104 String baseUrl = GWT.getHostPageBaseURL();
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
105
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
106 downloadPNG = new ImgLink(
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1364
diff changeset
107 baseUrl + MSG.downloadPNG(),
1484
cb5ab84505b7 Set the chart export size to -1, so that the FLYS server is able to distinguish between an export and the query to display a chart.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1429
diff changeset
108 chartTab.getExportUrl(-1, -1, "png"),
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
109 20,
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
110 20);
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
111 downloadPNG.setTooltip(MSG.downloadPNGTooltip());
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
112
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
113 downloadPDF = new ImgLink(
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1364
diff changeset
114 baseUrl + MSG.downloadPDF(),
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
115 chartTab.getExportUrl(1280, 1024, "pdf"),
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
116 20,
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
117 20);
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
118 downloadPDF.setTooltip(MSG.downloadPDFTooltip());
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
119
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
120 downloadSVG = new ImgLink(
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1364
diff changeset
121 baseUrl + MSG.downloadSVG(),
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
122 chartTab.getExportUrl(1280, 1024, "svg"),
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
123 20,
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
124 20);
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
125 downloadSVG.setTooltip(MSG.downloadSVGTooltip());
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
126
1587
45cd2364adad Issue 466.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1568
diff changeset
127 downloadCSV = new ImgLink(
45cd2364adad Issue 466.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1568
diff changeset
128 baseUrl + MSG.downloadCSV(),
45cd2364adad Issue 466.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1568
diff changeset
129 chartTab.getExportUrl(-1, -1, "csv"),
45cd2364adad Issue 466.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1568
diff changeset
130 20,
45cd2364adad Issue 466.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1568
diff changeset
131 20);
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
132 downloadCSV.setTooltip(MSG.downloadCSVTooltip());
1587
45cd2364adad Issue 466.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1568
diff changeset
133
543
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
134 zoomToMaxExtent.setSrc(baseUrl + MSG.zoom_all());
1540
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
135 adjustImageButton(zoomToMaxExtent);
543
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
136 zoomToMaxExtent.addClickHandler(new ClickHandler() {
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
137 public void onClick(ClickEvent event) {
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
138 getChartOutputTab().resetRanges();
2910
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
139 // Relink the export buttons.
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
140 onZoom(null);
543
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
141 }
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
142 });
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
143 zoomToMaxExtent.setTooltip(MSG.zoomToMaxExtentTooltip());
543
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
144
544
0f4095a522ab Added a zoom-out control to the chart toolbar which zooms 10% of the current ranges out.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 543
diff changeset
145 zoomOut.setSrc(baseUrl + MSG.zoom_out());
1540
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
146 adjustImageButton(zoomOut);
544
0f4095a522ab Added a zoom-out control to the chart toolbar which zooms 10% of the current ranges out.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 543
diff changeset
147 zoomOut.addClickHandler(new ClickHandler() {
0f4095a522ab Added a zoom-out control to the chart toolbar which zooms 10% of the current ranges out.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 543
diff changeset
148 public void onClick(ClickEvent event) {
1281
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
149 getChartOutputTab().zoomOut(10);
2910
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
150 // Relink the export buttons.
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
151 onZoom(null);
1281
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
152 }
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
153 });
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
154 zoomOut.setTooltip(MSG.zoomOutTooltip());
1281
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
155
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
156 historyBack.setSrc(baseUrl + MSG.zoom_back());
1540
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
157 adjustImageButton(historyBack);
1281
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
158 historyBack.addClickHandler(new ClickHandler() {
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
159 public void onClick(ClickEvent event) {
1280
66192d170c79 Bugfix: #179 and #198 Zoom-out will no longer work with a factor but with stacked chart extents.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 911
diff changeset
160 getChartOutputTab().zoomOut();
2910
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
161 // Relink the export buttons.
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
162 onZoom(null);
544
0f4095a522ab Added a zoom-out control to the chart toolbar which zooms 10% of the current ranges out.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 543
diff changeset
163 }
0f4095a522ab Added a zoom-out control to the chart toolbar which zooms 10% of the current ranges out.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 543
diff changeset
164 });
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
165 historyBack.setTooltip(MSG.historyBackTooltip());
544
0f4095a522ab Added a zoom-out control to the chart toolbar which zooms 10% of the current ranges out.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 543
diff changeset
166
541
ed29599e06e5 Added the ChartOutputTab as ZoomHandler for the ZoomboxControl - no zooming is done yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 540
diff changeset
167 zoombox.addZoomHandler(chartTab);
2431
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
168 zoombox.addZoomHandler(this);
552
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
169 zoombox.addClickHandler(new ClickHandler() {
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
170 public void onClick(ClickEvent event) {
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
171 panControl.deselect();
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
172 }
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
173 });
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
174 zoombox.setTooltip(MSG.zoomboxTooltip());
552
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
175
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
176 panControl.addPanHandler(chartTab);
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
177 panControl.addClickHandler(new ClickHandler() {
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
178 public void onClick(ClickEvent event) {
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
179 zoombox.deselect();
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
180 }
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
181 });
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
182 panControl.setTooltip(MSG.panControlTooltip());
541
ed29599e06e5 Added the ChartOutputTab as ZoomHandler for the ZoomboxControl - no zooming is done yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 540
diff changeset
183
1429
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
184 chartProperties.setSrc(baseUrl + MSG.properties_ico());
1540
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
185 adjustImageButton(chartProperties);
1429
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
186 chartProperties.addClickHandler(new ClickHandler() {
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
187 public void onClick(ClickEvent event) {
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
188 openPropertiesEditor();
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
189 }
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
190 });
2545
f25a3eb9785d Issue 671.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2479
diff changeset
191 chartProperties.setTooltip(MSG.chartPropertiesTooltip());
1541
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
192
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
193 initLayout();
2452
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
194 addResizedHandler(new ResizedHandler() {
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
195 public void onResized(ResizedEvent e) {
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
196 if (getVisibleWidth() < 740) {
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
197 setHeight(55);
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
198 }
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
199 else {
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
200 setHeight(40);
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
201 }
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
202 }
0235cdb62c98 Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2431
diff changeset
203 });
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
204 }
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
205
1540
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
206 /** Set width, height and other properties of an imagebutton. */
1541
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
207 public void adjustImageButton(ImgButton imgButton) {
1540
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
208 imgButton.setWidth(20);
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
209 imgButton.setHeight(20);
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
210 imgButton.setShowDown(false);
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
211 imgButton.setShowRollOver(false);
2471
a1ff911e8365 Replaced FLYS specific icon set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2452
diff changeset
212 imgButton.setShowRollOverIcon(false);
1540
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
213 imgButton.setShowDisabled(false);
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
214 imgButton.setShowDisabledIcon(true);
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
215 imgButton.setShowDownIcon(false);
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
216 imgButton.setShowFocusedIcon(false);
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
217 }
cd88a257a5e6 Minor refactoring.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1484
diff changeset
218
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
219
543
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
220 public ChartOutputTab getChartOutputTab() {
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
221 return chartTab;
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
222 }
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
223
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
224
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
225 protected void initLayout() {
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
226 setWidth100();
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
227 setHeight(PANEL_HEIGHT);
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
228 setMembersMargin(10);
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
229 setPadding(5);
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
230 setBorder("1px solid black");
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
231
534
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
232 Label spacer = new Label();
539
fea93eebd2fa Improved the layout of the mouse position panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 538
diff changeset
233 spacer.setWidth("*");
534
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
234 datacage.setWidth("95px");
538
75df57220104 Adapted the MousePositionPanel to use the Transform2D object for computing the chart coordinates from image coordinates.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 534
diff changeset
235 position.setWidth("200px");
534
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
236
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
237 addMember(datacage);
1344
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
238 addMember(downloadPNG);
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
239 addMember(downloadPDF);
51d4b51a51ed Added icons to export chart as PNG, PDF and SVG to the ChartToolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1281
diff changeset
240 addMember(downloadSVG);
1587
45cd2364adad Issue 466.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1568
diff changeset
241 addMember(downloadCSV);
543
9c2cf4811a7d Added a control to reset the zoom of a chart. In addition, the zoom buttons are displayed as ImgButtons now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 541
diff changeset
242 addMember(zoomToMaxExtent);
1281
4782c0ce9cec Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1280
diff changeset
243 addMember(historyBack);
544
0f4095a522ab Added a zoom-out control to the chart toolbar which zooms 10% of the current ranges out.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 543
diff changeset
244 addMember(zoomOut);
540
a866cdf1ca40 Implemented a zoombox control and added it to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 539
diff changeset
245 addMember(zoombox);
552
6050d49eaba3 Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 544
diff changeset
246 addMember(panControl);
1429
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
247 addMember(chartProperties);
1541
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
248 addMember(addPoints);
2925
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
249
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
250 if (this.chartTab.getMode().getName().equals("cross_section")) {
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
251 addMember(addWSP);
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
252 }
6461b8dbe093 Added basic GUI for manual WSPs in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2910
diff changeset
253
534
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
254 addMember(spacer);
e08777967bad Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 533
diff changeset
255 addMember(position);
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
256 }
1429
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
257
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
258 /**
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
259 * Open the chart property editor dialog.
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
260 */
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
261 protected void openPropertiesEditor() {
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
262 ChartPropertiesEditor editor =
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
263 new ChartPropertiesEditor(getChartOutputTab());
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
264 editor.show();
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
265 }
16b7adc66330 Added stub for chart property editor.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1401
diff changeset
266
1541
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
267
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
268 /** Open editor for custom points. */
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
269 protected void openPointWindow() {
2479
057021593625 Issue 494.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2471
diff changeset
270 if (this.chartTab.getMode().getName().equals("historical_discharge")) {
057021593625 Issue 494.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2471
diff changeset
271 new ManualDatePointsEditor(chartTab.getView().getCollection(),
057021593625 Issue 494.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2471
diff changeset
272 this.chartTab, this.chartTab.getMode().getName()).show();
057021593625 Issue 494.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2471
diff changeset
273 }
057021593625 Issue 494.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2471
diff changeset
274 else {
057021593625 Issue 494.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2471
diff changeset
275 new ManualPointsEditor(chartTab.getView().getCollection(),
057021593625 Issue 494.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2471
diff changeset
276 this.chartTab, this.chartTab.getMode().getName()).show();
057021593625 Issue 494.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2471
diff changeset
277 }
1541
959e1d0df941 Fixed typo, more stub for add points ui.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1540
diff changeset
278 }
2431
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
279
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
280
2910
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
281 /**
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
282 * Sets new sources to the export button/images, such that the
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
283 * correct zoom values are included in the request when clicked.
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
284 * @param evt ignored.
ab0014c58ecb Fix zoom/export issue665, issue459, issue667.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2545
diff changeset
285 */
2431
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
286 public void onZoom(ZoomEvent evt) {
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
287 downloadPNG.setSource(chartTab.getExportUrl(-1, -1, "png"));
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
288 downloadPDF.setSource(chartTab.getExportUrl(-1, -1, "pdf"));
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
289 downloadSVG.setSource(chartTab.getExportUrl(-1, -1, "svg"));
90c339e26a0a #459 Take the current zoom into account for chart exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1587
diff changeset
290 }
533
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
291 }
34103ab9fe60 Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
292 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org