annotate gwt-client/src/main/java/org/dive4elements/river/client/shared/model/FacetRecord.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-client/src/main/java/org/dive4elements/river/client/shared/model/FacetRecord.java@821a02bbfb4e
children 172338b1407f
rev   line source
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
1 package org.dive4elements.river.client.shared.model;
523
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
4147
db0b9cff8496 Cosmetics, documentation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3509
diff changeset
11 /** Underlying theme. */
855
2c48d75c4ab7 Minor cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 804
diff changeset
12 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
13
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14
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
15 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
16 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
17
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
18 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
19 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
20 }
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22
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
23 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
24 return theme;
523
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
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27
575
5277f46a63c2 The description of a facet is now displayed in the ChartThemePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 524
diff changeset
28 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
29 // 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
30 // 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
31 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
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
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 public String getName() {
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 return getAttribute("name");
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
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 public boolean getActive() {
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 return getAttributeAsBoolean("active");
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
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45 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
46 setAttribute("active", active);
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 }
0785a8ba5e6d Implemented the first step of a theme control panel for charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org