public abstract class Controller extends Object
Controllers process and respond to application events.| Constructor and Description |
|---|
Controller() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(Controller controller)
Add a child controller.
|
boolean |
canHandle(AppEvent event)
Determines if the controller can handle the particular event.
|
boolean |
canHandle(AppEvent event,
boolean bubbleDown)
Determines if the controller can handle the particular event.
|
void |
forwardToChild(AppEvent event)
Forwards an event to any child controllers who can handle the event.
|
void |
forwardToView(View view,
AppEvent event)
Forward an event to a view.
|
void |
forwardToView(View view,
GwtEvent.Type<?> type,
Object data)
Forward an event to a view.
|
abstract void |
handleEvent(AppEvent event)
Processes the event.
|
public void addChild(Controller controller)
controller - the controller to addedpublic boolean canHandle(AppEvent event)
event - the eventtrue if event can be handled, false
otherwisepublic boolean canHandle(AppEvent event, boolean bubbleDown)
event - the eventbubbleDown - true to bubble down children controllerstrue if event can be handled, false
otherwisepublic void forwardToChild(AppEvent event)
event - the event to forwardpublic void forwardToView(View view, AppEvent event)
view - the view to forward the eventevent - the event to be forwardedpublic void forwardToView(View view, GwtEvent.Type<?> type, Object data)
view - the view to forward the eventtype - the event typedata - the event datapublic abstract void handleEvent(AppEvent event)
event - the current eventCopyright © 2014. All Rights Reserved.