com.jogamp.newt.event.KeyEvent.getWhen()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(156)

本文整理了Java中com.jogamp.newt.event.KeyEvent.getWhen()方法的一些代码示例,展示了KeyEvent.getWhen()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyEvent.getWhen()方法的具体详情如下:
包路径:com.jogamp.newt.event.KeyEvent
类名称:KeyEvent
方法名:getWhen

KeyEvent.getWhen介绍

暂无

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public void keyPressed(KeyEvent evt) {
  int code = convertNewtKey(evt.getKeySymbol());
  KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), true, evt.isAutoRepeat());
  keyEvent.setTime(evt.getWhen());
  synchronized (eventQueue){
    eventQueue.add(keyEvent);
  }
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public void keyReleased(KeyEvent evt) {
  int code = convertNewtKey(evt.getKeySymbol());
  KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), false, evt.isAutoRepeat());
  keyEvent.setTime(evt.getWhen());
  synchronized (eventQueue) {
    eventQueue.add(keyEvent);
  }
}

代码示例来源:origin: jzy3d/jzy3d-api

protected java.awt.event.KeyEvent convertEvent(KeyEvent event, int eventId) {
  return new java.awt.event.KeyEvent(source, eventId, event.getWhen(), AWTToNewtUtilities.mask(event), AWTToNewtUtilities.mapKeyCode(event), event.getKeyChar());
}

代码示例来源:origin: org.jmonkeyengine/jme3-jogl

public void keyReleased(KeyEvent evt) {
  int code = convertNewtKey(evt.getKeySymbol());
  KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), false, evt.isAutoRepeat());
  keyEvent.setTime(evt.getWhen());
  synchronized (eventQueue) {
    eventQueue.add(keyEvent);
  }
}

代码示例来源:origin: org.jmonkeyengine/jme3-jogl

public void keyPressed(KeyEvent evt) {
  int code = convertNewtKey(evt.getKeySymbol());
  KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), true, evt.isAutoRepeat());
  keyEvent.setTime(evt.getWhen());
  synchronized (eventQueue){
    eventQueue.add(keyEvent);
  }
}

代码示例来源:origin: org.processing/core

KeyEvent ke = new KeyEvent(nativeEvent, nativeEvent.getWhen(),
              peAction, peModifiers,
              keyChar,
  KeyEvent tke = new KeyEvent(nativeEvent, nativeEvent.getWhen(),
                KeyEvent.TYPE, peModifiers,
                keyChar,

相关文章