// easy extend and observe mouse events on a gwt horizontal panel widget
public class HorizontalEventPanel extends HorizontalPanel implements HasMouseOverHandlers, HasMouseOutHandlers {
public HorizontalEventPanel() {
sinkEvents(Event.MOUSEEVENTS);
}
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
return addDomHandler(handler, MouseOverEvent.getType());
}
public HandlerRegistration addMouseOutHandler(MouseOutHandler handler) {
return addDomHandler(handler, MouseOutEvent.getType());
}
}
No comments:
Post a Comment