Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/shared/model/PropertyGroup.java @ 1465:d0bcf5ba7adf
Create the properties dialog content dynamically based on the properties read
from describe collection document.
flys-client/trunk@3505 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 21 Dec 2011 10:53:02 +0000 |
parents | 14ce1c2a9f6c |
children | 3304608baf35 |
rev | line source |
---|---|
1439
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.shared.model; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
3 import java.util.List; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
4 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 /** |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
6 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 */ |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 public class PropertyGroup implements Property { |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
9 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 /** The group name */ |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 protected String name; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 protected List<Property> properties; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 public PropertyGroup() { |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
17 } |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 public PropertyGroup(String name) { |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 this.name = name; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 } |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 public PropertyGroup(String name, List<Property> properties) { |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 this.name = name; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 this.properties = properties; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 } |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 public String getName() { |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 return this.name; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
30 } |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
31 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
32 public void setName(String name) { |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
33 this.name = name; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
34 } |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
35 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 public List<Property> getProperties() { |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 return this.properties; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 } |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 public void setProperties(List<Property> properties) { |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 this.properties = properties; |
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 } |
1465
d0bcf5ba7adf
Create the properties dialog content dynamically based on the properties read
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1463
diff
changeset
|
43 |
d0bcf5ba7adf
Create the properties dialog content dynamically based on the properties read
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1463
diff
changeset
|
44 public Property getPropertyByName(String name) { |
d0bcf5ba7adf
Create the properties dialog content dynamically based on the properties read
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1463
diff
changeset
|
45 for (int i = 0; i < properties.size(); i++) { |
d0bcf5ba7adf
Create the properties dialog content dynamically based on the properties read
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1463
diff
changeset
|
46 if (properties.get(i).getName().equals(name)) { |
d0bcf5ba7adf
Create the properties dialog content dynamically based on the properties read
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1463
diff
changeset
|
47 return properties.get(i); |
d0bcf5ba7adf
Create the properties dialog content dynamically based on the properties read
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1463
diff
changeset
|
48 } |
d0bcf5ba7adf
Create the properties dialog content dynamically based on the properties read
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1463
diff
changeset
|
49 } |
d0bcf5ba7adf
Create the properties dialog content dynamically based on the properties read
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1463
diff
changeset
|
50 return null; |
d0bcf5ba7adf
Create the properties dialog content dynamically based on the properties read
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1463
diff
changeset
|
51 } |
1439
4df2d9a4b9b4
Added interfaces and container for output settings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
52 } |