Class ActiveWhen
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.ActiveWhen
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class ActiveWhen extends Optionable
Define a condition for when a track should be active and not.Can either be a function callback or a configuration object.
If a function is used, it should return a boolean for whether or not the track should be active. The function is called for each audio event, and receives a parameter object with time, and potentially point and value properties depending on the track. point is available if the audio event is related to a data point. value is available if the track is used as a context track, and valueInterval is used.
- Since:
- 11.2.0.0
- Author:
- Jamson Chan
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description ActiveWhen()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Number
getCrossingDown()
Returns track is only active when prop was above, and is now at or below this value.Number
getCrossingUp()
Returns track is only active when prop was below, and is now at or above this value.Number
getMax()
Returns track is only active when prop is below or at this value.Number
getMin()
Returns track is only active when prop is above or at this value.String
getProp()
Returns the point property to compare, for example y or x.void
setCrossingDown(Number crossingDown)
Sets track is only active when prop was above, and is now at or below this value.void
setCrossingUp(Number crossingUp)
Sets track is only active when prop was below, and is now at or above this value.void
setMax(Number max)
Sets track is only active when prop is below or at this value.void
setMin(Number min)
Sets track is only active when prop is above or at this value.void
setProp(String prop)
Sets the point property to compare, for example y or x.-
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, toJSONString, toString
-
-
-
-
Method Detail
-
getCrossingDown
public Number getCrossingDown()
Returns track is only active when prop was above, and is now at or below this value.If both crossingUp and crossingDown are defined, the track is active if either condition is met.
Default: null
-
setCrossingDown
public void setCrossingDown(Number crossingDown)
Sets track is only active when prop was above, and is now at or below this value.If both crossingUp and crossingDown are defined, the track is active if either condition is met.
-
getCrossingUp
public Number getCrossingUp()
Returns track is only active when prop was below, and is now at or above this value.If both crossingUp and crossingDown are defined, the track is active if either condition is met.
Default: null
-
setCrossingUp
public void setCrossingUp(Number crossingUp)
Sets track is only active when prop was below, and is now at or above this value.If both crossingUp and crossingDown are defined, the track is active if either condition is met.
-
getMax
public Number getMax()
Returns track is only active when prop is below or at this value.Default: null
-
setMax
public void setMax(Number max)
Sets track is only active when prop is below or at this value.
-
getMin
public Number getMin()
Returns track is only active when prop is above or at this value.Default: null
-
setMin
public void setMin(Number min)
Sets track is only active when prop is above or at this value.
-
getProp
public String getProp()
Returns the point property to compare, for example y or x.Default: null
-
setProp
public void setProp(String prop)
Sets the point property to compare, for example y or x.
-
-