|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.mvc.Controller
public abstract class Controller
Controllers
process and respond to application events.
Field Summary | |
---|---|
protected java.util.List<Controller> |
children
|
protected boolean |
initialized
|
protected Controller |
parent
|
Constructor Summary | |
---|---|
Controller()
|
Method Summary | |
---|---|
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,
EventType type,
java.lang.Object data)
Forward an event to a view. |
abstract void |
handleEvent(AppEvent event)
Processes the event. |
protected void |
initialize()
Called once prior to handleEvent being called. |
protected void |
registerEventTypes(EventType... types)
Registers the event type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<Controller> children
protected boolean initialized
protected Controller parent
Constructor Detail |
---|
public Controller()
Method Detail |
---|
public void addChild(Controller controller)
controller
- the controller to addedpublic boolean canHandle(AppEvent event)
event
- the event
true
if event can be handled, false
otherwisepublic boolean canHandle(AppEvent event, boolean bubbleDown)
event
- the eventbubbleDown
- true to bubble down children controllers
true
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, EventType type, java.lang.Object data)
view
- the view to forward the eventtype
- the event typedata
- the event datapublic abstract void handleEvent(AppEvent event)
event
- the current eventprotected void initialize()
protected void registerEventTypes(EventType... types)
types
- the event types
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |