GWT Tk 0.2.3

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

java.lang.Object
  extended by asquare.gwt.tk.client.ui.behavior.EventDelegateAdaptor
      extended by asquare.gwt.tk.client.ui.behavior.ControllerAdaptor
All Implemented Interfaces:
Controller, EventDelegate
Direct Known Subclasses:
AbstractTabFocusController, AlertDialog.ArrowKeyFocusController, AlertDialog.HotKeyController, DragController, DragStyleController, DropDownPanel.OpenerController, GlassPanelControllerStandard, ModalDialog.FocusOnCloseController, ModalDialog.InitializeFocusController, ModalDialog.PositionDialogController, PreventSelectionController, TabFocusControllerStub

public abstract class ControllerAdaptor
extends EventDelegateAdaptor
implements Controller

This adaptor class provides stub implementations for Controller methods. Most controllers will be interested in plugIn(Widget), unplug(Widget) or onBrowserEvent().


Constructor Summary
ControllerAdaptor(Class id)
          Creates a ControllerAdaptor with the specified id.
ControllerAdaptor(int eventBits, Class id)
          Creates a ControllerAdaptor with the specified event mask and id.
 
Method Summary
 Class getId()
          Get the id of this controller.
 void plugIn(Widget widget)
          Called when the widget is attached to the DOM.
 void unplug(Widget widget)
          Called when the widget is detached from the DOM.
 
Methods inherited from class asquare.gwt.tk.client.ui.behavior.EventDelegateAdaptor
doBrowserEvent, getEventBits, onBrowserEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface asquare.gwt.tk.client.ui.behavior.EventDelegate
getEventBits, onBrowserEvent
 

Constructor Detail

ControllerAdaptor

public ControllerAdaptor(Class id)
Creates a ControllerAdaptor with the specified id.

Parameters:
id - the controller id

ControllerAdaptor

public ControllerAdaptor(int eventBits,
                         Class id)
Creates a ControllerAdaptor with the specified event mask and id.

Parameters:
eventBits - a bitmask representing the events this controller is interested in
id - the controller id
Method Detail

getId

public Class getId()
Description copied from interface: Controller
Get the id of this controller. Used for looking up a controller in a collection. Controllers with a single implementation will return the class of the controller. Controllers with multiple implementations will return the class of the interface or base class.

Specified by:
getId in interface Controller

plugIn

public void plugIn(Widget widget)
Description copied from interface: Controller
Called when the widget is attached to the DOM. Use to initialize widget, install special hooks and attach listeners.

Specified by:
plugIn in interface Controller
Parameters:
widget - the view to control

unplug

public void unplug(Widget widget)
Description copied from interface: Controller
Called when the widget is detached from the DOM. Use to remove listeners and null out any references set on the DOM.

Specified by:
unplug in interface Controller

GWT Tk 0.2.3

© 2007 Mat Gessel