Is it possible to have a custom widget use the @UiHandler notation for mouse events? e.g. when using GWT Designer could you right click on the custom widget, select add event handler, then select onClick. Rather than just onAttachOrDetach.
Regards Alex
I don't know how exactly GWT Designer detects those things, but
@UiHandlerlooks at the event argument's type to determine the event handler type and then looks at the type of theui:fieldreferened in the@UiHandlerfor a method returning aHandlerRegistrationand taking a single argument of the event handler type.In brief: you can very well use
@UiHandlerwith your own custom widgets, I just don't know how well GWT Designer supports this.See http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java