Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSView.java @ 1309:a95e82d6bcc1
Refactored the code to create a context menu and a style editor so that it is also available for maps.
flys-client/trunk@2943 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 12 Oct 2011 08:53:17 +0000 |
parents | 17815a7354bc |
children | 6a8f83c538e3 |
rev | line source |
---|---|
1
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.client.ui; |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import com.smartgwt.client.widgets.Canvas; |
4
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
4 import com.smartgwt.client.widgets.layout.HLayout; |
1
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 /** |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 */ |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 public class FLYSView extends Canvas { |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 |
4
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
12 /** The project list displaying the projects of a user.*/ |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
13 protected ProjectList projectList; |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
14 |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
15 /** The workspace that handles the artifact collection views.*/ |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
16 protected FLYSWorkspace workspace; |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
17 |
4
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
18 /** The layout provided by this widget.*/ |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
19 protected HLayout layout; |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
20 |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
21 |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
22 /** |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
23 * The default constructor for creating a new empty FLYSView. After creating |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
24 * the components, {@link init()} is called to do the layout work. |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
25 */ |
1
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 public FLYSView() { |
4
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
27 layout = new HLayout(); |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
28 |
1
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 init(); |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 } |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
4
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
33 /** |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
34 * This method is called to do the layout work. |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
35 */ |
1
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 protected void init() { |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 setWidth("100%"); |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 setHeight("*"); |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 |
79
17815a7354bc
Customized background and ProjectList styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
6
diff
changeset
|
40 setStyleName("bgWhite"); |
1
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 setBorder("1px solid #808080"); |
79
17815a7354bc
Customized background and ProjectList styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
6
diff
changeset
|
42 |
17815a7354bc
Customized background and ProjectList styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
6
diff
changeset
|
43 layout.setHeight("100%"); |
17815a7354bc
Customized background and ProjectList styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
6
diff
changeset
|
44 layout.setWidth("100%"); |
1
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 |
4
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
46 addChild(layout); |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
47 } |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
48 |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
49 |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
50 /** |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
51 * Set the current project list. Previous ProjectLists are replaced by the |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
52 * new one. |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
53 */ |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
54 public void setProjectList(ProjectList projectList) { |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
55 if (this.projectList != null) { |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
56 removeChild(this.projectList); |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
57 } |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
58 |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
59 this.projectList = projectList; |
89976499e013
Implemented a ProjectList and added a mockup that displays two collections in that list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1
diff
changeset
|
60 layout.addMember(this.projectList); |
1
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 } |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
62 |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
63 |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
64 /** |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
65 * Set the current FLYSWorkspace. Previous workspaces are replaced by the |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
66 * new one. |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
67 * |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
68 * @param workspaces The new FLYSWorkspace. |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
69 */ |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
70 public void setFLYSWorkspace(FLYSWorkspace workspace) { |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
71 if (this.workspace != null) { |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
72 removeChild(this.workspace); |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
73 } |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
74 |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
75 this.workspace = workspace; |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
76 layout.addMember(this.workspace); |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
4
diff
changeset
|
77 } |
1
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 } |
0e22a19852e7
Removed useless auto generated classes and added first ui elements with i18n support.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |