[Dive4elements-commits] [PATCH 3 of 4] Subclass ImgLink with a new class WikiImgLink
Wald Commits
scm-commit at wald.intevation.org
Fri Jun 7 11:50:01 CEST 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1370598543 -7200
# Node ID bfbccad9c3f07b51161d8298f20c955fca11a274
# Parent 954dbb0806f361dcc4dab69e771f02ebe585323a
Subclass ImgLink with a new class WikiImgLink
diff -r 954dbb0806f3 -r bfbccad9c3f0 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ImgLink.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ImgLink.java Fri Jun 07 11:47:47 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ImgLink.java Fri Jun 07 11:49:03 2013 +0200
@@ -14,13 +14,13 @@
public class ImgLink extends HTMLPane {
- private int width;
- private int height;
+ protected int width;
+ protected int height;
- private String href;
- private String imgUrl;
+ protected String href;
+ protected String imgUrl;
- private boolean newTab;
+ protected boolean newTab;
public ImgLink(String imgUrl, String href, int width, int height) {
diff -r 954dbb0806f3 -r bfbccad9c3f0 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WikiImgLink.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WikiImgLink.java Fri Jun 07 11:49:03 2013 +0200
@@ -0,0 +1,31 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
+package org.dive4elements.river.client.client.ui;
+
+import com.smartgwt.client.types.Overflow;
+
+import org.dive4elements.river.client.client.FLYS;
+import org.dive4elements.river.client.client.ui.WikiLinks;
+
+public class WikiImgLink extends ImgLink {
+
+ protected FLYS flys;
+
+ public WikiImgLink(String imgUrl, String href, int width, int height, FLYS flys) {
+ super(imgUrl, href, width, height, false);
+ this.flys = flys;
+ }
+
+ protected void update() {
+ setContents(WikiLinks.imageLinkHTML(flys, href, imgUrl));
+ setWidth(width);
+ setHeight(height);
+ setOverflow(Overflow.VISIBLE);
+ }
+}
More information about the Dive4elements-commits
mailing list