/** Returns the encoded URL of the image (never null). */ private String getEncodedURL() { if (_image != null) return Utils.getDynamicMediaURI( //already encoded this, _imgver, "c/" + _image.getName(), _image.getFormat()); final Desktop dt = getDesktop(); //it might not belong to any desktop return dt != null ? dt.getExecution().encodeURL(_src != null ? _src : "~./img/spacer.gif") : ""; }
/** Returns the encoded URL for the hover image or null if not * available. */ private String getEncodedHoverURL() { if (_auxinf != null && _auxinf.hoverimg instanceof Image) { final Image image = (Image) _auxinf.hoverimg; return Utils.getDynamicMediaURI(this, _auxinf.hoverimgver, "h/" + image.getName(), image.getFormat()); } final Desktop dt = getDesktop(); //it might not belong to any desktop return dt != null && _auxinf != null && _auxinf.hoverimg != null ? dt.getExecution().encodeURL((String) _auxinf.hoverimg) : null; }
/** Returns the encoded URL of the hover image, or null if no hover image. */ private String getEncodedHoverURL() { if (_hoverimg != null) return Utils.getDynamicMediaURI(this, _hoverimgver, "h/" + _hoverimg.getName(), _hoverimg.getFormat()); final Desktop dt = getDesktop(); //it might not belong to any desktop return dt != null && _hoversrc != null ? dt.getExecution().encodeURL(_hoversrc) : null; }
/** Returns the encoded URL for the image ({@link #getImage} * or {@link #getImageContent}), or null if no image. * <p>Used only for component development; not by application developers. * <p>Note: this method can be invoked only if execution is not null. */ private String getEncodedImageURL() { if (_auxinf != null && _auxinf.image instanceof Image) { final Image image = (Image) _auxinf.image; return Utils.getDynamicMediaURI(this, //already encoded _auxinf.imgver, "c/" + image.getName(), image.getFormat()); } final Desktop dt = getDesktop(); //it might not belong to any desktop return dt != null && _auxinf != null && _auxinf.image != null ? dt.getExecution().encodeURL((String) _auxinf.image) : null; }