comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSView.java @ 4:89976499e013

Implemented a ProjectList and added a mockup that displays two collections in that list. flys-client/trunk@1312 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 10 Feb 2011 14:52:49 +0000
parents 0e22a19852e7
children e2b3966b40ca
comparison
equal deleted inserted replaced
3:9cf5a40b62c7 4:89976499e013
1 package de.intevation.flys.client.client.ui; 1 package de.intevation.flys.client.client.ui;
2 2
3 import com.smartgwt.client.widgets.Canvas; 3 import com.smartgwt.client.widgets.Canvas;
4 import com.smartgwt.client.widgets.Label; 4 import com.smartgwt.client.widgets.layout.HLayout;
5 5
6 6
7 /** 7 /**
8 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 8 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
9 */ 9 */
10 public class FLYSView extends Canvas { 10 public class FLYSView extends Canvas {
11 11
12 /** The project list displaying the projects of a user.*/
13 protected ProjectList projectList;
14
15 /** The layout provided by this widget.*/
16 protected HLayout layout;
17
18
19 /**
20 * The default constructor for creating a new empty FLYSView. After creating
21 * the components, {@link init()} is called to do the layout work.
22 */
12 public FLYSView() { 23 public FLYSView() {
24 layout = new HLayout();
25
13 init(); 26 init();
14 } 27 }
15 28
16 29
30 /**
31 * This method is called to do the layout work.
32 */
17 protected void init() { 33 protected void init() {
18 setWidth("100%"); 34 setWidth("100%");
19 setHeight("*"); 35 setHeight("*");
20 36
21 setBorder("1px solid #808080"); 37 setBorder("1px solid #808080");
22 setBackgroundColor("#C3D9FF"); 38 setBackgroundColor("#C3D9FF");
23 39
24 addChild(new Label("Hello Content!")); 40 addChild(layout);
41 }
42
43
44 /**
45 * Set the current project list. Previous ProjectLists are replaced by the
46 * new one.
47 */
48 public void setProjectList(ProjectList projectList) {
49 if (this.projectList != null) {
50 removeChild(this.projectList);
51 }
52
53 this.projectList = projectList;
54 layout.addMember(this.projectList);
25 } 55 }
26 } 56 }
27 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 57 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org