org.zkoss.zul
Class Chart

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Image
                  extended by org.zkoss.zul.Imagemap
                      extended by org.zkoss.zul.Chart
All Implemented Interfaces:
Serializable, Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.sys.ComponentCtrl

public class Chart
extends Imagemap

The generic chart component. Developers set proper chart type, data model, and the threeD (3D) attribute to draw proper chart.

Chart requires an implementation of an engine (ChartEngine). The default engine is based on JFreeChart and available in ZK PE and ZK EE.

The model and type must match to each other; or the result is unpredictable. The 3D chart is not supported on all chart type.

typemodel3D
areaCategoryModel or XYModelNo
barCategoryModelYes
bubbleXYZModelNo
candlestickHiLoModelNo
dial@{link DialModel}No
ganttGanttModelNo
highlowHiLoModelNo
histogramXYModelNo
lineCategoryModel or XYModelYes
piePieModelYes
polarXYModelNo
ringPieModelNo
scatterXYModelNo
stacked_barCategoryModelYes
stacked_areaCategoryModel or XYModelNo
stepXYModelNo
step_areaXYModelNo
time_seriesXYModelNo
wafermapWaferMapModelNo
waterfallCategoryModelNo
windXYZModelNo

Author:
henrichen
See Also:
ChartEngine, ChartModel, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zul.Image
Image.ExtraCtrl
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children
 
Field Summary
static String AREA
           
static String BAR
           
static String BUBBLE
           
static String CANDLESTICK
           
static String COMBINATION
           
static String DAY
           
static String DIAL
           
static String FUNNEL
           
static String GANTT
           
static String HIGHLOW
           
static String HISTOGRAM
           
static String HOUR
           
static String LINE
           
static String MILLISECOND
           
static String MINUTE
           
static String MONTH
           
static String PIE
           
static String POLAR
           
static String QUARTER
           
static String RING
           
static String SCATTER
           
static String SECOND
           
static String STACKED_AREA
           
static String STACKED_BAR
           
static String STEP
           
static String STEP_AREA
           
static String TIME_SERIES
           
static String WAFERMAP
           
static String WATERFALL
           
static String WEEK
           
static String WIND
           
static String YEAR
           
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclass
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
 
Constructor Summary
Chart()
           
 
Method Summary
 boolean addEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)
           
 Object clone()
           
 ChartAreaListener getAreaListener()
          Returns the renderer to render each area, or null if the default renderer is used.
 int getBgAlpha()
          Get the background alpha (transparency, 0 ~ 255, opaque).
 String getBgColor()
          Get the background color of the chart (in string as #RRGGBB).
 int[] getBgRGB()
          Get the background color in int array (0: red, 1: green, 2:blue).
 String getDateFormat()
          Returns the date format used by date related Chart.
 ChartEngine getEngine()
          Returns the implementation chart engine.
 int getFgAlpha()
          Get the foreground alpha (transparency, 0 ~ 255, opaque).
 int getIntHeight()
          Get the chart int width in pixel; to be used by the derived subclass.
 int getIntWidth()
          Get the chart int width in pixel; to be used by the derived subclass.
 Font getLegendFont()
          Returns the legend font of this chart.
 ChartModel getModel()
          Returns the chart model associated with this chart, or null if this chart is not associated with any chart data model.
 String getOrient()
          Get the chart orientation (vertical or horizontal)
 int getPaneAlpha()
          Get the pane alpha (transparency, 0 ~ 255, opacue).
 String getPaneColor()
          Get the pane color of the chart (in string as #RRGGBB).
 int[] getPaneRGB()
          Get the pane color in int array (0: red, 1: green, 2:blue).
 String getPeriod()
          Returns the period used in Time Series Chart.
 TimeZone getTimeZone()
          Returns the time zone that this Time Series Chart belongs to, or null if the default time zone is used.
 String getTitle()
          Get the chart's title.
 Font getTitleFont()
          Returns the title font of this chart.
 String getType()
          Get the chart's type.
 String getXAxis()
          Get the label in xAxis.
 Font getXAxisFont()
          Returns the label font of x axis of this chart.
 Font getXAxisTickFont()
          Returns the tick number font of x axis of this chart.
 String getYAxis()
          Get the label in yAxis.
 Font getYAxisFont()
          Returns the label font of y axis of this chart.
 Font getYAxisTickFont()
          Returns the tick number font of y axis of this chart.
 boolean isShowLegend()
          Check whether show the legend of the chart.
 boolean isShowTooltiptext()
          Check whether show the tooltiptext.
 boolean isThreeD()
          Whether a 3d chart.
protected  ChartEngine newChartEngine()
          Instantiates the default chart engine.
 void setAreaListener(ChartAreaListener listener)
          Sets the renderer which is used to render each area.
 void setAreaListener(String clsnm)
          Sets the renderer by use of a class name.
 void setBgAlpha(int alpha)
          Set the background alpha (transparency, 0 ~ 255).
 void setBgColor(String color)
          Set the background color of the chart.
 void setDateFormat(String format)
          Sets the date format used by date related Chart.
 void setEngine(ChartEngine engine)
          Sets the chart engine.
 void setEngine(String clsnm)
          Sets the chart engine by use of a class name.
 void setFgAlpha(int alpha)
          Set the foreground alpha (transparency, 0 ~ 255).
 void setHeight(String h)
          Override super class to prepare the int height.
 void setLegendFont(Font font)
          Sets the legend font of this chart.
 void setModel(ChartModel model)
          Sets the chart model associated with this chart.
 void setModel(String clsnm)
          Sets the model by use of a class name.
 void setOrient(String orient)
          Set the chart orientation.
 void setPaneAlpha(int alpha)
          Set the pane alpha (transparency, 0 ~ 255).
 void setPaneColor(String color)
          Set the pane color of the chart.
 void setPeriod(String period)
          Sets the period used in Time Series Chart.
 void setShowLegend(boolean showLegend)
          whether show the chart's legend.
 void setShowTooltiptext(boolean showTooltiptext)
          whether show the chart's tooltip.
 void setThreeD(boolean b)
          Set true to show three dimensional graph (If a type of chart got no 3d peer, this is ignored).
 void setTimeZone(TimeZone tzone)
          Sets the time zone that this Time Series Chart belongs to, or null if the default time zone is used.
 void setTitle(String title)
          Set the chart's title.
 void setTitleFont(Font font)
          Sets the title font of this chart.
 void setType(String type)
          Set the chart's type (Chart.PIE, Chart.BAR, Chart.LINE, etc.).
 void setWidth(String w)
          Override super class to prepare the int width.
 void setXAxis(String label)
          Set the label in xAxis.
 void setXAxisFont(Font axisFont)
          Sets the label font of x axis of this chart.
 void setXAxisTickFont(Font axisTickFont)
          Sets the tick number font of x axis of this chart.
 void setYAxis(String label)
          Set the label in yAxis.
 void setYAxisFont(Font axisFont)
          Sets the label font of y axis of this chart.
 void setYAxisTickFont(Font axisTickFont)
          Sets the tick number font of y axis of this chart.
protected  void smartDrawChart()
          mark a draw flag to inform that this Chart needs update.
 
Methods inherited from class org.zkoss.zul.Imagemap
beforeChildAdded, isChildable
 
Methods inherited from class org.zkoss.zul.Image
getAlign, getBorder, getContent, getExtraCtrl, getHover, getHspace, getSrc, getVspace, renderProperties, setAlign, setBorder, setContent, setContent, setHover, setHoverContent, setHoverContent, setHspace, setSrc, setVspace
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getContext, getCtrlKeys, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeightDirectly, setHflex, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PIE

public static final String PIE
See Also:
Constant Field Values

FUNNEL

public static final String FUNNEL
See Also:
Constant Field Values

RING

public static final String RING
See Also:
Constant Field Values

BAR

public static final String BAR
See Also:
Constant Field Values

LINE

public static final String LINE
See Also:
Constant Field Values

AREA

public static final String AREA
See Also:
Constant Field Values

STACKED_BAR

public static final String STACKED_BAR
See Also:
Constant Field Values

COMBINATION

public static final String COMBINATION
See Also:
Constant Field Values

STACKED_AREA

public static final String STACKED_AREA
See Also:
Constant Field Values

WATERFALL

public static final String WATERFALL
See Also:
Constant Field Values

POLAR

public static final String POLAR
See Also:
Constant Field Values

SCATTER

public static final String SCATTER
See Also:
Constant Field Values

TIME_SERIES

public static final String TIME_SERIES
See Also:
Constant Field Values

STEP

public static final String STEP
See Also:
Constant Field Values

STEP_AREA

public static final String STEP_AREA
See Also:
Constant Field Values

HISTOGRAM

public static final String HISTOGRAM
See Also:
Constant Field Values

CANDLESTICK

public static final String CANDLESTICK
See Also:
Constant Field Values

HIGHLOW

public static final String HIGHLOW
See Also:
Constant Field Values

BUBBLE

public static final String BUBBLE
See Also:
Constant Field Values

WAFERMAP

public static final String WAFERMAP
See Also:
Constant Field Values

GANTT

public static final String GANTT
See Also:
Constant Field Values

WIND

public static final String WIND
See Also:
Constant Field Values

DIAL

public static final String DIAL
See Also:
Constant Field Values

YEAR

public static final String YEAR
See Also:
Constant Field Values

QUARTER

public static final String QUARTER
See Also:
Constant Field Values

MONTH

public static final String MONTH
See Also:
Constant Field Values

WEEK

public static final String WEEK
See Also:
Constant Field Values

DAY

public static final String DAY
See Also:
Constant Field Values

HOUR

public static final String HOUR
See Also:
Constant Field Values

MINUTE

public static final String MINUTE
See Also:
Constant Field Values

SECOND

public static final String SECOND
See Also:
Constant Field Values

MILLISECOND

public static final String MILLISECOND
See Also:
Constant Field Values
Constructor Detail

Chart

public Chart()
Method Detail

setType

public void setType(String type)
Set the chart's type (Chart.PIE, Chart.BAR, Chart.LINE, etc.).

Default: pie.


getType

public String getType()
Get the chart's type.


setThreeD

public void setThreeD(boolean b)
Set true to show three dimensional graph (If a type of chart got no 3d peer, this is ignored).


isThreeD

public boolean isThreeD()
Whether a 3d chart.


setTitle

public void setTitle(String title)
Set the chart's title.

Parameters:
title - the chart's title.

getTitle

public String getTitle()
Get the chart's title.


setWidth

public void setWidth(String w)
Override super class to prepare the int width.

Overrides:
setWidth in class org.zkoss.zk.ui.HtmlBasedComponent

getIntWidth

public int getIntWidth()
Get the chart int width in pixel; to be used by the derived subclass.


setHeight

public void setHeight(String h)
Override super class to prepare the int height.

Overrides:
setHeight in class org.zkoss.zk.ui.HtmlBasedComponent

getIntHeight

public int getIntHeight()
Get the chart int width in pixel; to be used by the derived subclass.


setXAxis

public void setXAxis(String label)
Set the label in xAxis.

Parameters:
label - label in xAxis.

getXAxis

public String getXAxis()
Get the label in xAxis.


setYAxis

public void setYAxis(String label)
Set the label in yAxis.

Parameters:
label - label in yAxis.

getYAxis

public String getYAxis()
Get the label in yAxis.


setShowLegend

public void setShowLegend(boolean showLegend)
whether show the chart's legend.

Parameters:
showLegend - true if want to show the legend (default to true).

isShowLegend

public boolean isShowLegend()
Check whether show the legend of the chart.


setShowTooltiptext

public void setShowTooltiptext(boolean showTooltiptext)
whether show the chart's tooltip.

Parameters:
showTooltiptext - true if want to pop the tooltiptext (default to true).

isShowTooltiptext

public boolean isShowTooltiptext()
Check whether show the tooltiptext.


setPaneAlpha

public void setPaneAlpha(int alpha)
Set the pane alpha (transparency, 0 ~ 255).

Parameters:
alpha - the transparency of pane color (0 ~ 255, default to 255 opaque).

getPaneAlpha

public int getPaneAlpha()
Get the pane alpha (transparency, 0 ~ 255, opacue).


setPaneColor

public void setPaneColor(String color)
Set the pane color of the chart.

Parameters:
color - in #RRGGBB format (hexadecimal).

getPaneColor

public String getPaneColor()
Get the pane color of the chart (in string as #RRGGBB). null means default.


getPaneRGB

public int[] getPaneRGB()
Get the pane color in int array (0: red, 1: green, 2:blue). null means default.


setFgAlpha

public void setFgAlpha(int alpha)
Set the foreground alpha (transparency, 0 ~ 255).

Parameters:
alpha - the transparency of foreground color (0 ~ 255, default to 255 opaque).

getFgAlpha

public int getFgAlpha()
Get the foreground alpha (transparency, 0 ~ 255, opaque).


setBgAlpha

public void setBgAlpha(int alpha)
Set the background alpha (transparency, 0 ~ 255).

Parameters:
alpha - the transparency of background color (0 ~ 255, default to 255 opaque).

getBgAlpha

public int getBgAlpha()
Get the background alpha (transparency, 0 ~ 255, opaque).


setBgColor

public void setBgColor(String color)
Set the background color of the chart.

Parameters:
color - in #RRGGBB format (hexadecimal).

getBgColor

public String getBgColor()
Get the background color of the chart (in string as #RRGGBB). null means default.


getBgRGB

public int[] getBgRGB()
Get the background color in int array (0: red, 1: green, 2:blue). null means default.


setOrient

public void setOrient(String orient)
Set the chart orientation.

Parameters:
orient - vertical or horizontal (default to vertical)

getOrient

public String getOrient()
Get the chart orientation (vertical or horizontal)


getTimeZone

public TimeZone getTimeZone()
Returns the time zone that this Time Series Chart belongs to, or null if the default time zone is used.

The default time zone is determined by TimeZones.getCurrent().


setTimeZone

public void setTimeZone(TimeZone tzone)
Sets the time zone that this Time Series Chart belongs to, or null if the default time zone is used.

The default time zone is determined by TimeZones.getCurrent().


getPeriod

public String getPeriod()
Returns the period used in Time Series Chart. The value can be "millisecond", "second", "minute", "hour", "day", "week", "month", "quarter", and "year". default is "millisecond" if not specified.


setPeriod

public void setPeriod(String period)
Sets the period used in Time Series Chart. The value can be "millisecond", "second", "minute", "hour", "day", "week", "month", "quarter", and "year".


getDateFormat

public String getDateFormat()
Returns the date format used by date related Chart.

Returns:
the date format used by date related Chart..

setDateFormat

public void setDateFormat(String format)
Sets the date format used by date related Chart.

Parameters:
format -

getModel

public ChartModel getModel()
Returns the chart model associated with this chart, or null if this chart is not associated with any chart data model.


setModel

public void setModel(ChartModel model)
Sets the chart model associated with this chart. If a non-null model is assigned, no matter whether it is the same as the previous, it will always cause re-render.

Parameters:
model - the chart model to associate, or null to dissociate any previous model.
Throws:
org.zkoss.zk.ui.UiException - if failed to initialize with the model

getTitleFont

public Font getTitleFont()
Returns the title font of this chart. If you saw squares rather than correct words in title, check whether the default title font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Returns:
the title font

setTitleFont

public void setTitleFont(Font font)
Sets the title font of this chart. If you saw squares rather than correct words in title, check whether the default title font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Parameters:
font - the title font of this chart

getLegendFont

public Font getLegendFont()
Returns the legend font of this chart. If you saw squares rather than correct words in legend, check whether the default legend font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Returns:
the title font

setLegendFont

public void setLegendFont(Font font)
Sets the legend font of this chart. If you saw squares rather than correct words in legend, check whether the default legend font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Parameters:
font - the legend font of this chart

getXAxisTickFont

public Font getXAxisTickFont()
Returns the tick number font of x axis of this chart. If you saw squares rather than correct words in x axis tick, check whether the default x axis tick font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Returns:
the tick number font of x axis of this chart

setXAxisTickFont

public void setXAxisTickFont(Font axisTickFont)
Sets the tick number font of x axis of this chart. If you saw squares rather than correct words in x axis tick, check whether the default x axis tick font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Parameters:
axisTickFont - the tick number font of x axis of this chart

getXAxisFont

public Font getXAxisFont()
Returns the label font of x axis of this chart. If you saw squares rather than correct words in x axis label, check whether the default x axis label font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Returns:
the label font of x axis of this chart

setXAxisFont

public void setXAxisFont(Font axisFont)
Sets the label font of x axis of this chart. If you saw squares rather than correct words in x axis label, check whether the default x axis label font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Parameters:
axisFont - the label font of x axis of this chart

getYAxisTickFont

public Font getYAxisTickFont()
Returns the tick number font of y axis of this chart. If you saw squares rather than correct words in y axis tick, check whether the default y axis tick font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Returns:
the tick number font of y axis of this chart

setYAxisTickFont

public void setYAxisTickFont(Font axisTickFont)
Sets the tick number font of y axis of this chart. If you saw squares rather than correct words in y axis tick, check whether the default y axis tick font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Parameters:
axisTickFont - the tick number font of y axis of this chart

getYAxisFont

public Font getYAxisFont()
Returns the label font of y axis of this chart. If you saw squares rather than correct words in y axis label, check whether the default y axis label font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Returns:
the label font of y axis of this chart

setYAxisFont

public void setYAxisFont(Font axisFont)
Sets the label font of y axis of this chart. If you saw squares rather than correct words in y axis label, check whether the default y axis label font supports your characters (e.g. Chinese). You probably have to set this font accordingly.

Parameters:
axisFont - the tick number font of y axis of this chart

setModel

public void setModel(String clsnm)
              throws ClassNotFoundException,
                     NoSuchMethodException,
                     IllegalAccessException,
                     InstantiationException,
                     InvocationTargetException
Sets the model by use of a class name. It creates an instance automatically.

Throws:
ClassNotFoundException
NoSuchMethodException
IllegalAccessException
InstantiationException
InvocationTargetException

getEngine

public ChartEngine getEngine()
                      throws org.zkoss.zk.ui.UiException
Returns the implementation chart engine.

Throws:
org.zkoss.zk.ui.UiException - if failed to load the engine.

newChartEngine

protected ChartEngine newChartEngine()
                              throws org.zkoss.zk.ui.UiException
Instantiates the default chart engine. It is called, if setEngine(org.zkoss.zul.impl.ChartEngine) is not called with non-null engine.

By default, it looks up the library property called org.zkoss.zul.chart.engine.class. If found, the value is assumed to be the class name of the chart engine (it must implement ChartEngine). If not found, UiException is thrown.

Derived class might override this method to provide your own default class.

Throws:
org.zkoss.zk.ui.UiException - if failed to instantiate the engine
Since:
3.0.0

setEngine

public void setEngine(ChartEngine engine)
Sets the chart engine.


setEngine

public void setEngine(String clsnm)
               throws ClassNotFoundException,
                      NoSuchMethodException,
                      IllegalAccessException,
                      InstantiationException,
                      InvocationTargetException
Sets the chart engine by use of a class name. It creates an instance automatically.

Throws:
ClassNotFoundException
NoSuchMethodException
IllegalAccessException
InstantiationException
InvocationTargetException

getAreaListener

public ChartAreaListener getAreaListener()
Returns the renderer to render each area, or null if the default renderer is used.


setAreaListener

public void setAreaListener(ChartAreaListener listener)
Sets the renderer which is used to render each area.

Note: changing a render will not cause the chart to re-render. If you want it to re-render, you could call smartDraw.

Parameters:
listener - the area listener, or null to ignore it.
Throws:
org.zkoss.zk.ui.UiException - if failed to initialize.

setAreaListener

public void setAreaListener(String clsnm)
                     throws ClassNotFoundException,
                            NoSuchMethodException,
                            IllegalAccessException,
                            InstantiationException,
                            InvocationTargetException
Sets the renderer by use of a class name. It creates an instance automatically.

Throws:
ClassNotFoundException
NoSuchMethodException
IllegalAccessException
InstantiationException
InvocationTargetException

smartDrawChart

protected void smartDrawChart()
mark a draw flag to inform that this Chart needs update.


addEventListener

public boolean addEventListener(String evtnm,
                                org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)
Specified by:
addEventListener in interface org.zkoss.zk.ui.Component
Overrides:
addEventListener in class org.zkoss.zk.ui.AbstractComponent

clone

public Object clone()
Specified by:
clone in interface org.zkoss.zk.ui.Component
Overrides:
clone in class XulElement


Copyright © 2014. All rights reserved.