Package org.zkoss.chart
Class GlobalContextTrack
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.GlobalTrack
-
- org.zkoss.chart.GlobalContextTrack
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
- Direct Known Subclasses:
ContextTracks
public class GlobalContextTrack extends GlobalTrack
Context tracks to add globally, an array of either instrument tracks, speech tracks, or a mix.Context tracks are not tied to data points, but play at a set interval - either based on time or on prop values.
- 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 GlobalContextTrack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Number
getTimeInterval()
Returns a context track to play periodically every timeInterval milliseconds while the sonification is playing.Number
getValueInterval()
Returns a context track to play periodically every valueInterval units of a data property valueProp while the sonification is playing.String
getValueMapFunction()
Returns how to map context events to time when using thevalueInterval
option.String
getValueProp()
Returns the point property to play context for when usingvalueInterval
.void
setTimeInterval(Number timeInterval)
Sets a context track to play periodically every timeInterval milliseconds while the sonification is playing.void
setValueInterval(Number valueInterval)
Sets a context track to play periodically every valueInterval units of a data property valueProp while the sonification is playing.void
setValueMapFunction(String valueMapFunction)
Sets how to map context events to time when using thevalueInterval
option.void
setValueProp(String valueProp)
Sets the point property to play context for when usingvalueInterval
.-
Methods inherited from class org.zkoss.chart.GlobalTrack
getActiveWhen, getInstrument, getMapping, getMidiName, getPointGrouping, getType, isRoundToMusicalNotes, isShowPlayMarker, setActiveWhen, setActiveWhen, setInstrument, setMapping, setMidiName, setPointGrouping, setRoundToMusicalNotes, setShowPlayMarker, setType
-
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
-
getTimeInterval
public Number getTimeInterval()
Returns a context track to play periodically every timeInterval milliseconds while the sonification is playing.Default:
null
-
setTimeInterval
public void setTimeInterval(Number timeInterval)
Sets a context track to play periodically every timeInterval milliseconds while the sonification is playing.
-
getValueInterval
public Number getValueInterval()
Returns a context track to play periodically every valueInterval units of a data property valueProp while the sonification is playing.For example, setting valueProp to x and valueInterval to 5 will play the context track for every 5th X value.
The context audio events will be mapped to time according to the prop value relative to the min/max values for that prop.
Default:
null
-
setValueInterval
public void setValueInterval(Number valueInterval)
Sets a context track to play periodically every valueInterval units of a data property valueProp while the sonification is playing.For example, setting valueProp to x and valueInterval to 5 will play the context track for every 5th X value.
The context audio events will be mapped to time according to the prop value relative to the min/max values for that prop.
-
getValueMapFunction
public String getValueMapFunction()
Returns how to map context events to time when using thevalueInterval
option.Default:
"linear"
-
setValueMapFunction
public void setValueMapFunction(String valueMapFunction)
Sets how to map context events to time when using thevalueInterval
option.
-
getValueProp
public String getValueProp()
Returns the point property to play context for when usingvalueInterval
.Default:
"x"
-
setValueProp
public void setValueProp(String valueProp)
Sets the point property to play context for when usingvalueInterval
.
-
-