Class PlotBand
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.PlotBand
-
- All Implemented Interfaces:
Serializable,ClientEventHandler,OptionDataListener,org.zkoss.json.JSONAware
public class PlotBand extends Optionable implements ClientEventHandler
A colored band stretching across the plot area marking an interval on the axis. In a gauge, a plot band on the Y axis (value axis) will stretch along the perimiter of the gauge.All the options in this class support
DynamicalAttribute.- Author:
- RaymondChao, jumperchen
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)Adds an event listener to this options.ColorgetBorderColor()Returns the border colorObjectgetBorderRadius()Returns the border radiusNumbergetBorderWidth()Returns the border width.StringgetClassName()Returns class name for styling by CSS.ColorgetColor()Returns the color of the plot band.Iterable<org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event>>getEventListeners(String evtnm)Returns an iterative collection of the event listeners for the given event.Set<String>getEventNames()Returns all event names, if any.NumbergetFrom()Returns the start position of the plot band in axis units.StringgetId()Returns an id used for identifying the plot band inAxis.removePlotBand(String).ObjectgetInnerRadius()Returns the inner radius.PlotLabelgetLabel()Returns text labels for the plot bandsObjectgetOuterRadius()Returns the outer radiusObjectgetThickness()Returns the width of the plot band stretching along the perimeter.NumbergetTo()Returns the end position of the plot band in axis units.NumbergetZIndex()Returns the z index of the plot band within the chart.booleanremoveEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)Removes an event listener.voidsetBorderColor(String color)Sets the border colorvoidsetBorderColor(Color color)Sets the border colorvoidsetBorderColor(LinearGradient color)Sets the border colorvoidsetBorderColor(RadialGradient color)Sets the border colorvoidsetBorderRadius(Number borderRadius)Sets the border radius.voidsetBorderRadius(String borderRadius)Sets the border radius.voidsetBorderWidth(Number borderWidth)Sets the border width.voidsetClassName(String className)Sets class name for styling by CSS.voidsetColor(String color)Sets the color of the plot band.voidsetColor(Color color)Sets the color of the plot band.voidsetColor(LinearGradient color)Sets the color of the plot band.voidsetColor(RadialGradient color)Sets the color of the plot band.voidsetFrom(Number from)Sets the start position of the plot band in axis units.voidsetId(String id)Sets an id used for identifying the plot band inAxis.removePlotBand(String).voidsetInnerRadius(Number innerRadius)Sets the inner radius.voidsetInnerRadius(String innerRadius)Sets the inner radius.voidsetLabel(String text)voidsetLabel(PlotLabel label)Sets text labels for the plot bandsvoidsetOuterRadius(Number outerRadius)Sets the outer radiusvoidsetOuterRadius(String outerRadius)Sets the outer radiusvoidsetThickness(Number thickness)Sets the width of the plot band stretching along the perimeter.voidsetThickness(String thickness)Sets the width of the plot band stretching along the perimeter.voidsetTo(Number to)Sets the end position of the plot band in axis units.voidsetZIndex(Number zIndex)Sets the z index of the plot band within the chart.StringtoJSONString()Encodes this object to a JSON string.-
Methods inherited from class org.zkoss.chart.Optionable
addExtraAttr, addOptionDataListener, clearOptonDataListener, clone, containsKey, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getAttr, getAttr, getClientState, getExtraAttr, merge, onChange, removeExtraAttr, removeKey, removeOptionDataListener, setAttr, setAttr, setAttr, setAttr, toString
-
-
-
-
Method Detail
-
getBorderColor
public Color getBorderColor()
Returns the border colorDefault: null
- Since:
- 11.4.7.0
-
setBorderColor
public void setBorderColor(Color color)
Sets the border color- Since:
- 11.4.7.0
-
setBorderColor
public void setBorderColor(String color)
Sets the border color- Since:
- 11.4.7.0
-
setBorderColor
public void setBorderColor(LinearGradient color)
Sets the border color- Since:
- 11.4.7.0
-
setBorderColor
public void setBorderColor(RadialGradient color)
Sets the border color- Since:
- 11.4.7.0
-
getBorderRadius
public Object getBorderRadius()
Returns the border radiusDefault: 0
- Since:
- 11.4.7.0
-
setBorderRadius
public void setBorderRadius(Number borderRadius)
Sets the border radius.- Since:
- 11.4.7.0
-
setBorderRadius
public void setBorderRadius(String borderRadius)
Sets the border radius.- Since:
- 11.4.7.0
-
getBorderWidth
public Number getBorderWidth()
Returns the border width.Default: 0.
- Since:
- 11.4.7.0
-
setBorderWidth
public void setBorderWidth(Number borderWidth)
Sets the border width.Default: 0.
- Since:
- 11.4.7.0
-
getClassName
public String getClassName()
Returns class name for styling by CSS.Default: null
- Since:
- 11.4.7.0
-
setClassName
public void setClassName(String className)
Sets class name for styling by CSS.- Since:
- 11.4.7.0
-
getColor
public Color getColor()
Returns the color of the plot band.Default: null.
-
setColor
public void setColor(Color color)
Sets the color of the plot band.
-
setColor
public void setColor(String color)
Sets the color of the plot band.
-
setColor
public void setColor(LinearGradient color)
Sets the color of the plot band.
-
setColor
public void setColor(RadialGradient color)
Sets the color of the plot band.
-
getFrom
public Number getFrom()
Returns the start position of the plot band in axis units.
-
setFrom
public void setFrom(Number from)
Sets the start position of the plot band in axis units. 'from the start position of the plot band in axis units.
-
getId
public String getId()
Returns an id used for identifying the plot band inAxis.removePlotBand(String).
-
setId
public void setId(String id)
Sets an id used for identifying the plot band inAxis.removePlotBand(String).
-
getInnerRadius
public Object getInnerRadius()
Returns the inner radius.
-
setInnerRadius
public void setInnerRadius(String innerRadius)
Sets the inner radius.
-
setInnerRadius
public void setInnerRadius(Number innerRadius)
Sets the inner radius.
-
getLabel
public PlotLabel getLabel()
Returns text labels for the plot bandsDefault: an instance of PlotLabel.
-
setLabel
public void setLabel(PlotLabel label)
Sets text labels for the plot bands
-
setLabel
public void setLabel(String text)
-
getOuterRadius
public Object getOuterRadius()
Returns the outer radiusDefault: null.
-
setOuterRadius
public void setOuterRadius(String outerRadius)
Sets the outer radius
-
setOuterRadius
public void setOuterRadius(Number outerRadius)
Sets the outer radius
-
getThickness
public Object getThickness()
Returns the width of the plot band stretching along the perimeter.In a gauge chart, this option sets the width of the plot band stretching along the perimeter. It can be given as a percentage string, like "10%", or as a pixel number, like 10. The default value 10 is the same as the default tickLength, thus making the plot band act as a background for the tick markers.
Default: 10
- Since:
- 11.2.0.0
-
setThickness
public void setThickness(Number thickness)
Sets the width of the plot band stretching along the perimeter.In a gauge chart, this option sets the width of the plot band stretching along the perimeter. It can be given as a percentage string, like "10%", or as a pixel number, like 10. The default value 10 is the same as the default tickLength, thus making the plot band act as a background for the tick markers.
- Since:
- 11.2.0.0
-
setThickness
public void setThickness(String thickness)
Sets the width of the plot band stretching along the perimeter.In a gauge chart, this option sets the width of the plot band stretching along the perimeter. It can be given as a percentage string, like "10%", or as a pixel number, like 10. The default value 10 is the same as the default tickLength, thus making the plot band act as a background for the tick markers.
- Since:
- 11.2.0.0
-
getTo
public Number getTo()
Returns the end position of the plot band in axis units.
-
setTo
public void setTo(Number to)
Sets the end position of the plot band in axis units.
-
getZIndex
public Number getZIndex()
Returns the z index of the plot band within the chart.Default: null
-
setZIndex
public void setZIndex(Number zIndex)
Sets the z index of the plot band within the chart.
-
addEventListener
public void addEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)
Adds an event listener to this options.- Specified by:
addEventListenerin interfaceClientEventHandler- Parameters:
evtnm- what event to listen (never null), i.e. onClick, onMouseOver, and so on.- Since:
- 1.2.0
-
removeEventListener
public boolean removeEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)
Removes an event listener.- Specified by:
removeEventListenerin interfaceClientEventHandler- Returns:
- whether the listener is removed; false if it was never added.
- Since:
- 1.2.0
-
getEventNames
public Set<String> getEventNames()
Returns all event names, if any.- Specified by:
getEventNamesin interfaceClientEventHandler- Since:
- 1.2.0
-
getEventListeners
public Iterable<org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event>> getEventListeners(String evtnm)
Returns an iterative collection of the event listeners for the given event.Note: it is OK to invoke
addEventListener(java.lang.String, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event>)orremoveEventListener(java.lang.String, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event>)when iterating through the event listeners with the returned collection.To remove an event listener from the returned iterative collection, you could invoke
Iterable.iterator()'sIterator.remove().- Specified by:
getEventListenersin interfaceClientEventHandler- Since:
- 1.2.0
-
toJSONString
public String toJSONString()
Description copied from class:OptionableEncodes this object to a JSON string. It is the same asOptionable.toString().- Specified by:
toJSONStringin interfaceorg.zkoss.json.JSONAware- Overrides:
toJSONStringin classOptionable
-
-