|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.servlet.jsp.tagext.SimpleTagSupport
org.ditchnet.jsp.taglib.twod.handler.CanvasTag
| Constructor Summary | |
CanvasTag()
|
|
| Method Summary | |
protected void |
addJavaObjectsToJsRuntime(org.mozilla.javascript.Context ctx,
org.mozilla.javascript.Scriptable scope)
Add the graphics object and the app/session/request/page scope objects to the global scope of the Rhino JavaScript runtime. |
protected void |
assertImageTypeSupported()
Assert that the given image format (e.g. jpg, png) is supported by this JVM. |
protected void |
createGraphics()
Instantiate this object's BufferedImage and
Graphics2D instance fields. |
void |
doTag()
Retrieve the JavaScript code in this tag's body. |
protected void |
evalJs()
Embed the Rhino JavaScript interpreter to evaluate the script body of this tag. |
java.lang.String |
getAlt()
|
java.lang.String |
getBorder()
|
java.lang.String |
getCache()
|
protected java.lang.String |
getFileName()
Determine the image's file name by concatinating this object's id property and the appropriate file extension. |
java.lang.String |
getHeight()
|
java.lang.String |
getId()
|
protected java.lang.String |
getImageDirPath()
Get the string representation of the image dir's path. |
java.lang.String |
getImageFormat()
|
protected java.lang.String |
getJsCode()
Retrieve the JavaScript code in this tag's body. |
java.lang.String |
getStyle()
|
java.lang.String |
getStyleClass()
|
java.lang.String |
getWidth()
|
protected boolean |
imageIsOutOfDate()
Returns true if the JSP in which this tag handler was invoked has been edited since the last time it's associated image was generated. |
void |
setAlt(java.lang.String alt)
|
void |
setBorder(java.lang.String border)
|
void |
setCache(java.lang.String cache)
|
void |
setHeight(java.lang.String height)
|
void |
setId(java.lang.String id)
|
void |
setImageFormat(java.lang.String imageFormat)
|
void |
setStyle(java.lang.String style)
|
void |
setStyleClass(java.lang.String styleClass)
|
void |
setWidth(java.lang.String width)
|
protected void |
writeFileToDir()
Write the image to the image directory. |
protected void |
writeResponse()
Render the XHTML response consisting of an <img> tag
with the appropriate attributes. |
| Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CanvasTag()
| Method Detail |
public java.lang.String getId()
public void setId(java.lang.String id)
public java.lang.String getCache()
public void setCache(java.lang.String cache)
public java.lang.String getBorder()
public void setBorder(java.lang.String border)
public java.lang.String getStyle()
public void setStyle(java.lang.String style)
public java.lang.String getStyleClass()
public void setStyleClass(java.lang.String styleClass)
public java.lang.String getAlt()
public void setAlt(java.lang.String alt)
public java.lang.String getWidth()
public void setWidth(java.lang.String width)
public java.lang.String getHeight()
public void setHeight(java.lang.String height)
public java.lang.String getImageFormat()
public void setImageFormat(java.lang.String imageFormat)
protected java.lang.String getJsCode()
throws java.io.IOException,
javax.servlet.jsp.JspException
java.io.IOException
javax.servlet.jsp.JspExceptionprotected void createGraphics()
BufferedImage and
Graphics2D instance fields.
protected java.lang.String getImageDirPath()
protected void writeFileToDir()
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getFileName()
id property and the appropriate file extension.
protected void assertImageTypeSupported()
throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
public void doTag()
throws java.io.IOException,
javax.servlet.jsp.JspException
java.io.IOException
javax.servlet.jsp.JspExceptionprotected boolean imageIsOutOfDate()
protected void evalJs()
throws javax.servlet.jsp.JspException
g.
javax.servlet.jsp.JspException
protected void addJavaObjectsToJsRuntime(org.mozilla.javascript.Context ctx,
org.mozilla.javascript.Scriptable scope)
protected void writeResponse()
throws java.io.IOException,
javax.servlet.jsp.JspException
<img> tag
with the appropriate attributes.
java.io.IOException
javax.servlet.jsp.JspException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||