本文整理了Java中com.jogamp.newt.event.KeyEvent.isAutoRepeat()
方法的一些代码示例,展示了KeyEvent.isAutoRepeat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyEvent.isAutoRepeat()
方法的具体详情如下:
包路径:com.jogamp.newt.event.KeyEvent
类名称:KeyEvent
方法名:isAutoRepeat
暂无
代码示例来源: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: 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: org.jogamp.jogl/jogl-all-noawt
protected void consumeKeyEvent(final KeyEvent e) {
boolean consumedE = false;
if( null != keyboardFocusHandler && !e.isAutoRepeat() ) {
consumedE = propagateKeyEvent(e, keyboardFocusHandler);
if(DEBUG_KEY_EVENT) {
if( consumedE ) {
System.err.println("consumeKeyEvent(kfh): "+e+", consumed: "+consumedE);
}
}
}
if( !consumedE ) {
for(int i = 0; !consumedE && i < keyListeners.size(); i++ ) {
consumedE = propagateKeyEvent(e, keyListeners.get(i));
}
if(DEBUG_KEY_EVENT) {
System.err.println("consumeKeyEvent(usr): "+e+", consumed: "+consumedE);
}
}
}
代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub
protected void consumeKeyEvent(final KeyEvent e) {
boolean consumedE = false;
if( null != keyboardFocusHandler && !e.isAutoRepeat() ) {
consumedE = propagateKeyEvent(e, keyboardFocusHandler);
if(DEBUG_KEY_EVENT) {
if( consumedE ) {
System.err.println("consumeKeyEvent(kfh): "+e+", consumed: "+consumedE);
}
}
}
if( !consumedE ) {
for(int i = 0; !consumedE && i < keyListeners.size(); i++ ) {
consumedE = propagateKeyEvent(e, keyListeners.get(i));
}
if(DEBUG_KEY_EVENT) {
System.err.println("consumeKeyEvent(usr): "+e+", consumed: "+consumedE);
}
}
}
代码示例来源: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.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.jogamp.jogl/jogl-all-noawt
@Override
public void keyPressed(final KeyEvent e) {
if( !e.isPrintableKey() || e.isAutoRepeat() ) {
return;
}
if(e.getKeyChar()=='r' && 0==e.getModifiers() && null!=parentWin) {
e.setConsumed(true);
glWindow.invokeOnNewThread(null, false, new Runnable() {
public void run() {
if(null == glWindow.getParent()) {
glWindow.reparentWindow(parentWin, -1, -1, 0 /* hints */);
} else {
final InsetsImmutable insets = glWindow.getInsets();
final int x, y;
if ( 0 >= insets.getTopHeight() ) {
// fail safe ..
x = 32;
y = 32;
} else {
x = insets.getLeftWidth();
y = insets.getTopHeight();
}
glWindow.reparentWindow(null, x, y, 0 /* hints */);
glWindow.setDefaultCloseOperation( glClosable ? WindowClosingMode.DISPOSE_ON_CLOSE : WindowClosingMode.DO_NOTHING_ON_CLOSE );
}
} } );
}
}
代码示例来源:origin: org.processing/core
keyChar,
keyCode,
nativeEvent.isAutoRepeat());
keyChar,
0,
nativeEvent.isAutoRepeat());
代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub
@Override
public void keyPressed(final KeyEvent e) {
if( !e.isPrintableKey() || e.isAutoRepeat() ) {
return;
代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt
@Override
public void keyPressed(final KeyEvent e) {
if( e.isAutoRepeat() || e.isConsumed() ) {
return;
内容来源于网络,如有侵权,请联系作者删除!