net.sf.click.extras.graph
Class JSPieChart

java.lang.Object
  extended bynet.sf.click.control.AbstractControl
      extended bynet.sf.click.extras.graph.JSChart
          extended bynet.sf.click.extras.graph.JSPieChart
All Implemented Interfaces:
Control, Serializable

public class JSPieChart
extends JSChart

Provides a Pie Chart control based on JavaScript only.

This control uses the JSGraphics library.

Author:
Ahmed Mohombe
See Also:
Serialized Form

Field Summary
protected static String[] CHART_RESOURCES
          Chart resource file names.
protected static String HTML_IMPORTS
          The HTML imports statements.
 
Fields inherited from class net.sf.click.extras.graph.JSChart
chartHeight, chartWidth, label, xLabels, yValues
 
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
JSPieChart()
          Create a PieChart Control with no name defined.
JSPieChart(String name)
          Create a pie chart with the given name.
JSPieChart(String name, String label)
          Create a pie chart with the given name and label.
 
Method Summary
protected  String[] getChartResources()
          Return the list of static chart resources to deploy.
protected  String getHtmlImportPattern()
          Return the HTML imports pattern string.
protected  String getJSChartType()
          Return the JavaScript Chart type.
 
Methods inherited from class net.sf.click.extras.graph.JSChart
addPoint, addPoint, getChartHeight, getChartWidth, getHtmlImports, getLabel, onDeploy, onProcess, render, setChartHeight, setChartWidth, setLabel, setListener, toString
 
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

HTML_IMPORTS

protected static final String HTML_IMPORTS
The HTML imports statements.

See Also:
Constant Field Values

CHART_RESOURCES

protected static final String[] CHART_RESOURCES
Chart resource file names.

Constructor Detail

JSPieChart

public JSPieChart()
Create a PieChart Control with no name defined.

Please note the control's name must be defined before it is valid.


JSPieChart

public JSPieChart(String name)
Create a pie chart with the given name.

Parameters:
name - the button name

JSPieChart

public JSPieChart(String name,
                  String label)
Create a pie chart with the given name and label.

Parameters:
name - the name of the chart control
label - the label of the chart that will be displayed
Method Detail

getChartResources

protected String[] getChartResources()
Return the list of static chart resources to deploy.

Specified by:
getChartResources in class JSChart
Returns:
the list of static chart resources to deploy
See Also:
JSChart.getChartResources()

getHtmlImportPattern

protected String getHtmlImportPattern()
Return the HTML imports pattern string.

Specified by:
getHtmlImportPattern in class JSChart
Returns:
the HTML imports pattern string
See Also:
JSChart.getHtmlImportPattern()

getJSChartType

protected String getJSChartType()
Return the JavaScript Chart type.

Specified by:
getJSChartType in class JSChart
Returns:
the JavaScript Chart type
See Also:
JSChart.getJSChartType()