Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java @ 2453:ec120dc6279b
Issue 616.
Deactivate synchron navigation item in context menu for all themes except of
cross sections.
flys-client/trunk@4138 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 13 Mar 2012 15:30:07 +0000 |
parents | 1de15a7bfc59 |
children | d45059aa8507 |
comparison
equal
deleted
inserted
replaced
2452:0235cdb62c98 | 2453:ec120dc6279b |
---|---|
653 */ | 653 */ |
654 @Override | 654 @Override |
655 protected Menu getSingleContextMenu(final ListGridRecord[] records) { | 655 protected Menu getSingleContextMenu(final ListGridRecord[] records) { |
656 Menu contextMenu = super.getSingleContextMenu(records); | 656 Menu contextMenu = super.getSingleContextMenu(records); |
657 | 657 |
658 // Synchron checking. | 658 Theme facetTheme = ((FacetRecord)records[0]).getTheme(); |
659 MenuItem synchronNavigationMenuItem = new MenuItem(); | 659 String item = facetTheme.getFacet(); |
660 if (synchronNavigation == true) { | 660 |
661 // TODO i18n | 661 if(item.equals("cross_section")) { |
662 synchronNavigationMenuItem.setTitle("Einzeln navigieren"); | 662 // Synchron checking. |
663 } | 663 MenuItem synchronNavigationMenuItem = new MenuItem(); |
664 else { | 664 if (synchronNavigation == true) { |
665 // TODO i18n | 665 // TODO i18n |
666 synchronNavigationMenuItem.setTitle("Synchron navigieren"); | 666 synchronNavigationMenuItem.setTitle("Einzeln navigieren"); |
667 } | 667 } |
668 synchronNavigationMenuItem.addClickHandler(new ClickHandler() { | 668 else { |
669 public void onClick(MenuItemClickEvent evt) { | 669 // TODO i18n |
670 synchronNavigation = !synchronNavigation; | 670 synchronNavigationMenuItem.setTitle("Synchron navigieren"); |
671 } | 671 } |
672 }); | 672 synchronNavigationMenuItem.addClickHandler(new ClickHandler() { |
673 contextMenu.addItem(synchronNavigationMenuItem); | 673 public void onClick(MenuItemClickEvent evt) { |
674 synchronNavigation = !synchronNavigation; | |
675 } | |
676 }); | |
677 contextMenu.addItem(synchronNavigationMenuItem); | |
678 } | |
674 | 679 |
675 return contextMenu; | 680 return contextMenu; |
676 } | 681 } |
677 | 682 |
678 | 683 |