comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java @ 527:902609b5cc79

Added a navigation panel to the bottom of the theme control panel to move themes up/down (function not implemented yet). flys-client/trunk@2007 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 25 May 2011 16:23:16 +0000
parents 96e60e0a4345
children 39d9291513cc
comparison
equal deleted inserted replaced
526:96e60e0a4345 527:902609b5cc79
1 package de.intevation.flys.client.client.ui.chart; 1 package de.intevation.flys.client.client.ui.chart;
2 2
3 import com.google.gwt.core.client.GWT; 3 import com.google.gwt.core.client.GWT;
4 import com.google.gwt.user.client.rpc.AsyncCallback; 4 import com.google.gwt.user.client.rpc.AsyncCallback;
5 5
6 import com.smartgwt.client.types.Alignment;
6 import com.smartgwt.client.types.ListGridFieldType; 7 import com.smartgwt.client.types.ListGridFieldType;
7 import com.smartgwt.client.util.SC; 8 import com.smartgwt.client.util.SC;
8 import com.smartgwt.client.widgets.Canvas; 9 import com.smartgwt.client.widgets.Canvas;
9 import com.smartgwt.client.widgets.grid.events.EditCompleteEvent; 10 import com.smartgwt.client.widgets.grid.events.EditCompleteEvent;
10 import com.smartgwt.client.widgets.grid.events.EditCompleteHandler; 11 import com.smartgwt.client.widgets.grid.events.EditCompleteHandler;
19 import de.intevation.flys.client.shared.model.Theme; 20 import de.intevation.flys.client.shared.model.Theme;
20 import de.intevation.flys.client.shared.model.ThemeList; 21 import de.intevation.flys.client.shared.model.ThemeList;
21 22
22 import de.intevation.flys.client.client.Config; 23 import de.intevation.flys.client.client.Config;
23 import de.intevation.flys.client.client.FLYSConstants; 24 import de.intevation.flys.client.client.FLYSConstants;
25 import de.intevation.flys.client.client.event.OnMoveEvent;
26 import de.intevation.flys.client.client.event.OnMoveHandler;
24 import de.intevation.flys.client.client.services.CollectionAttributeService; 27 import de.intevation.flys.client.client.services.CollectionAttributeService;
25 import de.intevation.flys.client.client.services.CollectionAttributeServiceAsync; 28 import de.intevation.flys.client.client.services.CollectionAttributeServiceAsync;
26 29
27 30
28 /** 31 /**
29 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 32 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
30 */ 33 */
31 public class ChartThemePanel extends Canvas implements EditCompleteHandler { 34 public class ChartThemePanel
32 35 extends Canvas
36 implements EditCompleteHandler, OnMoveHandler
37 {
33 /** The interface that provides i18n messages. */ 38 /** The interface that provides i18n messages. */
34 private FLYSConstants MSG = GWT.create(FLYSConstants.class); 39 private FLYSConstants MSG = GWT.create(FLYSConstants.class);
35 40
36 41
37 /** The service that is used to modify collection attributes.*/ 42 /** The service that is used to modify collection attributes.*/
46 protected Collection collection; 51 protected Collection collection;
47 52
48 protected OutputMode mode; 53 protected OutputMode mode;
49 54
50 protected ListGrid list; 55 protected ListGrid list;
56
57 protected ThemeNavigationPanel navigation;
51 58
52 59
53 60
54 public ChartThemePanel(Collection collection, OutputMode mode) { 61 public ChartThemePanel(Collection collection, OutputMode mode) {
55 this.collection = collection; 62 this.collection = collection;
56 this.mode = mode; 63 this.mode = mode;
57 this.list = new ListGrid(); 64 this.list = new ListGrid();
65 this.navigation = new ThemeNavigationPanel();
66 this.navigation.addOnMoveHandler(this);
58 67
59 initGrid(); 68 initGrid();
60 initLayout(); 69 initLayout();
61 70
62 updateGrid(); 71 updateGrid();
73 VLayout layout = new VLayout(); 82 VLayout layout = new VLayout();
74 layout.setWidth100(); 83 layout.setWidth100();
75 layout.setHeight100(); 84 layout.setHeight100();
76 85
77 layout.addMember(list); 86 layout.addMember(list);
87 layout.addMember(navigation);
78 88
79 addChild(layout); 89 addChild(layout);
80 } 90 }
81 91
82 92
241 public void onSuccess(Collection collection) { 251 public void onSuccess(Collection collection) {
242 setCollection(collection); 252 setCollection(collection);
243 } 253 }
244 }); 254 });
245 } 255 }
256
257
258 public void onMove(OnMoveEvent event) {
259 GWT.log("ChartThemePanel.onMove: " + event.getType());
260
261 // TODO IMPLEMENT ME
262 }
246 } 263 }
247 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 264 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org