annotate flys-client/src/main/java/de/intevation/flys/client/shared/model/FacetRecord.java @ 3509:bb5edff31866

Cosmetics. flys-client/trunk@5279 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 28 Aug 2012 13:10:14 +0000
parents 98c7a46ec5ae
children db0b9cff8496
rev   line source
523
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.client.shared.model;
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import com.smartgwt.client.widgets.grid.ListGridRecord;
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 /**
3509
bb5edff31866 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2987
diff changeset
6 * ListGridRecord for Facets.
523
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 */
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 public class FacetRecord extends ListGridRecord {
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
855
2c48d75c4ab7 Minor cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 804
diff changeset
11 protected Theme theme;
523
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
524
ba238f917b94 The theme list information stored in the attribute of a collection is read and added in form of Themes and ThemeLists to the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 523
diff changeset
14 public FacetRecord(Theme theme) {
ba238f917b94 The theme list information stored in the attribute of a collection is read and added in form of Themes and ThemeLists to the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 523
diff changeset
15 this.theme = theme;
523
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16
804
374712890b94 Facets read from Collection's DESCRIBE document keep all their attributes after the Collection's attribute has been modified.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 575
diff changeset
17 setActive(theme.getActive() == 1);
575
5277f46a63c2 The description of a facet is now displayed in the ChartThemePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 524
diff changeset
18 setName(theme.getDescription());
523
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 }
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21
524
ba238f917b94 The theme list information stored in the attribute of a collection is read and added in form of Themes and ThemeLists to the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 523
diff changeset
22 public Theme getTheme() {
ba238f917b94 The theme list information stored in the attribute of a collection is read and added in form of Themes and ThemeLists to the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 523
diff changeset
23 return theme;
523
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 }
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26
575
5277f46a63c2 The description of a facet is now displayed in the ChartThemePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 524
diff changeset
27 public void setName(String description) {
523
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 // TODO Add a setter method setName() to Facet
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 // facet.setName(name);
575
5277f46a63c2 The description of a facet is now displayed in the ChartThemePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 524
diff changeset
30 setAttribute("name", description);
523
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 }
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 public String getName() {
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 return getAttribute("name");
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 }
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 public boolean getActive() {
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 return getAttributeAsBoolean("active");
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 }
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 public void setActive(boolean active) {
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45 setAttribute("active", active);
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 }
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 }
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org