final HandlerManager manager2 = new HandlerManager("source2");
manager.addHandler(MouseDownEvent.getType(), mouse1);
manager.addHandler(MouseDownEvent.getType(), new MouseDownHandler() {
@Override
public void onMouseDown(MouseDownEvent event) {
manager2.fireEvent(event);
}
});
manager.addHandler(MouseDownEvent.getType(), mouse3);
manager2.addHandler(MouseDownEvent.getType(), adaptor1);
manager2.addHandler(MouseDownEvent.getType(), new MouseDownHandler() {
@Override
public void onMouseDown(MouseDownEvent event) {
assertEquals("source2", event.getSource());
assertSame(masterEvent, event);
}
});
manager.addHandler(MouseDownEvent.getType(), new MouseDownHandler() {
@Override
public void onMouseDown(MouseDownEvent event) {
assertEquals("source1", event.getSource());
assertSame(masterEvent, event);