changeset 9694:94b976204a0a

legendwindow debug
author dnt_bjoernsen <d.tironi@bjoernsen.de>
date Wed, 20 Jan 2021 11:22:54 +0100
parents 2197a7ccb4a8
children 9e0ee81a9b7e
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java
diffstat 1 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java	Tue Jan 19 16:39:50 2021 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java	Wed Jan 20 11:22:54 2021 +0100
@@ -55,19 +55,26 @@
 
     private void addLegends() {
         final List<Theme> themes = this.themeList.getActiveThemes();
-
-        for (final Theme theme : themes) {
+        com.smartgwt.client.util.SC.say("themescount " + themes.size());
+        
+        
+        for (int i = 0; i< themes.size() ; i++) {
+        	final Theme theme = themes.get(i);
             if (theme.getActive() == 0) {
                 continue;
             }
-
+            try {
             if (theme instanceof AttributedTheme) {
                 this.legendContainer.addMember(createLegendGraphicsRow((AttributedTheme) theme));
+            } } catch (Exception e) {
+                com.smartgwt.client.util.SC.say("exception at index " + themes.size());
+            	continue;
             }
         }
     }
 
     private Canvas createLegendGraphicsRow(final AttributedTheme at) {
+    	 com.smartgwt.client.util.SC.say("init");
         final Label label = new Label(at.getDescription());
         final Widget img = createLegendGraphics(at);
 
@@ -91,7 +98,9 @@
         String labelText =   at.getDescription() +", height: "+ row.getHeight()+"width: "+ row.getWidth()+" "+url;
    //   
 //        final HLayout row2= new HLayout();
-        row.addMember(new Label(labelText));
+//        row.addMember(new Label(labelText));
+
+        com.smartgwt.client.util.SC.say(labelText);
         return row;
     }
 

http://dive4elements.wald.intevation.org