annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WikiImgLink.java @ 8870:c26fb37899ca

Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui. Also using now the localization info from the server instead of localizing the modules again on the client side.
author gernotbelger
date Wed, 07 Feb 2018 11:59:13 +0100
parents 5e38e2924c07
children
rev   line source
6231
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
3 *
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
6 * documentation coming with Dive4Elements River for details.
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
7 */
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
9 package org.dive4elements.river.client.client.ui;
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
11 import com.smartgwt.client.types.Overflow;
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
12
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
13 import org.dive4elements.river.client.client.FLYS;
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
15 public class WikiImgLink extends ImgLink {
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16
6233
a8613826bcac Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents: 6231
diff changeset
17 protected FLYS instance;
6231
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6602
diff changeset
19 public WikiImgLink(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6602
diff changeset
20 String imgUrl,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6602
diff changeset
21 String href,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6602
diff changeset
22 int width,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6602
diff changeset
23 int height,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6602
diff changeset
24 FLYS instance
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6602
diff changeset
25 ) {
6231
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
26 super(imgUrl, href, width, height, false);
6233
a8613826bcac Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents: 6231
diff changeset
27 this.instance = instance;
a8613826bcac Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents: 6231
diff changeset
28 update();
6231
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
29 }
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
30
6233
a8613826bcac Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents: 6231
diff changeset
31 @Override
6231
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
32 protected void update() {
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6602
diff changeset
33 setContents(WikiLinks.imageLinkForm(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6602
diff changeset
34 instance, href, imgUrl, "wikiImgLink" + toString()));
6231
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
35 setWidth(width);
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
36 setHeight(height);
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
37 setOverflow(Overflow.VISIBLE);
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
38 }
bfbccad9c3f0 Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
39 }

http://dive4elements.wald.intevation.org