GWT Tk 0.2.3

asquare.gwt.tk.client.ui.behavior
Interface ControllerSupport

All Superinterfaces:
EventListener
All Known Implementing Classes:
AlertDialog, BasicPanel, CComplexPanel, CPopupPanel, CWidget, CWrapper, DropDownPanel, GlassPanel, ModalDialog, ModalDialog.CaptionWrapper

public interface ControllerSupport
extends EventListener

An interface implemented by widgets which support event handling via controllers.


Method Summary
 Widget addController(Controller controller)
          Adds a controller to process events on this widget.
 Controller getController(Class id)
          Gets a controller with the specified id.
 Widget removeController(Controller controller)
          Removes a controller
 void setControllers(List controllers)
          Sets the controllers which will process events on this widget.
 
Methods inherited from interface com.google.gwt.user.client.EventListener
onBrowserEvent
 

Method Detail

setControllers

void setControllers(List controllers)
Sets the controllers which will process events on this widget. Clears out the current controllers, if any. When the widget is added to the DOM, received events will be delegated to each controller which declares the event's type via getEventBits().

Parameters:
controllers - a list of 0 or more controllers, or null

getController

Controller getController(Class id)
Gets a controller with the specified id. The id is often an interface or base class, as controllers can have multiple implementations. Used to modify the behavior of existing widgets.

Parameters:
id - a Class identifying the type of controller to get
Returns:
the first controller matching the id, or null

addController

Widget addController(Controller controller)
Adds a controller to process events on this widget. Multiple controllers may be added.

Parameters:
controller - a controller to add
Returns:
the widget this call was made on (for convenience)

removeController

Widget removeController(Controller controller)
Removes a controller

Parameters:
controller - a controller to remove
Returns:
the widget this call was made on (for convenience)
Throws:
IllegalArgumentException - if controller is not present

GWT Tk 0.2.3

© 2007 Mat Gessel