/** * Get the SWT image. Reload it from the UAC if it was disposed. * * @return */ public Image getImage() { if (_image != null && _image.isDisposed()) { SWTFSImage fsimg = (SWTFSImage) _uac.getImageResource(_uri) .getImage(); if (fsimg == null) { _image = null; } else { _image = fsimg._image; } } return _image; }
private FSImage getBackgroundImage(RenderingContext c, CalculatedStyle style) { if (! style.isIdent(CSSName.BACKGROUND_IMAGE, IdentValue.NONE)) { String uri = style.getStringProperty(CSSName.BACKGROUND_IMAGE); try { return c.getUac().getImageResource(uri).getImage(); } catch (Exception ex) { ex.printStackTrace(); Uu.p(ex); } } return null; }
private FSImage getBackgroundImage(RenderingContext c, CalculatedStyle style) { if (! style.isIdent(CSSName.BACKGROUND_IMAGE, IdentValue.NONE)) { String uri = style.getStringProperty(CSSName.BACKGROUND_IMAGE); try { return c.getUac().getImageResource(uri).getImage(); } catch (Exception ex) { ex.printStackTrace(); Uu.p(ex); } } return null; }
FSImage fsImage = getUserAgentCallback().getImageResource(getAttribute("src")).getImage();
FSImage fsImage = uac.getImageResource(e.getAttribute("src")).getImage(); if (fsImage != null) { if (cssWidth != -1 || cssHeight != -1) {
FSImage fsImage = uac.getImageResource(e.getAttribute("src")).getImage(); if (fsImage != null) { if (cssWidth != -1 || cssHeight != -1) {
String srcAttr = e.getAttribute("src"); if (srcAttr != null && srcAttr.length() > 0) { FSImage fsImage = uac.getImageResource(srcAttr).getImage(); if (fsImage != null) { if (cssWidth != -1 || cssHeight != -1) {
String srcAttr = e.getAttribute("src"); if (srcAttr != null && srcAttr.length() > 0) { FSImage fsImage = uac.getImageResource(srcAttr).getImage(); if (fsImage != null) { if (cssWidth != -1 || cssHeight != -1) {
String srcAttr = e.getAttribute("src"); if (srcAttr != null && srcAttr.length() > 0) { FSImage fsImage = uac.getImageResource(srcAttr).getImage(); if (fsImage != null) { if (cssWidth != -1 || cssHeight != -1) {
private void requestBGImages(final Box box) { if (box.getChildCount() == 0) return; Iterator ci = box.getChildIterator(); while (ci.hasNext()) { final Box cb = (Box) ci.next(); CalculatedStyle style = cb.getStyle(); if (!style.isIdent(CSSName.BACKGROUND_IMAGE, IdentValue.NONE)) { String uri = style.getStringProperty(CSSName.BACKGROUND_IMAGE); XRLog.load(Level.FINE, "Greedily loading background property " + uri); try { getSharedContext().getUac().getImageResource(uri); } catch (Exception ex) { // swallow } } requestBGImages(cb); } }
Element img = (Element) images.item(0); String uri = c.getNamespaceHandler().getImageSourceURI(img); ImageResource res = uac.getImageResource(uri); SWTFSImage fsi = (SWTFSImage) res.getImage();
FSImage fsImage = getUserAgentCallback().getImageResource(getAttribute("src")).getImage();
private MarkerData.ImageMarker makeImageMarker( LayoutContext c, StrutMetrics structMetrics, String image) { FSImage img = null; if (! image.equals("none")) { img = c.getUac().getImageResource(image).getImage(); if (img != null) { StrutMetrics strutMetrics = structMetrics; if (img.getHeight() > strutMetrics.getAscent()) { img.scale(-1, (int) strutMetrics.getAscent()); } MarkerData.ImageMarker result = new MarkerData.ImageMarker(); result.setImage(img); result.setLayoutWidth(img.getWidth() * 2); return result; } } return null; }
private MarkerData.ImageMarker makeImageMarker( LayoutContext c, StrutMetrics structMetrics, String image) { FSImage img = null; if (! image.equals("none")) { img = c.getUac().getImageResource(image).getImage(); if (img != null) { StrutMetrics strutMetrics = structMetrics; if (img.getHeight() > strutMetrics.getAscent()) { img.scale(-1, (int) strutMetrics.getAscent()); } MarkerData.ImageMarker result = new MarkerData.ImageMarker(); result.setImage(img); result.setLayoutWidth(img.getWidth() * 2); return result; } } return null; }
FSImage fsImage = uac.getImageResource(imageSrc).getImage(); if (fsImage != null) { im = ((AWTFSImage) fsImage).getImage();
cssHeight); } else { FSImage fsImage = uac.getImageResource(imageSrc).getImage(); if (fsImage != null) { re = new ImageReplacedElement(new SWTFSImage(