comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java @ 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. flys-client/trunk@2003 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 25 May 2011 13:42:04 +0000
parents 0785a8ba5e6d
children 96e60e0a4345
comparison
equal deleted inserted replaced
523:0785a8ba5e6d 524:ba238f917b94
15 15
16 import de.intevation.flys.client.shared.model.Collection; 16 import de.intevation.flys.client.shared.model.Collection;
17 import de.intevation.flys.client.shared.model.Facet; 17 import de.intevation.flys.client.shared.model.Facet;
18 import de.intevation.flys.client.shared.model.FacetRecord; 18 import de.intevation.flys.client.shared.model.FacetRecord;
19 import de.intevation.flys.client.shared.model.OutputMode; 19 import de.intevation.flys.client.shared.model.OutputMode;
20 import de.intevation.flys.client.shared.model.Theme;
21 import de.intevation.flys.client.shared.model.ThemeList;
20 22
21 import de.intevation.flys.client.client.FLYSConstants; 23 import de.intevation.flys.client.client.FLYSConstants;
22 24
23 25
24 /** 26 /**
117 * data. 119 * data.
118 */ 120 */
119 protected void updateGrid() { 121 protected void updateGrid() {
120 clearGrid(); 122 clearGrid();
121 123
122 List<Facet> facets = mode.getFacets(); 124 ThemeList themeList = collection.getThemeList(mode.getName());
123 125
124 for (Facet facet: facets) { 126 if (themeList == null) {
125 list.addData(new FacetRecord(facet)); 127 GWT.log("ERROR: No theme list.");
128 return;
129 }
130
131 int count = themeList.getThemeCount();
132
133 for (int i = 1; i <= count; i++) {
134 Theme theme = themeList.getThemeAt(i);
135
136 if (theme == null) {
137 continue;
138 }
139
140 list.addData(new FacetRecord(theme));
126 } 141 }
127 } 142 }
128 143
129 144
130 /** 145 /**

http://dive4elements.wald.intevation.org