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 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.Color
getBorderColor()
Returns the border colorObject
getBorderRadius()
Returns the border radiusNumber
getBorderWidth()
Returns the border width.String
getClassName()
Returns class name for styling by CSS.Color
getColor()
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.Number
getFrom()
Returns the start position of the plot band in axis units.String
getId()
Returns an id used for identifying the plot band inAxis.removePlotBand(String)
.Object
getInnerRadius()
Returns the inner radius.PlotLabel
getLabel()
Returns text labels for the plot bandsObject
getOuterRadius()
Returns the outer radiusObject
getThickness()
Returns the width of the plot band stretching along the perimeter.Number
getTo()
Returns the end position of the plot band in axis units.Number
getZIndex()
Returns the z index of the plot band within the chart.boolean
removeEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener)
Removes an event listener.void
setBorderColor(String color)
Sets the border colorvoid
setBorderColor(Color color)
Sets the border colorvoid
setBorderColor(LinearGradient color)
Sets the border colorvoid
setBorderColor(RadialGradient color)
Sets the border colorvoid
setBorderRadius(Number borderRadius)
Sets the border radius.void
setBorderRadius(String borderRadius)
Sets the border radius.void
setBorderWidth(Number borderWidth)
Sets the border width.void
setClassName(String className)
Sets class name for styling by CSS.void
setColor(String color)
Sets the color of the plot band.void
setColor(Color color)
Sets the color of the plot band.void
setColor(LinearGradient color)
Sets the color of the plot band.void
setColor(RadialGradient color)
Sets the color of the plot band.void
setFrom(Number from)
Sets the start position of the plot band in axis units.void
setId(String id)
Sets an id used for identifying the plot band inAxis.removePlotBand(String)
.void
setInnerRadius(Number innerRadius)
Sets the inner radius.void
setInnerRadius(String innerRadius)
Sets the inner radius.void
setLabel(String text)
void
setLabel(PlotLabel label)
Sets text labels for the plot bandsvoid
setOuterRadius(Number outerRadius)
Sets the outer radiusvoid
setOuterRadius(String outerRadius)
Sets the outer radiusvoid
setThickness(Number thickness)
Sets the width of the plot band stretching along the perimeter.void
setThickness(String thickness)
Sets the width of the plot band stretching along the perimeter.void
setTo(Number to)
Sets the end position of the plot band in axis units.void
setZIndex(Number zIndex)
Sets the z index of the plot band within the chart.String
toJSONString()
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:
addEventListener
in 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:
removeEventListener
in 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:
getEventNames
in 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:
getEventListeners
in interfaceClientEventHandler
- Since:
- 1.2.0
-
toJSONString
public String toJSONString()
Description copied from class:Optionable
Encodes this object to a JSON string. It is the same asOptionable.toString()
.- Specified by:
toJSONString
in interfaceorg.zkoss.json.JSONAware
- Overrides:
toJSONString
in classOptionable
-
-