de.laures.cewolf.taglib.tags
Class ChartImgTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
de.laures.cewolf.taglib.tags.CewolfBodyTag
de.laures.cewolf.taglib.html.AbstractHTMLBaseTag
de.laures.cewolf.taglib.html.HTMLImgTag
de.laures.cewolf.taglib.tags.ChartImgTag
- All Implemented Interfaces:
- CewolfRootTag, Mapped, java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- ChartImgURLTag
public class ChartImgTag
- extends HTMLImgTag
- implements CewolfRootTag, Mapped
This is the tag implementation of the <img> tag. This tag inputs the
proper <img> tag into the HTML page delivered to the client. It therefor
determines the chart ID which will be used by the rendering servlet to retrieve the chart.
- Author:
- glaures
- See Also:
ChartImage
,
Serialized Form
Field Summary |
protected java.lang.String |
sessionKey
|
Fields inherited from class de.laures.cewolf.taglib.html.HTMLImgTag |
align, alt, border, forceSessionId, height, hSpace, ismap, longDesc, removeAfterRender, src, useMap, vSpace, width |
Fields inherited from class de.laures.cewolf.taglib.html.AbstractHTMLBaseTag |
clazz, dir, lang, onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, style, title, UNDEFINED_FLOAT, UNDEFINED_INT, UNDEFINED_STR |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
static java.lang.String |
buildImgURL(java.lang.String renderer,
javax.servlet.jsp.PageContext pageContext,
java.lang.String sessionKey,
int width,
int height,
java.lang.String mimeType,
boolean forceSessionId,
boolean removeAfterRender)
Build the image url |
int |
doAfterBody()
|
int |
doEndTag()
|
int |
doStartTag()
|
void |
enableMapping()
|
static java.lang.String |
fixAbsolutURL(java.lang.String url,
javax.servlet.http.HttpServletRequest request)
Fix an absolute url given as attribute by adding the full application url path to it. |
static java.lang.String |
fixAbsolutURL(java.lang.String url,
javax.servlet.jsp.PageContext pageContext)
Same as the other fixAbsolutURL, convinience only. |
java.lang.String |
getChartid()
|
java.lang.String |
getChartId()
Method getChartId. |
int |
getHeight()
|
protected java.lang.String |
getImgURL()
To enable further server side scriptings on JSP output the session ID is
always encoded into the image URL even if cookies are enabled on the client side. |
protected java.lang.String |
getMimeType()
|
protected java.lang.String |
getRenderer()
|
org.jfree.chart.ChartRenderingInfo |
getRenderingInfo()
|
protected java.lang.String |
getTagName()
|
int |
getTimeout()
|
int |
getWidth()
|
protected void |
reset()
|
void |
setChartid(java.lang.String id)
|
void |
setMime(java.lang.String mimeType)
Sets the mimeType. |
void |
setRenderer(java.lang.String renderer)
|
void |
setTimeout(int timeout)
|
void |
writeAttributes(java.io.Writer wr)
|
Methods inherited from class de.laures.cewolf.taglib.html.HTMLImgTag |
hasBody, isForceSessionId, isRemoveAfterRender, isWellFormed, setAlign, setAlt, setBorder, setForceSessionId, setHeight, setHspace, setIsmap, setLongdesc, setRemoveAfterRender, setSrc, setUsemap, setVspace, setWidth |
Methods inherited from class de.laures.cewolf.taglib.html.AbstractHTMLBaseTag |
appendAttributeDeclaration, appendAttributeDeclaration, appendAttributeDeclaration, setClass, setDir, setHtmltitle, setLang, setOnclick, setOndblclick, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setStyle |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
sessionKey
protected java.lang.String sessionKey
ChartImgTag
public ChartImgTag()
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Specified by:
doStartTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in class AbstractHTMLBaseTag
- Throws:
javax.servlet.jsp.JspException
doAfterBody
public int doAfterBody()
throws javax.servlet.jsp.JspException
- Specified by:
doAfterBody
in interface javax.servlet.jsp.tagext.IterationTag
- Overrides:
doAfterBody
in class javax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Specified by:
doEndTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in class AbstractHTMLBaseTag
- Throws:
javax.servlet.jsp.JspException
- See Also:
Tag.doEndTag()
fixAbsolutURL
public static java.lang.String fixAbsolutURL(java.lang.String url,
javax.servlet.http.HttpServletRequest request)
- Fix an absolute url given as attribute by adding the full application url path to it.
It is considered absolute url (not relative) when it starts with "/"
- Parameters:
url
- The url to fixrequest
- The http request
- Returns:
- Fixed url contains the full path
fixAbsolutURL
public static java.lang.String fixAbsolutURL(java.lang.String url,
javax.servlet.jsp.PageContext pageContext)
- Same as the other fixAbsolutURL, convinience only.
- Parameters:
url
- The url to fixpageContext
- The page context
- Returns:
- Fixed url contains the full path
buildImgURL
public static java.lang.String buildImgURL(java.lang.String renderer,
javax.servlet.jsp.PageContext pageContext,
java.lang.String sessionKey,
int width,
int height,
java.lang.String mimeType,
boolean forceSessionId,
boolean removeAfterRender)
- Build the image url
- Parameters:
renderer
- the url of the rendererpageContext
- Page contextsessionKey
- The session key for the image stored.width
- The widthheight
- The heightmimeType
- the mime-type (for example png) of it
- Returns:
- The full url
getImgURL
protected java.lang.String getImgURL()
- To enable further server side scriptings on JSP output the session ID is
always encoded into the image URL even if cookies are enabled on the client side.
getRenderingInfo
public org.jfree.chart.ChartRenderingInfo getRenderingInfo()
throws CewolfException
- Specified by:
getRenderingInfo
in interface Mapped
- Throws:
CewolfException
getMimeType
protected java.lang.String getMimeType()
reset
protected void reset()
- Overrides:
reset
in class HTMLImgTag
enableMapping
public void enableMapping()
- Specified by:
enableMapping
in interface Mapped
getChartId
public java.lang.String getChartId()
- Description copied from interface:
CewolfRootTag
- Method getChartId.
- Specified by:
getChartId
in interface CewolfRootTag
- Returns:
- String
setChartid
public void setChartid(java.lang.String id)
getChartid
public java.lang.String getChartid()
setRenderer
public void setRenderer(java.lang.String renderer)
getRenderer
protected java.lang.String getRenderer()
getWidth
public int getWidth()
getHeight
public int getHeight()
setMime
public void setMime(java.lang.String mimeType)
- Sets the mimeType.
- Parameters:
mimeType
- The mimeType to set
getTagName
protected java.lang.String getTagName()
- Overrides:
getTagName
in class HTMLImgTag
- See Also:
AbstractHTMLBaseTag.getTagName()
writeAttributes
public void writeAttributes(java.io.Writer wr)
- Overrides:
writeAttributes
in class HTMLImgTag
- See Also:
AbstractHTMLBaseTag.writeAttributes(Writer)
getTimeout
public int getTimeout()
- Returns:
- Returns the timeout.
setTimeout
public void setTimeout(int timeout)
- Parameters:
timeout
- The timeout to set.
cewolf tag library - web charts with JFreeChart