annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/map/LegendWindow.java @ 9619:63bbd5e45839

#21 WMS Legend
author dnt_bjoernsen <d.tironi@bjoernsen.de>
date Thu, 10 Oct 2019 16:08:47 +0200
parents 5e38e2924c07
children a03c54129819
rev   line source
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
6 * documentation coming with Dive4Elements River for details.
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
9 package org.dive4elements.river.client.client.ui.map;
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import java.util.List;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
13 import org.dive4elements.river.client.client.FLYSConstants;
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
14 import org.dive4elements.river.client.shared.MapUtils;
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
15 import org.dive4elements.river.client.shared.model.AttributedTheme;
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
16 import org.dive4elements.river.client.shared.model.Theme;
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
17 import org.dive4elements.river.client.shared.model.ThemeList;
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
18
7958
632c724fed2d i18n for WMS legend window title.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
19 import com.google.gwt.core.client.GWT;
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
20 import com.google.gwt.user.client.ui.Image;
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
21 import com.google.gwt.user.client.ui.Widget;
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 import com.smartgwt.client.types.ImageStyle;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 import com.smartgwt.client.types.VerticalAlignment;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 import com.smartgwt.client.widgets.Canvas;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 import com.smartgwt.client.widgets.Img;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 import com.smartgwt.client.widgets.Label;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 import com.smartgwt.client.widgets.Window;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 import com.smartgwt.client.widgets.layout.HLayout;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 import com.smartgwt.client.widgets.layout.VLayout;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 public class LegendWindow extends Window {
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
7958
632c724fed2d i18n for WMS legend window title.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
33 protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
632c724fed2d i18n for WMS legend window title.
Tom Gottfried <tom@intevation.de>
parents: 5993
diff changeset
34
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 private ThemeList themeList;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
37 private final VLayout legendContainer;
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
39 public LegendWindow(final ThemeList themeList) {
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 this.themeList = themeList;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 this.legendContainer = new VLayout();
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 init();
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 }
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
46 public void update(final ThemeList themeList) {
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 this.themeList = themeList;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
49 final Canvas[] legends = this.legendContainer.getMembers();
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
50 this.legendContainer.removeMembers(legends);
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 addLegends();
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 }
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55 private void addLegends() {
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
56 final List<Theme> themes = this.themeList.getActiveThemes();
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
58 for (final Theme theme : themes) {
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 if (theme.getActive() == 0) {
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 continue;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 }
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 if (theme instanceof AttributedTheme) {
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
64 this.legendContainer.addMember(createLegendGraphicsRow((AttributedTheme) theme));
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 }
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66 }
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67 }
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
69 private Canvas createLegendGraphicsRow(final AttributedTheme at) {
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
70 final Label label = new Label(at.getDescription());
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
71 final Widget img = createLegendGraphics(at);
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
73 final HLayout row = new HLayout();
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74 row.addMember(label);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 row.addMember(img);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77 row.setHeight(150);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 row.setWidth(400);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 return row;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81 }
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
83 private Widget createLegendGraphics(final AttributedTheme at) {
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
85 final String legend = at.getAttr("legend");
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
86 // TEST: final Image img = new Image("/images/FLYS_Donau.png"); (funktioniert!), ebenso FLYSResources.getTest();
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
87 if (legend != null && !"".equals(legend)) {
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
88 final Image image = new Image("/images/wms_legend/" + legend);
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
89 final int imageWidth = image.getWidth();
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
90 final int imageHeight = image.getHeight();
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
91 final double widthPercent = imageWidth / 400.;
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
92 final double heightPercent = imageHeight / 150.;
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
93 if (widthPercent > 1 || heightPercent > 1) {
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
94 if (widthPercent > heightPercent)
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
95 image.setSize((int) (imageWidth / widthPercent) + "px", (int) (imageHeight / widthPercent) + "px");
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
96 else
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
97 image.setSize((int) (imageWidth / heightPercent) + "px", (int) (imageHeight / heightPercent) + "px");
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
98 }
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
99 return image;
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
100 }
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
101 final String imgUrl = MapUtils.getLegendGraphicUrl(at.getAttr("url"), at.getAttr("layers"));
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
102
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
103 final Img img = new Img(imgUrl);
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
104 img.setImageType(ImageStyle.CENTER);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
105 img.setAutoFit(true);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
106
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
107 return img;
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
108 }
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
109
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
110 private void init() {
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
111 this.legendContainer.setAutoHeight();
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
112 this.legendContainer.setLayoutAlign(VerticalAlignment.TOP);
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
113 this.legendContainer.setAlign(VerticalAlignment.CENTER);
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
115 setTitle(this.MSG.wms_legend());
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
116 setAutoSize(true);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
117 setCanDragResize(true);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
118 setIsModal(false);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
119 setShowModalMask(false);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
120 setLayoutAlign(VerticalAlignment.TOP);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
121 setAlign(VerticalAlignment.TOP);
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
122
9619
63bbd5e45839 #21 WMS Legend
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents: 8856
diff changeset
123 addItem(this.legendContainer);
4329
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
124 addLegends();
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
125
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
126 centerInPage();
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
127 }
c9dcce9448f2 Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
128 }

http://dive4elements.wald.intevation.org