Package org.zkoss.chart
Class OptionDataEvent
- java.lang.Object
-
- org.zkoss.chart.OptionDataEvent
-
- All Implemented Interfaces:
org.zkoss.json.JSONAware
public class OptionDataEvent extends Object implements org.zkoss.json.JSONAware
Defines an event that encapsulates changes to a highcharts's optionable data.- Author:
- jumperchen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OptionDataEvent.EventType
Defines some states of OptionDataEvent forOptionable
's attributes
-
Constructor Summary
Constructors Constructor Description OptionDataEvent(Optionable optionable, OptionDataEvent.EventType type, Object... pair)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OptionDataEvent
addJSFunctionCall(DeferredCall call)
Adds the Javascript function call to update at client side.String
getKey()
Returns the first key that triggered with the eventSet<String>
getKeys()
Returns the keys that triggered with the eventOptionable
getOriginTarget()
Returns the origin target.OptionDataEvent.EventType
getOriginType()
Returns the origin type of the event.Optionable
getTarget()
Returns the current target.OptionDataEvent.EventType
getType()
Returns the current type of the event.Object
getValue(String key)
Returns the value of the given key that triggered with the event.boolean
hasJSFunctionCall()
Returns wthere the event contines with some Javascript function calls.boolean
isJSUpldateCall()
Returns whether the JSFunction call has a command for whole updating.void
setCurrentTarget(Optionable current)
Sets the current target, which is used forOptionDataListener
implementationvoid
setCurrentType(OptionDataEvent.EventType type)
Sets the current type of the event, which is used forOptionDataListener
implementationOptionDataEvent
setJSUpdateCall(boolean updateCall)
Sets whether the JSFunction call is for updating the whole optionable data.String
toJSONString()
String
toString()
-
-
-
Constructor Detail
-
OptionDataEvent
public OptionDataEvent(Optionable optionable, OptionDataEvent.EventType type, Object... pair)
-
-
Method Detail
-
getOriginTarget
public Optionable getOriginTarget()
Returns the origin target.
-
setCurrentTarget
public void setCurrentTarget(Optionable current)
Sets the current target, which is used forOptionDataListener
implementation- Parameters:
current
- the current target when the listener received, if any.
-
getTarget
public Optionable getTarget()
Returns the current target.- See Also:
getOriginTarget()
-
getOriginType
public OptionDataEvent.EventType getOriginType()
Returns the origin type of the event.
-
getType
public OptionDataEvent.EventType getType()
Returns the current type of the event.
-
setCurrentType
public void setCurrentType(OptionDataEvent.EventType type)
Sets the current type of the event, which is used forOptionDataListener
implementation- Parameters:
type
- the current type of the event.- Since:
- 3.0.2
-
getValue
public Object getValue(String key)
Returns the value of the given key that triggered with the event.- Parameters:
key
- the property key inOptionable
-
getKey
public String getKey()
Returns the first key that triggered with the event
-
addJSFunctionCall
public OptionDataEvent addJSFunctionCall(DeferredCall call)
Adds the Javascript function call to update at client side.
-
setJSUpdateCall
public OptionDataEvent setJSUpdateCall(boolean updateCall)
- Parameters:
updateCall
-
-
isJSUpldateCall
public boolean isJSUpldateCall()
Returns whether the JSFunction call has a command for whole updating.
-
hasJSFunctionCall
public boolean hasJSFunctionCall()
Returns wthere the event contines with some Javascript function calls.- Returns:
- true if contains
-
toJSONString
public String toJSONString()
- Specified by:
toJSONString
in interfaceorg.zkoss.json.JSONAware
-
-