comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java @ 9694:94b976204a0a

legendwindow debug
author dnt_bjoernsen <d.tironi@bjoernsen.de>
date Wed, 20 Jan 2021 11:22:54 +0100
parents 2197a7ccb4a8
children e388db7fd72e
comparison
equal deleted inserted replaced
9693:2197a7ccb4a8 9694:94b976204a0a
53 addLegends(); 53 addLegends();
54 } 54 }
55 55
56 private void addLegends() { 56 private void addLegends() {
57 final List<Theme> themes = this.themeList.getActiveThemes(); 57 final List<Theme> themes = this.themeList.getActiveThemes();
58 58 com.smartgwt.client.util.SC.say("themescount " + themes.size());
59 for (final Theme theme : themes) { 59
60
61 for (int i = 0; i< themes.size() ; i++) {
62 final Theme theme = themes.get(i);
60 if (theme.getActive() == 0) { 63 if (theme.getActive() == 0) {
61 continue; 64 continue;
62 } 65 }
63 66 try {
64 if (theme instanceof AttributedTheme) { 67 if (theme instanceof AttributedTheme) {
65 this.legendContainer.addMember(createLegendGraphicsRow((AttributedTheme) theme)); 68 this.legendContainer.addMember(createLegendGraphicsRow((AttributedTheme) theme));
69 } } catch (Exception e) {
70 com.smartgwt.client.util.SC.say("exception at index " + themes.size());
71 continue;
66 } 72 }
67 } 73 }
68 } 74 }
69 75
70 private Canvas createLegendGraphicsRow(final AttributedTheme at) { 76 private Canvas createLegendGraphicsRow(final AttributedTheme at) {
77 com.smartgwt.client.util.SC.say("init");
71 final Label label = new Label(at.getDescription()); 78 final Label label = new Label(at.getDescription());
72 final Widget img = createLegendGraphics(at); 79 final Widget img = createLegendGraphics(at);
73 80
74 final HLayout row = new HLayout(); 81 final HLayout row = new HLayout();
75 row.addMember(label); 82 row.addMember(label);
89 setDimensions( row, 150, 400); //not sure when this is executed 96 setDimensions( row, 150, 400); //not sure when this is executed
90 } 97 }
91 String labelText = at.getDescription() +", height: "+ row.getHeight()+"width: "+ row.getWidth()+" "+url; 98 String labelText = at.getDescription() +", height: "+ row.getHeight()+"width: "+ row.getWidth()+" "+url;
92 // 99 //
93 // final HLayout row2= new HLayout(); 100 // final HLayout row2= new HLayout();
94 row.addMember(new Label(labelText)); 101 // row.addMember(new Label(labelText));
102
103 com.smartgwt.client.util.SC.say(labelText);
95 return row; 104 return row;
96 } 105 }
97 106
98 private void setDimensions(HLayout row, int height, int width ) { 107 private void setDimensions(HLayout row, int height, int width ) {
99 final int minHeight = 30; 108 final int minHeight = 30;

http://dive4elements.wald.intevation.org