ingo@1343: package de.intevation.flys.client.client.ui; ingo@1343: ingo@1343: import com.smartgwt.client.types.Overflow; ingo@1343: import com.smartgwt.client.widgets.HTMLPane; ingo@1343: ingo@1343: ingo@1343: public class ImgLink extends HTMLPane { ingo@1343: ingo@2431: private int width; ingo@2431: private int height; ingo@2431: ingo@2431: private String href; ingo@2431: private String imgUrl; ingo@2431: ingo@2431: ingo@1343: public ImgLink(String imgUrl, String href, int width, int height) { ingo@1343: super(); ingo@1343: ingo@2431: this.width = width; ingo@2431: this.height = height; ingo@2431: this.href = href; ingo@2431: this.imgUrl = imgUrl; ingo@2431: ingo@2431: update(); ingo@2431: } ingo@2431: ingo@2431: ingo@2431: protected void update() { ingo@1343: setContents(""); ingo@1343: setWidth(width); ingo@1343: setHeight(height); ingo@1343: setOverflow(Overflow.VISIBLE); ingo@1343: } ingo@2431: ingo@2431: ingo@2431: public void setSource(String href) { ingo@2431: this.href = href; ingo@2431: update(); ingo@2431: } ingo@1343: }