Class Event
- java.lang.Object
-
- org.pepstock.charba.client.events.Event
-
- Direct Known Subclasses:
AbstractEvent
,AddHandlerEvent
,RemoveHandlerEvent
public abstract class Event extends Object
Base object for chart events which can be consumed by an handler.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Event()
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
dispatch(EventHandler handler)
Implemented by subclasses to dispatch event on the handler.Object
getSource()
Returns the source for this event.
It should be always a chart instance.abstract EventType
getType()
Returns the event type used to register this event to find handlers of the appropriate class.protected void
setSource(Object source)
Set the source that triggered this event.
It should be always a chart instance.
-
-
-
Method Detail
-
getType
public abstract EventType getType()
Returns the event type used to register this event to find handlers of the appropriate class.- Returns:
- the event type
-
getSource
public Object getSource()
Returns the source for this event.
It should be always a chart instance.- Returns:
- object representing the source of this event
-
dispatch
protected abstract void dispatch(EventHandler handler)
Implemented by subclasses to dispatch event on the handler.- Parameters:
handler
- handler instance
-
setSource
protected void setSource(Object source)
Set the source that triggered this event.
It should be always a chart instance.- Parameters:
source
- the source of this event.
-
-