comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/StyleEditorWindow.java @ 1287:95ecb98c6015

Added skeleton for editor window. flys-client/trunk@2873 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 30 Sep 2011 13:42:00 +0000
parents
children f4deeafa60b3
comparison
equal deleted inserted replaced
1286:b643622d77fe 1287:95ecb98c6015
1 package de.intevation.flys.client.client.ui.chart;
2
3 import com.google.gwt.core.client.GWT;
4
5 import com.smartgwt.client.widgets.Window;
6 import com.smartgwt.client.widgets.layout.VLayout;
7 import com.smartgwt.client.widgets.layout.HLayout;
8 import com.smartgwt.client.widgets.Button;
9
10 import com.smartgwt.client.widgets.events.ClickEvent;
11 import com.smartgwt.client.widgets.events.ClickHandler;
12
13 import de.intevation.flys.client.shared.model.Collection;
14 import de.intevation.flys.client.shared.model.CollectionItemAttribute;
15 import de.intevation.flys.client.client.ui.CollectionView;
16
17 import de.intevation.flys.client.client.FLYSConstants;
18
19 /**
20 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
21 */
22 public class StyleEditorWindow
23 extends Window
24 implements ClickHandler
25 {
26 /** The interface that provides i18n messages. */
27 protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
28
29 /** The collection */
30 protected Collection collection;
31
32 /** The parent collection view */
33 protected CollectionView view;
34
35 /** The attributes */
36 protected CollectionItemAttribute attributes;
37
38 /** Main layout */
39 protected VLayout layout;
40
41
42 public StyleEditorWindow (
43 Collection collection,
44 CollectionItemAttribute attributes)
45 {
46 this.collection = collection;
47 this.attributes = attributes;
48 this.layout = new VLayout();
49
50 init();
51 initPanels();
52 }
53
54
55 protected void init() {
56 setTitle(MSG.properties());
57 setWidth(250);
58
59 setCanDragReposition(true);
60 setCanDragResize(true);
61 setKeepInParentRect(true);
62
63 layout.setWidth100();
64 layout.setHeight100();
65
66 }
67
68
69 protected void initPanels() {
70 HLayout buttons = new HLayout();
71 Button accept = new Button(MSG.label_ok());
72 Button cancel = new Button(MSG.label_cancel());
73 cancel.addClickHandler(this);
74
75
76 buttons.addMember(accept);
77 buttons.addMember(cancel);
78 layout.addMember(buttons);
79
80 addItem(layout);
81 }
82
83
84 public void setCollectionView (CollectionView view) {
85 this.view = view;
86 setParentElement(this.view.getParentElement());
87 }
88
89
90 public void onClick(ClickEvent event) {
91 this.hide();
92 }
93 }

http://dive4elements.wald.intevation.org