|
|||||||||
| 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.
doit field to false to cancel the action.
DispatcherListener| Field Summary | |
|---|---|
static int |
AfterDispatch
Fires after an event has been dispatched (value is 960). |
static int |
BeforeDispatch
Fires before an event is dispatched (value is 955). |
| 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 app event to any controllers that can handle the particular event type. |
void |
dispatch(int type)
The dispatcher will query its controllers and pass the app event to controllers that can handle the particular event type. |
void |
dispatch(int type,
java.lang.Object data)
The dispatcher will query its controllers and pass the app event to controllers that can handle the particular event type. |
static void |
forwardEvent(AppEvent event)
Forwards an app event to the dispatcher. |
static void |
forwardEvent(int eventType)
Creates and forwards an app event to the dispatcher. |
static void |
forwardEvent(int eventType,
java.lang.Object data)
Creates and fowards an app event to the dispatcher. |
static void |
forwardEvent(int eventType,
java.lang.Object data,
boolean historyEvent)
Creates and fowards an app 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, fireEvent, fireEvent, getFiresEvents, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BeforeDispatch
public static final int AfterDispatch
| Method Detail |
|---|
public static void forwardEvent(AppEvent event)
event - the app eventpublic static void forwardEvent(int eventType)
eventType - the app event type
public static void forwardEvent(int eventType,
java.lang.Object data)
eventType - the app event typedata - the event data
public static void forwardEvent(int eventType,
java.lang.Object data,
boolean historyEvent)
eventType - the app 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 app eventpublic void dispatch(int type)
type - the event type
public void dispatch(int 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 | ||||||||