public Img(String src) { setSrc(src); scClassName = "Img"; }
private void setHideButtonSrc(String source) { hideButton.setSrc(source); }
public void setIcon(String src) { img.setSrc(src); } }
/** * Set the url of the current file. * * @param url the url */ public void setUrl(String url) { previewImage.setSrc(Geomajas.getDispatcherUrl() + url); this.url = url; }
public Img(String src, int width, int height) { setSrc(src); setWidth(width); setHeight(height); scClassName = "Img"; }
public void onUserApplicationLoad(UserApplicationEvent event) { if (geoDesk.getBannerUrl() != null) { logoImg.setSrc(Geomajas.getDispatcherUrl() + geoDesk.getBannerUrl()); } onLoadLoketRegistration.removeHandler(); registerMap(event.getUserApplication().getMainMapWidget()); } });
/** * * @param imageInfo */ public ImageWidget(final ImageInfo imageInfo) { setShowEdges(true); setDefaultLayoutAlign(Alignment.CENTER); image = new Img(); UrlBuilder url = new UrlBuilder(Geomajas.getDispatcherUrl() + imageInfo.getUrl()); image.setSrc(url.toString()); image.setAltText(imageInfo.getAlt()); image.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { com.google.gwt.user.client.Window.open(imageInfo.getHref(), "_blank", ""); } }); // centralize image.setImageType(ImageStyle.CENTER); image.setWidth(imageInfo.getWidth()); image.setHeight(imageInfo.getHeight()); addMember(image); } }