Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java @ 1295:d9cb362b8b34
Removed superfluous imports.
flys-client/trunk@2910 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 10 Oct 2011 06:42:28 +0000 |
parents | 4782c0ce9cec |
children | 51d4b51a51ed |
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; |
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
|
6 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
|
7 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
|
8 import com.smartgwt.client.widgets.layout.HLayout; |
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; |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import com.smartgwt.client.widgets.events.CloseClickHandler; |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import com.smartgwt.client.widgets.events.CloseClientEvent; |
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.shared.model.Artifact; |
811
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
552
diff
changeset
|
15 import de.intevation.flys.client.shared.model.User; |
533
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 import de.intevation.flys.client.client.FLYSConstants; |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 import de.intevation.flys.client.client.ui.CollectionView; |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 import de.intevation.flys.client.client.ui.DatacageWindow; |
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 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 /** |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 * @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
|
24 */ |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 public class ChartToolbar extends HLayout { |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 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
|
28 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 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
|
31 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 protected CollectionView view; |
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 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
|
36 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
534
e08777967bad
Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
533
diff
changeset
|
38 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
|
39 |
e08777967bad
Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
533
diff
changeset
|
40 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
|
41 |
540
a866cdf1ca40
Implemented a zoombox control and added it to the chart toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
539
diff
changeset
|
42 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
|
43 |
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
|
44 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
|
45 |
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
|
46 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
|
47 |
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
|
48 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
|
49 |
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
|
50 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
|
51 |
534
e08777967bad
Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
533
diff
changeset
|
52 |
e08777967bad
Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
533
diff
changeset
|
53 |
e08777967bad
Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
533
diff
changeset
|
54 public ChartToolbar(CollectionView view, 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
|
55 super(); |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 |
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
|
57 this.view = view; |
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
|
58 this.chartTab = chartTab; |
533
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 |
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
|
60 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
|
61 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
|
62 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
|
63 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
|
64 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
|
65 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
|
66 panControl = new PanControl(chartTab, MSG.pan()); |
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
|
67 |
533
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 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
|
69 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
|
70 GWT.log("Clicked 'datacage' button."); |
811
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
552
diff
changeset
|
71 openDatacageWindow(); |
533
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 } |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 }); |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 |
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
|
75 String baseUrl = GWT.getHostPageBaseURL(); |
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
|
76 zoomToMaxExtent.setSrc(baseUrl + MSG.zoom_all()); |
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
|
77 zoomToMaxExtent.setWidth(20); |
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
|
78 zoomToMaxExtent.setHeight(20); |
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
|
79 zoomToMaxExtent.setShowDown(false); |
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
|
80 zoomToMaxExtent.setShowRollOver(false); |
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
|
81 zoomToMaxExtent.setShowDisabled(false); |
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
|
82 zoomToMaxExtent.setShowDisabledIcon(true); |
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
|
83 zoomToMaxExtent.setShowDownIcon(false); |
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
|
84 zoomToMaxExtent.setShowFocusedIcon(false); |
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
|
85 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
|
86 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
|
87 getChartOutputTab().resetRanges(); |
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
|
88 } |
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
|
89 }); |
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
|
90 |
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
|
91 zoomOut.setSrc(baseUrl + MSG.zoom_out()); |
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
|
92 zoomOut.setWidth(20); |
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
|
93 zoomOut.setHeight(20); |
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
|
94 zoomOut.setShowDown(false); |
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
|
95 zoomOut.setShowRollOver(false); |
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
|
96 zoomOut.setShowDisabled(false); |
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
|
97 zoomOut.setShowDisabledIcon(true); |
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
|
98 zoomOut.setShowDownIcon(false); |
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
|
99 zoomOut.setShowFocusedIcon(false); |
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
|
100 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
|
101 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
|
102 getChartOutputTab().zoomOut(10); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
103 } |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
104 }); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
105 |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
106 historyBack.setSrc(baseUrl + MSG.zoom_back()); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
107 historyBack.setWidth(20); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
108 historyBack.setHeight(20); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
109 historyBack.setShowDown(false); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
110 historyBack.setShowRollOver(false); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
111 historyBack.setShowDisabled(false); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
112 historyBack.setShowDisabledIcon(true); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
113 historyBack.setShowDownIcon(false); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
114 historyBack.setShowFocusedIcon(false); |
4782c0ce9cec
Re-added the function to zoom-out charts by a given factor (10%).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1280
diff
changeset
|
115 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
|
116 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
|
117 getChartOutputTab().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
|
118 } |
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
|
119 }); |
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
|
120 |
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
|
121 zoombox.addZoomHandler(chartTab); |
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
|
122 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
|
123 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
|
124 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
|
125 } |
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
|
126 }); |
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
|
127 |
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
|
128 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
|
129 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
|
130 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
|
131 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
|
132 } |
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
|
133 }); |
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
|
134 |
533
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 initLayout(); |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 } |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
137 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
139 public Artifact getArtifact() { |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 return view.getArtifact(); |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 } |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
142 |
811
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
552
diff
changeset
|
143 public User getUser() { |
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
552
diff
changeset
|
144 return view.getUser(); |
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
552
diff
changeset
|
145 } |
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
552
diff
changeset
|
146 |
533
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
147 |
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
|
148 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
|
149 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
|
150 } |
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
|
151 |
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
|
152 |
533
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
153 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
|
154 setWidth100(); |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
155 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
|
156 setMembersMargin(10); |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
157 setPadding(5); |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
158 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
|
159 |
534
e08777967bad
Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
533
diff
changeset
|
160 Label spacer = new Label(); |
539
fea93eebd2fa
Improved the layout of the mouse position panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
538
diff
changeset
|
161 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
|
162 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
|
163 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
|
164 |
533
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
165 addMember(datacage); |
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
|
166 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
|
167 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
|
168 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
|
169 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
|
170 addMember(panControl); |
534
e08777967bad
Added a first implementation of a MousePositionPanel - work is not finished yet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
533
diff
changeset
|
171 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
|
172 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
|
173 } |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
174 |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
175 |
811
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
552
diff
changeset
|
176 protected void openDatacageWindow() { |
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
552
diff
changeset
|
177 Artifact artifact = getArtifact(); |
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
552
diff
changeset
|
178 User user = getUser(); |
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
552
diff
changeset
|
179 |
883
cd286de8f2ad
Datacage window in Output tabs fetches information for the current output now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
848
diff
changeset
|
180 String outs = chartTab.getOutputName(); |
848
9ecd58f619a4
Moved datacage into a separated widget.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
811
diff
changeset
|
181 |
9ecd58f619a4
Moved datacage into a separated widget.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
811
diff
changeset
|
182 final DatacageWindow dc = new DatacageWindow( |
9ecd58f619a4
Moved datacage into a separated widget.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
811
diff
changeset
|
183 artifact, user, outs, view); |
911
4668357b255e
#259 Refresh charts after loading new Themes / Artifacts from Datacage.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
883
diff
changeset
|
184 dc.addRedrawRequestHandler(chartTab); |
533
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
185 dc.addCloseClickHandler(new CloseClickHandler() { |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
186 public void onCloseClick(CloseClientEvent event) { |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
187 dc.destroy(); |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
188 } |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
189 }); |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
190 dc.show(); |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
191 } |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
192 } |
34103ab9fe60
Moved the toolbar stuff of the chart panel into an own class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
193 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |