本文整理汇总了Java中org.jnativehook.mouse.NativeMouseEvent.getY方法的典型用法代码示例。如果您正苦于以下问题:Java NativeMouseEvent.getY方法的具体用法?Java NativeMouseEvent.getY怎么用?Java NativeMouseEvent.getY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jnativehook.mouse.NativeMouseEvent
的用法示例。
在下文中一共展示了NativeMouseEvent.getY方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: nativeMouseDragged
import org.jnativehook.mouse.NativeMouseEvent; //导入方法依赖的package包/类
@Override
public void nativeMouseDragged(NativeMouseEvent event) {
BioMotionEvent bioEvent = new BioMotionEvent();
bioEvent.time = event.getWhen();
bioEvent.x = event.getX();
bioEvent.y = event.getY();
bioEvent.modifier_code = event.getModifiers();
bioEvent.modifier_name = NativeMouseEvent.getModifiersText(
event.getModifiers()).toLowerCase().replace(' ','_');
bioEvent.dragged = 1;
mBuffer.addEvent(bioEvent);
BioLogger.LOGGER.info("Mouse dragged:: position: " + bioEvent.x + ", " + bioEvent.y);
}
示例2: nativeMouseMoved
import org.jnativehook.mouse.NativeMouseEvent; //导入方法依赖的package包/类
@Override
public void nativeMouseMoved(NativeMouseEvent event) {
BioMotionEvent bioEvent = new BioMotionEvent();
bioEvent.time = event.getWhen();
bioEvent.x = event.getX();
bioEvent.y = event.getY();
bioEvent.modifier_code = event.getModifiers();
bioEvent.modifier_name = NativeMouseEvent.getModifiersText(
event.getModifiers()).toLowerCase().replace(' ','_');
bioEvent.dragged = 0;
mBuffer.addEvent(bioEvent);
BioLogger.LOGGER.info("Mouse moved:: position: " + bioEvent.x + ", " + bioEvent.y);
}
示例3: nativeMousePressed
import org.jnativehook.mouse.NativeMouseEvent; //导入方法依赖的package包/类
@Override
public void nativeMousePressed(NativeMouseEvent event) {
if (mActiveButtons.containsKey(event.getButton())) {
return;
}
BioClickEvent bioEvent = new BioClickEvent();
bioEvent.press_time = event.getWhen();
bioEvent.button_code = event.getButton();
bioEvent.modifier_code = event.getModifiers();
bioEvent.modifier_name = NativeMouseEvent.getModifiersText(
event.getModifiers()).toLowerCase().replace(' ','_');
bioEvent.press_x = event.getX();
bioEvent.press_y = event.getY();
Rectangle capture = new Rectangle(event.getX() - CAPTURE_DELTA_X, event.getY() - CAPTURE_DELTA_Y,
CAPTURE_DELTA_X * 2, CAPTURE_DELTA_Y * 2);
bioEvent.image = Utility.screenCapture(capture);
mActiveButtons.put(event.getButton(), bioEvent);
BioLogger.LOGGER.info("Mouse pressed:: button: " + bioEvent.button_code + ", position: " + bioEvent.press_x
+ ", " + bioEvent.press_y);
}
示例4: nativeMouseReleased
import org.jnativehook.mouse.NativeMouseEvent; //导入方法依赖的package包/类
@Override
public void nativeMouseReleased(NativeMouseEvent event) {
BioClickEvent bioEvent = mActiveButtons.remove(event.getButton());
bioEvent.release_time = event.getWhen();
bioEvent.release_x = event.getX();
bioEvent.release_y = event.getY();
mBuffer.addEvent(bioEvent);
BioLogger.LOGGER.info("Mouse released:: button: " + bioEvent.button_code + ", position: " + bioEvent.release_x
+ ", " + bioEvent.release_y);
}
示例5: generateMouseButtonEntry
import org.jnativehook.mouse.NativeMouseEvent; //导入方法依赖的package包/类
private String generateMouseButtonEntry(String eventType, NativeMouseEvent evt) {
return EVENT_NAME + " " + evt.getButton() + " " + eventType + CSV_SEPARATOR //$NON-NLS-1$ //$NON-NLS-2$
+ evt.getX() + CSV_SEPARATOR
+ evt.getY() + CSV_SEPARATOR
+ (evt.getWhen() - this.startTime);
}
示例6: generateMouseMoveEntry
import org.jnativehook.mouse.NativeMouseEvent; //导入方法依赖的package包/类
private String generateMouseMoveEntry(NativeMouseEvent evt) {
return EVENT_NAME + " " + MOVED_EVENT + CSV_SEPARATOR //$NON-NLS-1$
+ evt.getX() + CSV_SEPARATOR
+ evt.getY() + CSV_SEPARATOR
+ (evt.getWhen() - this.startTime);
}
示例7: publishMouseMoved
import org.jnativehook.mouse.NativeMouseEvent; //导入方法依赖的package包/类
public MouseEvent publishMouseMoved(NativeMouseEvent me) {
mouseEvent.pos.x = me.getX();
mouseEvent.pos.y = me.getY();
return mouseEvent;
}