GWT Tk 0.2.3

asquare.gwt.tk.client.ui.behavior
Class ControllerSupportDelegate

java.lang.Object
  extended by asquare.gwt.tk.client.ui.behavior.ControllerSupportDelegate

public class ControllerSupportDelegate
extends Object

A delegate class which manages controller bookkeeping and lifecycle. Ideally, this fuctionality would be in a superclass like Widget.


Constructor Summary
ControllerSupportDelegate(Widget widget)
          Creates a delegate for the specified widget.
 
Method Summary
 Widget addController(Controller controller)
           
 Controller getController(Class id)
           
 int getLegacyEventBits()
          Gets the event bits which were sunk on the widget itself.
 void onAttach()
           
 void onBrowserEvent(Event event)
           
 void onDetach()
           
 Widget removeController(Controller controller)
           
 void setControllers(List controllers)
           
 void sinkEvents(int eventBits)
           
 void unsinkEvents(int eventBits)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerSupportDelegate

public ControllerSupportDelegate(Widget widget)
Creates a delegate for the specified widget.

Method Detail

getLegacyEventBits

public int getLegacyEventBits()
Gets the event bits which were sunk on the widget itself. Used to determine which events should be passed to a widget's onBrowserEvent() method. This can happen when subclassing or wrapping a widget.

Returns:
a bitmask of the event types
See Also:
Event

sinkEvents

public void sinkEvents(int eventBits)

unsinkEvents

public void unsinkEvents(int eventBits)

getController

public Controller getController(Class id)

addController

public Widget addController(Controller controller)
Throws:
IllegalArgumentException - if controller is null

removeController

public Widget removeController(Controller controller)
Throws:
IllegalArgumentException - if controller is not present

setControllers

public void setControllers(List controllers)

onAttach

public void onAttach()

onDetach

public void onDetach()

onBrowserEvent

public void onBrowserEvent(Event event)

GWT Tk 0.2.3

© 2007 Mat Gessel