|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.click.control.AbstractControl net.sf.click.extras.graph.JSChart
Provides a abstract JavaScript Chart control.
Field Summary | |
protected int |
chartHeight
Height of the DIV element that encloses this chart, default height 350 px. |
protected int |
chartWidth
Width of the DIV element that encloses this chart, default width 380 px. |
protected String |
label
The chart display label. |
protected List |
xLabels
The list of X-Axis labels. |
protected List |
yValues
The list of Y-Axis values. |
Fields inherited from class net.sf.click.control.AbstractControl |
actionListener, attributes, listener, listenerMethod, messages, name, parent, styles |
Fields inherited from interface net.sf.click.Control |
CONTROL_MESSAGES |
Constructor Summary | |
JSChart()
|
Method Summary | |
void |
addPoint(int index,
String pointLabel,
Integer pointValue)
Adds a "point" to the grapic/chart at a specified position in the list. |
void |
addPoint(String pointLabel,
Integer pointValue)
Adds a "point" to the grapic/chart at the end of the list. |
int |
getChartHeight()
Return the height of the chart (the enclosing DIV element). |
protected abstract String[] |
getChartResources()
Return the list of static chart resources to deploy. |
int |
getChartWidth()
Return the width of the chart (the enclosing DIV element). |
protected abstract String |
getHtmlImportPattern()
Return the HTML imports pattern string. |
String |
getHtmlImports()
Return the HTML head import statements for the javascript files used by this control. |
protected abstract String |
getJSChartType()
Return the JavaScript Chart type. |
String |
getLabel()
Return the label of the chart. |
void |
onDeploy(ServletContext servletContext)
Deploys the javascript files of this control to the [click/graph/jsgraph] directory. |
boolean |
onProcess()
Returns true, as javascript charts perform no server side logic. |
void |
render(HtmlStringBuffer buffer)
Render the HTML representation of the chart. |
void |
setChartHeight(int chartHeight)
Set the height of the chart (of the enclosing DIV element), as a pixel value. |
void |
setChartWidth(int chartWidth)
Set the width of the chart (of the enclosing DIV element), as a pixel value. |
void |
setLabel(String label)
Set the chart display caption. |
void |
setListener(Object listener,
String method)
This method does nothing. |
String |
toString()
Return the HTML rendered chart. |
Methods inherited from class net.sf.click.control.AbstractControl |
addStyleClass, appendAttributes, getActionListener, getAttribute, getAttributes, getContext, getControlSizeEst, getId, getMessage, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, getTag, hasAttribute, hasAttributes, hasStyles, onDestroy, onInit, onRender, registerActionEvent, removeStyleClass, renderTagBegin, renderTagEnd, setActionListener, setAttribute, setId, setName, setParent, setStyle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int chartHeight
protected int chartWidth
protected String label
protected List xLabels
protected List yValues
Constructor Detail |
public JSChart()
Method Detail |
public void addPoint(String pointLabel, Integer pointValue)
pointLabel
- the displayed label of the "point"pointValue
- the value of the "point".public void addPoint(int index, String pointLabel, Integer pointValue)
index
- index at which the specified point is to be insertedpointLabel
- the displayed label of the "point"pointValue
- the value of the "point".public int getChartWidth()
public void setChartWidth(int chartWidth)
chartWidth
- the chart width in pixels.public int getChartHeight()
public void setChartHeight(int chartHeight)
chartHeight
- the chart height in pixels.public String getLabel()
public void setLabel(String label)
label
- the display label of the chartpublic String getHtmlImports()
Control.getHtmlImports()
public void setListener(Object listener, String method)
listener
- the listener object with the named method to invokemethod
- the name of the method to invokeControl.setListener(Object, String)
public void render(HtmlStringBuffer buffer)
buffer
- the specified buffer to render the control's output totoString()
public String toString()
public void onDeploy(ServletContext servletContext)
[click/graph/jsgraph]
directory.
servletContext
- the webapplication's servlet contextControl.onDeploy(ServletContext)
public boolean onProcess()
protected abstract String[] getChartResources()
protected abstract String getHtmlImportPattern()
protected abstract String getJSChartType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |