|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sencha.gxt.legacy.client.mvc.Dispatcher
public class Dispatcher
Dispatchers are responsible for dispatching application events to controllers.
CancellableEvent.setCancelled(boolean).
DispatcherListener| Field Summary | |
|---|---|
static GwtEvent.Type<DispatcherListener> |
AfterDispatch
Fires after an event has been dispatched. |
static GwtEvent.Type<DispatcherListener> |
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(GwtEvent.Type<?> type)
The dispatcher will query its controllers and pass the application event to controllers that can handle the particular event type. |
void |
dispatch(GwtEvent.Type<?> type,
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(GwtEvent.Type<?> eventType)
Creates and forwards an application event to the dispatcher. |
static void |
forwardEvent(GwtEvent.Type<?> eventType,
Object data)
Creates and forwards an application event to the dispatcher. |
static void |
forwardEvent(GwtEvent.Type<?> eventType,
Object data,
boolean historyEvent)
Creates and forwards an application event to the dispatcher. |
static Dispatcher |
get()
Returns the singleton instance. |
List<Controller> |
getControllers()
Returns all controllers. |
Map<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 java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final GwtEvent.Type<DispatcherListener> BeforeDispatch
public static final GwtEvent.Type<DispatcherListener> AfterDispatch
| Method Detail |
|---|
public static void forwardEvent(AppEvent event)
event - the application eventpublic static void forwardEvent(GwtEvent.Type<?> eventType)
eventType - the application event type
public static void forwardEvent(GwtEvent.Type<?> eventType,
Object data)
eventType - the application event typedata - the event data
public static void forwardEvent(GwtEvent.Type<?> eventType,
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(GwtEvent.Type<?> type)
type - the event type
public void dispatch(GwtEvent.Type<?> type,
Object data)
type - the event typedata - the app event datapublic List<Controller> getControllers()
public Map<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 | |||||||||