当前位置: 首页>>代码示例>>Java>>正文


Java NativeMouseEvent.getY方法代码示例

本文整理汇总了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);
}
 
开发者ID:vmonaco,项目名称:biologger,代码行数:17,代码来源:Listener.java

示例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);
}
 
开发者ID:vmonaco,项目名称:biologger,代码行数:17,代码来源:Listener.java

示例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);
}
 
开发者ID:vmonaco,项目名称:biologger,代码行数:26,代码来源:Listener.java

示例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);
}
 
开发者ID:vmonaco,项目名称:biologger,代码行数:14,代码来源:Listener.java

示例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);
}
 
开发者ID:GamesRythmAnalysis,项目名称:RNGames,代码行数:7,代码来源:MouseWriter.java

示例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);
}
 
开发者ID:GamesRythmAnalysis,项目名称:RNGames,代码行数:7,代码来源:MouseWriter.java

示例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;
}
 
开发者ID:MyRobotLab,项目名称:myrobotlab,代码行数:6,代码来源:Keyboard.java


注:本文中的org.jnativehook.mouse.NativeMouseEvent.getY方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。