public void forwardMouseMove(final int clientX, final int clientY) {
if (hiddenAvatar == null) {
return;
}
MouseMoveEvent mouseEvent = new MouseMoveEvent() {
@Override
public int getClientX() {
return clientX;
}
@Override
public int getClientY() {
return clientY;
}
@Override
public int getRelativeX(com.google.gwt.dom.client.Element target) {
return getClientX() - target.getAbsoluteLeft()
+ target.getScrollLeft()
+ target.getOwnerDocument().getScrollLeft();
}
@Override
public int getRelativeY(com.google.gwt.dom.client.Element target) {
return getClientY() - target.getAbsoluteTop()
+ target.getScrollTop()
+ target.getOwnerDocument().getScrollTop();
}
@Override
public Object getSource() {
return hiddenAvatar;
}
};
mouseEvent.setRelativeElement(hiddenAvatar.getElement());
hiddenAvatar.fireEvent(mouseEvent);
}