1 29 30 package nextapp.echo2.webcontainer.propertyrender; 31 32 import org.w3c.dom.Element ; 33 34 import nextapp.echo2.app.Component; 35 import nextapp.echo2.webcontainer.RenderContext; 36 import nextapp.echo2.webcontainer.image.ImageRenderSupport; 37 import nextapp.echo2.webcontainer.image.ImageTools; 38 import nextapp.echo2.webrender.output.CssStyle; 39 40 44 public class ImageReferenceRender { 45 46 57 public static Element renderImageReferenceElement(RenderContext rc, ImageRenderSupport irs, 58 Component component, String imageId) { 59 Element imgElement = rc.getServerMessage().getDocument().createElement("img"); 60 imgElement.setAttribute("src", ImageTools.getUri(rc, irs, component, imageId)); 61 CssStyle cssStyle = new CssStyle(); 62 cssStyle.setAttribute("border", "none"); 63 imgElement.setAttribute("style", cssStyle.renderInline()); 64 return imgElement; 65 } 66 67 68 private ImageReferenceRender() { } 69 } 70 | Popular Tags |