Mercurial > dive4elements > river
comparison flys-client/src/main/java/org/dive4elements/river/client/client/ui/FLYSView.java @ 5834:f507086aa94b
Repaired internal references.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:31:32 +0200 |
parents | flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSView.java@6a8f83c538e3 |
children | 821a02bbfb4e |
comparison
equal
deleted
inserted
replaced
5833:a2bdc0f524e8 | 5834:f507086aa94b |
---|---|
1 package de.intevation.flys.client.client.ui; | |
2 | |
3 import com.smartgwt.client.widgets.Canvas; | |
4 import com.smartgwt.client.widgets.layout.HLayout; | |
5 | |
6 | |
7 /** | |
8 * Vertically speaking the main part of the ui (containing projectlist | |
9 * and workspace). | |
10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
11 */ | |
12 public class FLYSView extends Canvas { | |
13 | |
14 /** The project list displaying the projects of a user.*/ | |
15 protected ProjectList projectList; | |
16 | |
17 /** The workspace that handles the artifact collection views.*/ | |
18 protected FLYSWorkspace workspace; | |
19 | |
20 /** The layout provided by this widget.*/ | |
21 protected HLayout layout; | |
22 | |
23 | |
24 /** | |
25 * The default constructor for creating a new empty FLYSView. After creating | |
26 * the components, {@link init()} is called to do the layout work. | |
27 */ | |
28 public FLYSView() { | |
29 layout = new HLayout(); | |
30 | |
31 init(); | |
32 } | |
33 | |
34 | |
35 /** | |
36 * This method is called to do the layout work. | |
37 */ | |
38 protected void init() { | |
39 setWidth("100%"); | |
40 setHeight("*"); | |
41 | |
42 setStyleName("bgWhite"); | |
43 setBorder("1px solid #808080"); | |
44 | |
45 layout.setHeight("100%"); | |
46 layout.setWidth("100%"); | |
47 | |
48 addChild(layout); | |
49 } | |
50 | |
51 | |
52 /** | |
53 * Set the current project list. Previous ProjectLists are replaced by the | |
54 * new one. | |
55 */ | |
56 public void setProjectList(ProjectList projectList) { | |
57 if (this.projectList != null) { | |
58 removeChild(this.projectList); | |
59 } | |
60 | |
61 this.projectList = projectList; | |
62 layout.addMember(this.projectList); | |
63 } | |
64 | |
65 | |
66 /** | |
67 * Set the current FLYSWorkspace. Previous workspaces are replaced by the | |
68 * new one. | |
69 * | |
70 * @param workspaces The new FLYSWorkspace. | |
71 */ | |
72 public void setFLYSWorkspace(FLYSWorkspace workspace) { | |
73 if (this.workspace != null) { | |
74 removeChild(this.workspace); | |
75 } | |
76 | |
77 this.workspace = workspace; | |
78 layout.addMember(this.workspace); | |
79 } | |
80 } | |
81 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |