private static Map<String,String> getMouseInfo(MouseEvent event) {
Map<String,String> mouseInfo = new HashMap<String,String>();
int posX = -1;
int posY = -1;
try {
// In QTree class a SelectionEvent is translated to a ClickEvent,
// so position X and Y are not present (nativeEvent is null, is used to get the clientX and clientY)
posX = event.getClientX();
posY = event.getClientY();
} catch (Exception e) {
// Ignore
}
mouseInfo.put(EventDataI.MOUSE_X, String.valueOf(posX));
mouseInfo.put(EventDataI.MOUSE_Y, String.valueOf(posY));
return mouseInfo;
}
EventFactory.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:qafe-platform
作者:
评论列表
文章目录