Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/RiverInfoPanel.java @ 6192:165020640d7b
Instantiate RiverInfoPanel with a FLYS reference for SSO.
Part of flys/issue1265
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Tue, 04 Jun 2013 17:40:00 +0200 |
parents | ea9eef426962 |
children | 56e8bd0958a9 |
comparison
equal
deleted
inserted
replaced
6191:9b521dfb8920 | 6192:165020640d7b |
---|---|
15 import com.google.gwt.user.client.ui.Anchor; | 15 import com.google.gwt.user.client.ui.Anchor; |
16 import com.google.gwt.user.client.ui.HorizontalPanel; | 16 import com.google.gwt.user.client.ui.HorizontalPanel; |
17 import com.google.gwt.user.client.ui.Label; | 17 import com.google.gwt.user.client.ui.Label; |
18 import com.google.gwt.user.client.ui.Widget; | 18 import com.google.gwt.user.client.ui.Widget; |
19 | 19 |
20 import org.dive4elements.river.client.client.FLYS; | |
20 import org.dive4elements.river.client.client.FLYSConstants; | 21 import org.dive4elements.river.client.client.FLYSConstants; |
21 | 22 |
22 import org.dive4elements.river.client.shared.model.RiverInfo; | 23 import org.dive4elements.river.client.shared.model.RiverInfo; |
23 | 24 |
24 /** | 25 /** |
25 * Panel to display information about a river. | 26 * Panel to display information about a river. |
26 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> | 27 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> |
27 */ | 28 */ |
28 public class RiverInfoPanel extends HorizontalPanel { | 29 public class RiverInfoPanel extends HorizontalPanel { |
29 | 30 |
31 /** The flys instance */ | |
32 protected FLYS flys; | |
33 | |
30 /** The message class that provides i18n strings.*/ | 34 /** The message class that provides i18n strings.*/ |
31 protected FLYSConstants MSG = GWT.create(FLYSConstants.class); | 35 protected FLYSConstants MSG = GWT.create(FLYSConstants.class); |
32 | 36 |
33 public final static int HEIGHT = 30; | 37 public final static int HEIGHT = 30; |
34 public final static int BORDER_WIDTH = 3; | 38 public final static int BORDER_WIDTH = 3; |
35 public final static int PADDING = 8; | 39 public final static int PADDING = 8; |
36 public final static int MARGIN = 10; | 40 public final static int MARGIN = 10; |
37 | 41 |
38 public RiverInfoPanel(RiverInfo riverinfo) { | 42 public RiverInfoPanel(FLYS flys, RiverInfo riverinfo) { |
43 this.flys = flys; | |
44 | |
39 setStyleName("riverinfopanel"); | 45 setStyleName("riverinfopanel"); |
40 setHeight("" + HEIGHT + "px"); | 46 setHeight("" + HEIGHT + "px"); |
41 setVerticalAlignment(ALIGN_MIDDLE); | 47 setVerticalAlignment(ALIGN_MIDDLE); |
42 | 48 |
43 setRiverInfo(riverinfo); | 49 setRiverInfo(riverinfo); |