public void testMouseEvents() {
final Flag flag = new Flag();
manager = new HandlerManager(flag);
HandlerRegistration downRegistration = manager.addHandler(
MouseDownEvent.TYPE, new MouseDownHandler() {
public void onMouseDown(MouseDownEvent event) {
flag.flag = true;
}
});
HandlerRegistration upRegistration = manager.addHandler(MouseUpEvent.TYPE,
new MouseUpHandler() {
public void onMouseUp(MouseUpEvent event) {
flag.flag = true;
}
});
HandlerRegistration clickRegistration = manager.addHandler(ClickEvent.TYPE,
new ClickHandler() {
public void onClick(ClickEvent event) {
flag.flag = true;
}
});
HandlerRegistration dblclickRegistration = manager.addHandler(
DoubleClickEvent.TYPE, new DoubleClickHandler() {
public void onDoubleClick(DoubleClickEvent event) {
flag.flag = true;
}
});
HandlerRegistration outRegistration = manager.addHandler(
MouseOutEvent.TYPE, new MouseOutHandler() {
public void onMouseOut(MouseOutEvent event) {
flag.flag = true;
}
});
HandlerRegistration overRegistration = manager.addHandler(
MouseOverEvent.TYPE, new MouseOverHandler() {
public void onMouseOver(MouseOverEvent event) {
flag.flag = true;
}
});
HandlerRegistration moveRegistration = manager.addHandler(
MouseMoveEvent.TYPE, new MouseMoveHandler() {
public void onMouseMove(MouseMoveEvent event) {
flag.flag = true;
}
});
HandlerRegistration wheelRegistration = manager.addHandler(
MouseWheelEvent.TYPE, new MouseWheelHandler() {
public void onMouseWheel(MouseWheelEvent event) {
flag.flag = true;
}
});