|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.mvc.Dispatcher
public class Dispatcher
Dispatchers are responsible for dispatching application events to controllers.
BaseEvent.setCancelled(boolean)
.
DispatcherListener
Field Summary | |
---|---|
static EventType |
AfterDispatch
Fires after an event has been dispatched. |
static EventType |
BeforeDispatch
Fires before an event is dispatched. |
Method Summary | |
---|---|
void |
addController(Controller controller)
Adds a controller. |
void |
addDispatcherListener(DispatcherListener listener)
Adds a listener to receive dispatch events. |
void |
dispatch(AppEvent event)
The dispatcher will query its controllers and pass the application event to any controllers that can handle the particular event type. |
void |
dispatch(EventType type)
The dispatcher will query its controllers and pass the application event to controllers that can handle the particular event type. |
void |
dispatch(EventType type,
java.lang.Object data)
The dispatcher will query its controllers and pass the application event to controllers that can handle the particular event type. |
static void |
forwardEvent(AppEvent event)
Forwards an application event to the dispatcher. |
static void |
forwardEvent(EventType eventType)
Creates and forwards an application event to the dispatcher. |
static void |
forwardEvent(EventType eventType,
java.lang.Object data)
Creates and forwards an application event to the dispatcher. |
static void |
forwardEvent(EventType eventType,
java.lang.Object data,
boolean historyEvent)
Creates and forwards an application event to the dispatcher. |
static Dispatcher |
get()
Returns the singleton instance. |
java.util.List<Controller> |
getControllers()
Returns all controllers. |
java.util.Map<java.lang.String,AppEvent> |
getHistory()
Returns the dispatcher's history cache. |
void |
removeController(Controller controller)
Removes a controller. |
void |
removeDispatcherListener(DispatcherListener listener)
Removes a previously added listener. |
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable |
---|
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final EventType BeforeDispatch
public static final EventType AfterDispatch
Method Detail |
---|
public static void forwardEvent(AppEvent event)
event
- the application eventpublic static void forwardEvent(EventType eventType)
eventType
- the application event typepublic static void forwardEvent(EventType eventType, java.lang.Object data)
eventType
- the application event typedata
- the event datapublic static void forwardEvent(EventType eventType, java.lang.Object data, boolean historyEvent)
eventType
- the application event typedata
- the event datahistoryEvent
- true to mark event as a history eventpublic static Dispatcher get()
public void addController(Controller controller)
controller
- the controller to be addedpublic void addDispatcherListener(DispatcherListener listener)
listener
- the listener to addpublic void dispatch(AppEvent event)
event
- the application eventpublic void dispatch(EventType type)
type
- the event typepublic void dispatch(EventType type, java.lang.Object data)
type
- the event typedata
- the app event datapublic java.util.List<Controller> getControllers()
public java.util.Map<java.lang.String,AppEvent> getHistory()
public void removeController(Controller controller)
controller
- the controller to be removedpublic void removeDispatcherListener(DispatcherListener listener)
listener
- the listener to be removed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |