本文整理了Java中com.harium.etyl.commons.event.KeyEvent.getState()
方法的一些代码示例,展示了KeyEvent.getState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyEvent.getState()
方法的具体详情如下:
包路径:com.harium.etyl.commons.event.KeyEvent
类名称:KeyEvent
方法名:getState
暂无
代码示例来源:origin: com.harium.etyl/etyl
private boolean checkSequence(KeyEvent event) {
// Ignore
if (event.getState() != KeyState.RELEASED) {
return false;
}
if (exitSequence < sequence.size()) {
int next = sequence.get(exitSequence);
if (event.getKey() == next) {
exitSequence++;
System.out.print("Nice: "+exitSequence);
} else {
exitSequence = 0;
}
}
return exitSequence >= sequence.size();
}
}
代码示例来源:origin: com.harium/etyl
@Override
public GUIEvent updateKeyboard(KeyEvent event) {
if (event.getState() == KeyState.TYPED) {
//Update component with typed events
if (event.getChar()!='\0') {
updateChar(event.getChar());
}
}
GUIEvent internalEvent = GUIEvent.NONE;
//TODO Next Component
//Update component with Pressed Events
if (event.getState() == KeyState.PRESSED) {
internalEvent = updatePressed(event);
if (internalEvent != GUIEvent.NONE) {
return internalEvent;
}
} else if(event.getState() == KeyState.RELEASED) {
internalEvent = updateReleased(event);
if (internalEvent != GUIEvent.NONE) {
return internalEvent;
}
}
//minMark = getMinMark();
//maxMark = getMaxMark();
return GUIEvent.NONE;
}
内容来源于网络,如有侵权,请联系作者删除!