本文整理汇总了Java中com.google.gwt.event.dom.client.MouseEvent.getY方法的典型用法代码示例。如果您正苦于以下问题:Java MouseEvent.getY方法的具体用法?Java MouseEvent.getY怎么用?Java MouseEvent.getY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.event.dom.client.MouseEvent
的用法示例。
在下文中一共展示了MouseEvent.getY方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findAtomicNodeForMouseEvent
import com.google.gwt.event.dom.client.MouseEvent; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
private Node findAtomicNodeForMouseEvent(MouseEvent me) {
double x = (((double) me.getX()) / ((double) _gc.width()));
double y = (((double) me.getY()) / ((double) _gc.height()));
return _graph.findAtomicNodeAt(new Point(x, y));
}
示例2: FromMouseEventRelative
import com.google.gwt.event.dom.client.MouseEvent; //导入方法依赖的package包/类
public static Point FromMouseEventRelative(MouseEvent event) {
return new Point(event.getX(), event.getY());
}
示例3: getPosition
import com.google.gwt.event.dom.client.MouseEvent; //导入方法依赖的package包/类
/**
* Get the position of a mouse event.
*
* @param event
* The mouse event itself.
* @return Returns a coordinate holding the event's X and Y ordinate, where the origin is the upper left corner of
* the DOM element catching the event. If used in a
* {@link org.geomajas.gwt.client.controller.GraphicsController}, these are screen coordinates.
*/
public static Coordinate getPosition(MouseEvent<?> event) {
return new Coordinate(event.getX(), event.getY());
}