protected void setupDelegatingMouseDownHandler() {
widgetContainer.addDomHandler(new MouseDownHandler() {
@Override
public void onMouseDown(final MouseDownEvent event) {
gridLayer.onNodeMouseDown(new NodeMouseDownEvent(event) {
@Override
public int getX() {
//Adjust the x-coordinate (relative to the DOM Element) to be relative to the GridCanvas.
return super.getX() + widgetContainer.getElement().getOffsetLeft();
}
@Override
public int getY() {
//Adjust the y-coordinate (relative to the DOM Element) to be relative to the GridCanvas.
return super.getY() + widgetContainer.getElement().getOffsetTop();
}
});
}
},
MouseDownEvent.getType());
}
BaseDOMElement.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:appformer
作者:
评论列表
文章目录