|
GWT Tk 0.2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
asquare.gwt.tk.client.ui.EventWrapper
asquare.gwt.tk.client.ui.CWrapper
public class CWrapper
Wraps an widget to provide event processing via
controllers. The
wrapped widget will process events and notify listeners as if it was not
wrapped.
| Constructor Summary | |
|---|---|
CWrapper(Widget widget)
Creates a CWrapper around the specified widget. |
|
CWrapper(Widget widget,
List controllers)
Creates a CWrapper around the specified widget. |
|
| Method Summary | |
|---|---|
Widget |
addController(Controller controller)
Adds a controller to process events on this widget. |
protected List |
createControllers()
A factory method which gives subclasses the opportunity to override default controller creation. |
Controller |
getController(Class id)
Gets a controller with the specified id. |
protected void |
onAttach()
|
void |
onBrowserEvent(Event event)
Override to process browser events. |
protected void |
onDetach()
|
protected void |
onLoad()
|
protected void |
onUnload()
This method is called just before the widget is detached from the browser's document. |
Widget |
removeController(Controller controller)
Removes a controller |
void |
setControllers(List controllers)
Sets the controllers which will process events on this widget. |
void |
sinkEvents(int eventBits)
|
void |
unsinkEvents(int eventBits)
|
| Methods inherited from class asquare.gwt.tk.client.ui.EventWrapper |
|---|
getWidget, initWidget |
| Methods inherited from class com.google.gwt.user.client.ui.Composite |
|---|
getElement, setWidget |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached, removeFromParent |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleName, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CWrapper(Widget widget)
public CWrapper(Widget widget,
List controllers)
controllers if you wish to avoid controller
creation via createControllers(). Otherwise pass null.
controllers - a list of 0 or more controllers, or null
IllegalArgumentException - if element is null| Method Detail |
|---|
protected List createControllers()
nullpublic Controller getController(Class id)
ControllerSupport
getController in interface ControllerSupportid - a Class identifying the type of controller to get
nullpublic Widget addController(Controller controller)
ControllerSupport
addController in interface ControllerSupportcontroller - a controller to add
public Widget removeController(Controller controller)
ControllerSupport
removeController in interface ControllerSupportcontroller - a controller to remove
public void setControllers(List controllers)
ControllerSupportgetEventBits().
setControllers in interface ControllerSupportcontrollers - a list of 0 or more controllers, or nullpublic void sinkEvents(int eventBits)
sinkEvents in class UIObjectpublic void unsinkEvents(int eventBits)
unsinkEvents in class UIObjectprotected void onAttach()
onAttach in class EventWrapperprotected void onDetach()
onDetach in class Compositeprotected void onLoad()
onLoad in class Widgetprotected void onUnload()
public void onBrowserEvent(Event event)
EventWrapper
onBrowserEvent in interface EventListeneronBrowserEvent in class EventWrapper
|
GWT Tk 0.2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||