public abstract class ChartTag
extends javax.servlet.jsp.tagext.TagSupport
Abstract JSP tag for displaying JFreeChart data in a web page. This class provides the mechanism for displaying any chart, along with an optional image map, with a simple JSP tag. This class is designed to be easily extended, and concrete implementations of this class can define the specific chart displayed through the createChart() method.
The only predefined parameters for the tag are width
,
height
and mapActionUrl
. The mapActionUrl
parameter defines which web page should be linked to in the image map. If it
is omitted, the image map and URL links are not generated. Concrete
implementations of this class may add additional parameters for the tag,
which can be used in the createChart() method to determine any additional
necessary parameters.
This class is currently in the Prajna library. However, it has been submitted to JFreeChart as a contribution. It will be removed from Prajna if JFreeChart adopts it.
Constructor and Description |
---|
ChartTag() |
Modifier and Type | Method and Description |
---|---|
abstract org.jfree.chart.JFreeChart |
createChart()
Abstract method to create the chart that this tag displays.
|
int |
doStartTag()
Generate the HTML code for the tag.
|
int |
getHeight()
Get the height of the image
|
java.lang.String |
getMapActionUrl()
Get the mapActionUrl.
|
int |
getWidth()
Get the width of the image
|
void |
setHeight(int imageHeight)
Set the height of the image
|
void |
setMapActionUrl(java.lang.String url)
Set the mapActionUrl, which is used to determine the URL links in the
resulting image map for the image.
|
void |
setWidth(int imageWidth)
Set the width of the image
|
public abstract org.jfree.chart.JFreeChart createChart()
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
- if there is a problem writing the tagpublic int getHeight()
public java.lang.String getMapActionUrl()
public int getWidth()
public void setHeight(int imageHeight)
imageHeight
- the image heightpublic void setMapActionUrl(java.lang.String url)
url
- the mapActionUrlpublic void setWidth(int imageWidth)
imageWidth
- the image width