/** * Sets the URL of the image to be displayed. If the image is in the clipped * state, a call to this method will cause a transition of the image to the * unclipped state. Regardless of whether or not the image is in the clipped * or unclipped state, a load event will be fired. * * @param url the image URL */ public void setUrl(String url) { setUrl(UriUtils.unsafeCastFromUntrustedString(url)); }
@Override public void onDataReady( String data ) { img.setUrl( data ); } } );
@Override public void onDataReady( String data ) { img.setUrl( data ); } } );
@Override public void onDataReady( String data ) { img.setUrl( data ); } } );
/** * Set the pointer to the actual image. In HTML this is represented by the 'src' attribute in an IMG element. * * @param src The new image pointer. */ public void setSrc(String src) { asImage().setUrl(src); }
/** * Sets the URL of the image to be displayed. If the image is in the clipped * state, a call to this method will cause a transition of the image to the * unclipped state. Regardless of whether or not the image is in the clipped * or unclipped state, a load event will be fired. * * @param url the image URL */ public void setUrl(String url) { setUrl(UriUtils.unsafeCastFromUntrustedString(url)); }
/** * Sets the URL of the image to be displayed. If the image is in the clipped * state, a call to this method will cause a transition of the image to the * unclipped state. Regardless of whether or not the image is in the clipped * or unclipped state, a load event will be fired. * * @param url the image URL */ public void setUrl(String url) { setUrl(UriUtils.unsafeCastFromUntrustedString(url)); }
public void setMessageType(MessageType messageType){ if (messageType==MessageType.ERROR){ this.messageTypeImg.setUrl(GWT.getModuleBaseURL()+"/widgets/images/notification/error.png"); }else if (messageType==MessageType.INFO){ //TODO:find correct image this.messageTypeImg.setUrl(GWT.getModuleBaseURL()+"/widgets/images/notification/error.png"); }else if (messageType==MessageType.WARNING){ this.messageTypeImg.setUrl(GWT.getModuleBaseURL()+"/widgets/images/notification/warning.png"); }else if (messageType==MessageType.OK){ this.messageTypeImg.setUrl(GWT.getModuleBaseURL()+"widgets/images/notification/ok.png"); } }
@Override public void setBase64Content(Format format, String content) { checkNotNull(format); checkNotNull(content); control.setUrl("data:image/" + format.toString().toLowerCase() + ";base64," + content); }
@Override protected void setValue(String value) { control.setUrl(GWT.getModuleBaseURL() + checkNotNull(value)); } };
String imageKey = result.get_image_key(); System.out.println("category is: " + result.get_category() + " image blob key is: " + imageKey); String image_url = result.get_image_url(); System.out.println("image url is: " + image_url); //This doesn't work at least locally /*Image image = new Image(); image.setUrl(image_url); RootPanel.get("dynamicDate").add(image);*/ Image image2 = new Image(); image2.setUrl("/_ah/img/" + imageKey); RootPanel.get("dynamicDate").add(image2);
/** * Set the pointer to the actual image. In HTML this is represented by the 'src' attribute in an IMG element. * * @param src * The new image pointer. */ public void setSrc(String src) { asImage().setUrl(src); }
protected void setIcon(final String icon) { this.icon = icon; image.setUrl(icon == null ? "" : icon); //$NON-NLS-1$ if (validationResult == null) { validateIcon(); } else { updateErrorIconLabel(validationResult); } }
final Image img = new Image(); img.addErrorHandler(new ErrorHandler() { public void onError(ErrorEvent event) { // Handle the error } }); img.setUrl(url); p.add(img);
public void setUrl(String url) { super.setUrl(url); RootPanel.get().add(this); setVisible(false); }
@Override public void setUrl(final SafeUri purl) { getElement().setAttribute(DATA_SRC, purl.asString()); if (observer == null) { super.setUrl(purl); } else { observer.observe((elemental.dom.Element) getElement()); } }
public void onError(ErrorEvent event) { nrAttempts--; if (nrAttempts > 0) { asImage().addLoadHandler(this); asImage().addErrorHandler(this); asImage().setUrl(src); } else if (onDoneLoading != null) { onDoneLoading.onFailure(src); } } }
public void onError(ErrorEvent event) { nrAttempts--; if (nrAttempts > 0) { asImage().addLoadHandler(this); asImage().addErrorHandler(this); asImage().setUrl(src); } else if (onDoneLoading != null) { onDoneLoading.onFailure(src); } } }
@Override public void setPixelSize(final int width, final int height) { super.setPixelSize(width, height); final String url = renderer.renderTagImage(tag, this); image.setVisible(url != null); if (url != null) { image.setUrl(url); } setTitle(renderer.renderFullTag(tag, this)); label.setText(renderer.renderTag(tag, this)); }
public void checkWebpSupport() { Image image = new Image(); image.setUrl("data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"); image.addLoadHandler(loadEvent -> { setUrl(getUrl()); }); image.addErrorHandler(errorEvent -> { setUrl(getFallbackUrl()); }); add(image); } }