comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java @ 2442:49ca36baf4ab

Fix issue621 (areas against removed themes). flys-client/trunk@4110 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 02 Mar 2012 10:26:08 +0000
parents 64e3d4b024b1
children f9a7a5ae914c
comparison
equal deleted inserted replaced
2441:f4001430754f 2442:49ca36baf4ab
346 // Create the "under..." submenu. 346 // Create the "under..." submenu.
347 MenuItem underMenuItem = new MenuItem(MSG.chart_themepanel_area_under()); 347 MenuItem underMenuItem = new MenuItem(MSG.chart_themepanel_area_under());
348 Menu underMenu = new Menu(); 348 Menu underMenu = new Menu();
349 for (int i = 0; i < nThemes; i++) { 349 for (int i = 0; i < nThemes; i++) {
350 final Theme theme = themes.getThemeAt(i+1); 350 final Theme theme = themes.getThemeAt(i+1);
351
352 if (theme.getVisible() == 0) {
353 continue;
354 }
355
351 if (!areAreaCompatible(facetTheme, theme)) { 356 if (!areAreaCompatible(facetTheme, theme)) {
352 continue; 357 continue;
353 } 358 }
359
354 MenuItem againster = new MenuItem(theme.getDescription()); 360 MenuItem againster = new MenuItem(theme.getDescription());
355 underMenu.addItem(againster); 361 underMenu.addItem(againster);
356 362
357 againster.addClickHandler(new ClickHandler() { 363 againster.addClickHandler(new ClickHandler() {
358 public void onClick(MenuItemClickEvent evt) { 364 public void onClick(MenuItemClickEvent evt) {
365 // Create the "over..." submenu. 371 // Create the "over..." submenu.
366 MenuItem overMenuItem = new MenuItem(MSG.chart_themepanel_area_over()); 372 MenuItem overMenuItem = new MenuItem(MSG.chart_themepanel_area_over());
367 Menu overMenu = new Menu(); 373 Menu overMenu = new Menu();
368 for (int i = 0; i < nThemes; i++) { 374 for (int i = 0; i < nThemes; i++) {
369 final Theme theme = themes.getThemeAt(i+1); 375 final Theme theme = themes.getThemeAt(i+1);
376 if (theme.getVisible() == 0) {
377 continue;
378 }
370 if (!areAreaCompatible(facetTheme, theme)) { 379 if (!areAreaCompatible(facetTheme, theme)) {
371 continue; 380 continue;
372 } 381 }
373 MenuItem againster = new MenuItem(theme.getDescription()); 382 MenuItem againster = new MenuItem(theme.getDescription());
374 overMenu.addItem(againster); 383 overMenu.addItem(againster);
393 // Create the "between..." submenu. 402 // Create the "between..." submenu.
394 MenuItem betweenMenuItem = new MenuItem(MSG.chart_themepanel_area_between()); 403 MenuItem betweenMenuItem = new MenuItem(MSG.chart_themepanel_area_between());
395 Menu betweenMenu = new Menu(); 404 Menu betweenMenu = new Menu();
396 for (int i = 0; i < nThemes; i++) { 405 for (int i = 0; i < nThemes; i++) {
397 final Theme theme = themes.getThemeAt(i+1); 406 final Theme theme = themes.getThemeAt(i+1);
407 if (theme.getVisible() == 0) {
408 continue;
409 }
398 if (!areAreaCompatible(facetTheme, theme)) { 410 if (!areAreaCompatible(facetTheme, theme)) {
399 continue; 411 continue;
400 } 412 }
401 MenuItem againster = new MenuItem(theme.getDescription()); 413 MenuItem againster = new MenuItem(theme.getDescription());
402 betweenMenu.addItem(againster); 414 betweenMenu.addItem(againster);

http://dive4elements.wald.intevation.org