1 23 24 package de.laures.cewolf.taglib.tags; 25 26 import javax.servlet.jsp.JspException ; 27 28 29 33 public class TextureTag extends CewolfBodyTag { 34 35 private String image; 36 private int width; 37 private int height; 38 39 public int doEndTag() throws JspException { 40 String realFileName = pageContext.getServletContext().getRealPath(image); 41 ((Painted)getParent()).setPaint(new SerializableTexturePaint(realFileName, width, height)); 42 return doAfterEndTag(EVAL_PAGE); 43 } 44 45 protected void reset() { 46 } 47 48 public void setImage(String s) { 49 this.image = s; 50 } 51 52 public void setWidth(int width) { 53 this.width = width; 54 } 55 56 public void setHeight(int height) { 57 this.height = height; 58 } 59 } 60 | Popular Tags |