Mercurial > dive4elements > river
annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WikiImgLink.java @ 7602:c50dbbe17950
issue1596: Store table (cell) data twice: Once as (formatted) string
as coming from server, once transformed into float (or string).
The benefit is that now we can sort table data numerically, while keeping
the formatted and i18ned display of values.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 27 Nov 2013 14:55:25 +0100 |
parents | 244beb29418e |
children | 5e38e2924c07 |
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 |
6233
a8613826bcac
Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents:
6231
diff
changeset
|
19 public WikiImgLink(String imgUrl, String href, int width, int height, FLYS instance) { |
6231
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
20 super(imgUrl, href, width, height, false); |
6233
a8613826bcac
Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents:
6231
diff
changeset
|
21 this.instance = instance; |
a8613826bcac
Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents:
6231
diff
changeset
|
22 update(); |
6231
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
23 } |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
24 |
6233
a8613826bcac
Call update after setting the instance
Andre Heinecke <aheinecke@intevation.de>
parents:
6231
diff
changeset
|
25 @Override |
6231
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 protected void update() { |
6602
244beb29418e
Fix for SAML authentication in FLYSHeader's Info button (#702).
Christian Lins <christian.lins@intevation.de>
parents:
6546
diff
changeset
|
27 setContents(WikiLinks.imageLinkForm(instance, href, imgUrl, "wikiImgLink" + toString())); |
6231
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
28 setWidth(width); |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
29 setHeight(height); |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
30 setOverflow(Overflow.VISIBLE); |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
31 } |
bfbccad9c3f0
Subclass ImgLink with a new class WikiImgLink
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
32 } |