|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts2.dispatcher.ChartResult
public class ChartResult
A custom Result type for chart data. Built on top of JFreeChart. When executed this Result will write the given chart as a PNG to the servlet output stream.
Constructor Summary | |
---|---|
ChartResult()
|
|
ChartResult(org.jfree.chart.JFreeChart chart,
int height,
int width)
|
Method Summary | |
---|---|
void |
execute(com.opensymphony.xwork2.ActionInvocation invocation)
Executes the result. |
ChartResult |
setChart(org.jfree.chart.JFreeChart chart)
Sets the JFreeChart to use. |
ChartResult |
setHeight(int height)
Sets the chart height. |
ChartResult |
setWidth(int width)
Sets the chart width. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChartResult()
public ChartResult(org.jfree.chart.JFreeChart chart, int height, int width)
Method Detail |
---|
public ChartResult setChart(org.jfree.chart.JFreeChart chart)
chart
- a JFreeChart object.public ChartResult setHeight(int height)
height
- the height of the chart in pixels.public ChartResult setWidth(int width)
width
- the width of the chart in pixels.public void execute(com.opensymphony.xwork2.ActionInvocation invocation) throws java.lang.Exception
execute
in interface com.opensymphony.xwork2.Result
invocation
- an encapsulation of the action execution state.
java.lang.Exception
- if an error occurs when creating or writing the chart to the servlet output stream.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |