asquare.gwt.tk.client.ui.behavior
Interface Controller
- All Superinterfaces:
- EventDelegate
- All Known Subinterfaces:
- GlassPanelController, TabFocusController
- All Known Implementing Classes:
- AbstractTabFocusController, AlertDialog.ArrowKeyFocusController, AlertDialog.HotKeyController, ControllerAdaptor, DragController, DragStyleController, DropDownPanel.OpenerController, GlassPanelControllerIE6, GlassPanelControllerIE6ImplQuirks, GlassPanelControllerIE6ImplStrict, GlassPanelControllerSafari, GlassPanelControllerStandard, ModalDialog.FocusOnCloseController, ModalDialog.InitializeFocusController, ModalDialog.PositionDialogController, ModalDialog.PositionDialogControllerIE6, PreventSelectionController, PreventSelectionControllerIE6, PreventSelectionControllerStandard, TabFocusControllerMozilla, TabFocusControllerStandard, TabFocusControllerStub
public interface Controller
- extends EventDelegate
A pluggable event handler which processes delegated events from
Widget.onBrowserEvent(Event). Controllers are typically created via a
factory method in the widget. Controllers can be added to and removed from
the widget at any time by calling plugIn(Widget) and
unplug(Widget).
Controllers can be used to:
- encapsulate browser behavioral differences (controller implementation
class can be instantiated via GWT.create())
- install hooks for unsupported events (e.g. onselectstart)
- handle dependencies
- cancel events
- track state of input operations (e.g. mouse state for drag operation)
Usage notes:
- controllers should only be notified of events which are declared by
getEventBits()
- controller notification order indeterminate
- controllers instantiated via deferred binding must have a default
constructor
- stateless controllers can be shared
|
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. |
getId
Class getId()
- 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.
plugIn
void plugIn(Widget widget)
- Called when the widget is attached to the DOM. Use to initialize widget,
install special hooks and attach listeners.
- Parameters:
widget - the view to control
unplug
void unplug(Widget widget)
- Called when the widget is detached from the DOM. Use to remove listeners
and null out any references set on the DOM.
- Parameters:
widget -
© 2007 Mat Gessel