final ImageElement image = createImage(); if (crossOrigin != null) { image.setAttribute("crossOrigin", crossOrigin);
final ImageElement image = createImage(); if (crossOrigin != null) { image.setAttribute("crossOrigin", crossOrigin);
@Override public void onSuccess (Blob result) { final ImageElement image = createImage(); if (crossOrigin != null) { image.setAttribute("crossOrigin", crossOrigin); } hookImgListener(image, new ImgEventListener() { @Override public void onEvent (NativeEvent event) { if (event.getType().equals("error")) listener.onFailure(); else listener.onSuccess(image); } }); if (isUseInlineBase64()) { image.setSrc("data:" + mimeType + ";base64," + result.toBase64()); } else { image.setSrc(url); } }
@Override public void onSuccess (Blob result) { final ImageElement image = createImage(); if (crossOrigin != null) { image.setAttribute("crossOrigin", crossOrigin); } hookImgListener(image, new ImgEventListener() { @Override public void onEvent (NativeEvent event) { if (event.getType().equals("error")) listener.onFailure(); else listener.onSuccess(image); } }); if (isUseInlineBase64()) { image.setSrc("data:" + mimeType + ";base64," + result.toBase64()); } else { image.setSrc(url); } }
/** * Defines how to resize image in case of limited/explicit button size. * <p> HORIZONTAL - width is 100% and height is auto (default mode). </p> * <p> VERTICAL - height is 100% and width is auto. </p> * <p> See <a href="http://stackoverflow.com/a/16217391">Flexible images</a></p> */ public void setImageResizePriority(Orientation value) { if (value == null) img.removeAttribute(DATA_RESIZE_PRIORITY); else img.setAttribute(DATA_RESIZE_PRIORITY, value.getJqmValue()); }
/** * Defines how to resize image in case of limited/explicit button size. * <p> HORIZONTAL - width is 100% and height is auto (default mode). </p> * <p> VERTICAL - height is 100% and width is auto. </p> * <p> See <a href="http://stackoverflow.com/a/16217391">Flexible images</a></p> */ public void setImageResizePriority(Orientation value) { if (value == null) img.removeAttribute(DATA_RESIZE_PRIORITY); else img.setAttribute(DATA_RESIZE_PRIORITY, value.getJqmValue()); }
/** * Defines how to resize image in case of limited/explicit button size. * <p> HORIZONTAL - width is 100% and height is auto (default mode). </p> * <p> VERTICAL - height is 100% and width is auto. </p> * <p> See <a href="http://stackoverflow.com/a/16217391">Flexible images</a></p> */ public void setImageResizePriority(Orientation value) { if (value == null) img.removeAttribute(DATA_RESIZE_PRIORITY); else img.setAttribute(DATA_RESIZE_PRIORITY, value.getJqmValue()); }
/** * Adds secondary image to this list item. It's forcefully added directly to <li> element. * <br> Additional CSS is needed to control appearance of this image, for example right side * icon on the static band can be implemented, see <b>jqm4gwt-list-static-item-img-right</b> CSS rule. */ public ImageElement addSecondaryImage(String src) { if (src == null) { throw new RuntimeException("Cannot set secondary image to null."); } ImageElement img = Document.get().createImageElement(); img.setAttribute("src", src); getElement().appendChild(img); return img; }
/** * Adds secondary image to this list item. It's forcefully added directly to <li> element. * <br> Additional CSS is needed to control appearance of this image, for example right side * icon on the static band can be implemented, see <b>jqm4gwt-list-static-item-img-right</b> CSS rule. */ public ImageElement addSecondaryImage(String src) { if (src == null) { throw new RuntimeException("Cannot set secondary image to null."); } ImageElement img = Document.get().createImageElement(); img.setAttribute("src", src); getElement().appendChild(img); return img; }
/** * Adds secondary image to this list item. It's forcefully added directly to <li> element. * <br> Additional CSS is needed to control appearance of this image, for example right side * icon on the static band can be implemented, see <b>jqm4gwt-list-static-item-img-right</b> CSS rule. */ public ImageElement addSecondaryImage(String src) { if (src == null) { throw new RuntimeException("Cannot set secondary image to null."); } ImageElement img = Document.get().createImageElement(); img.setAttribute("src", src); getElement().appendChild(img); return img; }
final ImageElement image = createImage(); if (crossOrigin != null) { image.setAttribute("crossOrigin", crossOrigin);
@Override public void onSuccess (Blob result) { final ImageElement image = createImage(); if (crossOrigin != null) { image.setAttribute("crossOrigin", crossOrigin); } hookImgListener(image, new ImgEventListener() { @Override public void onEvent (NativeEvent event) { if (event.getType().equals("error")) listener.onFailure(); else listener.onSuccess(image); } }); if (isUseInlineBase64()) { image.setSrc("data:" + mimeType + ";base64," + result.toBase64()); } else { image.setSrc(url); } }