Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java @ 1340:290d5687f202
#253 Implemented ThemePanel's 'remove' action.
flys-client/trunk@2990 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 17 Oct 2011 15:00:12 +0000 |
parents | c730f0438510 |
children | c437e4f0f7be |
comparison
equal
deleted
inserted
replaced
1339:d935fd42ae0e | 1340:290d5687f202 |
---|---|
187 int count = themeList.getThemeCount(); | 187 int count = themeList.getThemeCount(); |
188 | 188 |
189 for (int i = 1; i <= count; i++) { | 189 for (int i = 1; i <= count; i++) { |
190 Theme theme = themeList.getThemeAt(i); | 190 Theme theme = themeList.getThemeAt(i); |
191 | 191 |
192 if (theme == null) { | 192 if (theme == null || theme.getVisible() == 0) { |
193 continue; | 193 continue; |
194 } | 194 } |
195 | 195 |
196 list.addData(createRecord(theme)); | 196 list.addData(createRecord(theme)); |
197 } | 197 } |
372 protected MenuItem createRemoveItem(final ListGridRecord[] records) { | 372 protected MenuItem createRemoveItem(final ListGridRecord[] records) { |
373 MenuItem remove = new MenuItem(MSG.removeTheme()); | 373 MenuItem remove = new MenuItem(MSG.removeTheme()); |
374 | 374 |
375 remove.addClickHandler(new ClickHandler() { | 375 remove.addClickHandler(new ClickHandler() { |
376 public void onClick(MenuItemClickEvent evt) { | 376 public void onClick(MenuItemClickEvent evt) { |
377 SC.warn("Currently not implemented"); | |
378 | |
379 for (ListGridRecord record: records) { | 377 for (ListGridRecord record: records) { |
380 FacetRecord facet = (FacetRecord) record; | 378 FacetRecord facet = (FacetRecord) record; |
381 } | 379 |
380 Theme theme = facet.getTheme(); | |
381 theme.setVisible(0); | |
382 theme.setActive(0); | |
383 } | |
384 | |
385 updateCollection(); | |
382 } | 386 } |
383 }); | 387 }); |
384 | 388 |
385 return remove; | 389 return remove; |
386 } | 390 } |