comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/ChartOutputTab.java @ 267:7e484390d191

ISSUE-48 Added placeholder for the toolbar and the theme control in the chart output tab. flys-client/trunk@1888 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 10 May 2011 16:49:15 +0000
parents 6838e4112eeb
children f4c8ce11df33
comparison
equal deleted inserted replaced
266:e3565f58b0ae 267:7e484390d191
4 4
5 import com.google.gwt.core.client.GWT; 5 import com.google.gwt.core.client.GWT;
6 6
7 import com.smartgwt.client.widgets.Canvas; 7 import com.smartgwt.client.widgets.Canvas;
8 import com.smartgwt.client.widgets.Img; 8 import com.smartgwt.client.widgets.Img;
9 import com.smartgwt.client.widgets.Label;
9 import com.smartgwt.client.widgets.layout.HLayout; 10 import com.smartgwt.client.widgets.layout.HLayout;
11 import com.smartgwt.client.widgets.layout.VLayout;
10 12
11 import de.intevation.flys.client.shared.model.Collection; 13 import de.intevation.flys.client.shared.model.Collection;
12 import de.intevation.flys.client.shared.model.OutputMode; 14 import de.intevation.flys.client.shared.model.OutputMode;
13 import de.intevation.flys.client.client.Config; 15 import de.intevation.flys.client.client.Config;
14 16
15 17
16 /** 18 /**
17 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 19 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
18 */ 20 */
19 public class ChartOutputTab extends OutputTab { 21 public class ChartOutputTab extends OutputTab {
22
23 /** The canvas that wraps the chart toolbar.*/
24 protected Canvas tbarPanel;
20 25
21 /** The canvas that wraps the theme editor.*/ 26 /** The canvas that wraps the theme editor.*/
22 protected Canvas left; 27 protected Canvas left;
23 28
24 /** The canvas that wraps the chart.*/ 29 /** The canvas that wraps the chart.*/
33 * @param mode The OutputMode. 38 * @param mode The OutputMode.
34 */ 39 */
35 public ChartOutputTab(String title, Collection collection, OutputMode mode){ 40 public ChartOutputTab(String title, Collection collection, OutputMode mode){
36 super(title, collection, mode); 41 super(title, collection, mode);
37 42
38 left = new Canvas(); 43 tbarPanel = new Canvas();
39 right = new Canvas(); 44 left = new Canvas();
45 right = new Canvas();
40 46
47 tbarPanel.setBorder("1px solid black");
48 tbarPanel.setHeight(25);
49 left.setBorder("1px solid black");
41 left.setWidth("25%"); 50 left.setWidth("25%");
42 right.setWidth("*"); 51 right.setWidth("*");
52
53 VLayout vLayout = new VLayout();
54 vLayout.setMembersMargin(2);
43 55
44 HLayout hLayout = new HLayout(); 56 HLayout hLayout = new HLayout();
45 hLayout.setWidth100(); 57 hLayout.setWidth100();
46 hLayout.setHeight100(); 58 hLayout.setHeight100();
47 hLayout.setMembersMargin(10); 59 hLayout.setMembersMargin(10);
48 60
49 hLayout.addMember(left); 61 hLayout.addMember(left);
50 hLayout.addMember(right); 62 hLayout.addMember(right);
51 63
64 right.addChild(createChartPanel());
65 left.addChild(createThemeControlPanel());
66 tbarPanel.addChild(createTBarPanel());
67
68 vLayout.addMember(tbarPanel);
69 vLayout.addMember(hLayout);
70
71 setPane(vLayout);
72 }
73
74
75 protected Canvas createTBarPanel() {
76 Label label = new Label("Werkzeugleiste");
77 label.setHeight(25);
78 label.setMargin(5);
79
80 return label;
81 }
82
83
84 protected Canvas createChartPanel() {
52 Img chart = getChartImg(); 85 Img chart = getChartImg();
53 chart.setWidth100(); 86 chart.setWidth100();
54 chart.setHeight100(); 87 chart.setHeight100();
55 88
56 right.addChild(chart); 89 return chart;
90 }
57 91
58 setPane(hLayout); 92
93 protected Canvas createThemeControlPanel() {
94 Label label = new Label("Themensteuerung");
95 label.setHeight(25);
96 label.setMargin(5);
97
98 return label;
59 } 99 }
60 100
61 101
62 /** 102 /**
63 * Builds the chart image and returns it. 103 * Builds the chart image and returns it.

http://dive4elements.wald.intevation.org