本文整理了Java中javax.swing.JTextPane.processKeyEvent()
方法的一些代码示例,展示了JTextPane.processKeyEvent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextPane.processKeyEvent()
方法的具体详情如下:
包路径:javax.swing.JTextPane
类名称:JTextPane
方法名:processKeyEvent
暂无
代码示例来源:origin: groovy/groovy-core
protected void processKeyEvent(KeyEvent e) {
super.processKeyEvent(e);
// Handle release of Insert key to toggle overtype/insert mode
// unless a modifier is active (eg Shift+Insert for paste or
// Ctrl+Insert for Copy)
if (e.getID() == KeyEvent.KEY_RELEASED &&
e.getKeyCode() == KeyEvent.VK_INSERT &&
e.getModifiersEx() == 0) {
setOvertypeMode(!isOvertypeMode());
}
}
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
protected void processKeyEvent(KeyEvent e)
{
super.processKeyEvent(e);
// Handle release of Insert key to toggle overtype/insert mode
if (e.getID() == KeyEvent.KEY_RELEASED &&
e.getKeyCode() == KeyEvent.VK_INSERT) {
setOvertypeMode(!isOvertypeMode());
}
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
protected void processKeyEvent(KeyEvent e)
{
super.processKeyEvent(e);
// Handle release of Insert key to toggle overtype/insert mode
if (e.getID() == KeyEvent.KEY_RELEASED &&
e.getKeyCode() == KeyEvent.VK_INSERT) {
setOvertypeMode(!isOvertypeMode());
}
}
代码示例来源:origin: org.kohsuke.droovy/groovy
protected void processKeyEvent(KeyEvent e)
{
super.processKeyEvent(e);
// Handle release of Insert key to toggle overtype/insert mode
if (e.getID() == KeyEvent.KEY_RELEASED &&
e.getKeyCode() == KeyEvent.VK_INSERT) {
setOvertypeMode(!isOvertypeMode());
}
}
代码示例来源:origin: antlr/antlrworks
@Override
protected void processKeyEvent(KeyEvent keyEvent) {
// If the document is not writable, emits a beep
if(writable) {
if(keyEvent.getKeyCode() == KeyEvent.VK_TAB && keyEvent.getID() == KeyEvent.KEY_PRESSED) {
int start = getSelectionStart();
int stop = getSelectionEnd();
if(start != stop) {
// Ident the lines covered by the selection
try {
indentText(start, stop, keyEvent.isShiftDown()?-1:1);
keyEvent.consume();
} catch (BadLocationException e) {
e.printStackTrace();
}
} else {
super.processKeyEvent(keyEvent);
}
} else {
super.processKeyEvent(keyEvent);
}
} else {
super.processKeyEvent(keyEvent);
}
}
代码示例来源:origin: org.codehaus.groovy/groovy-console
protected void processKeyEvent(KeyEvent e) {
super.processKeyEvent(e);
// Handle release of Insert key to toggle overtype/insert mode
// unless a modifier is active (eg Shift+Insert for paste or
// Ctrl+Insert for Copy)
if (e.getID() == KeyEvent.KEY_RELEASED &&
e.getKeyCode() == KeyEvent.VK_INSERT &&
e.getModifiersEx() == 0) {
setOvertypeMode(!isOvertypeMode());
}
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
protected void processKeyEvent(KeyEvent e) {
super.processKeyEvent(e);
// Handle release of Insert key to toggle overtype/insert mode
// unless a modifier is active (eg Shift+Insert for paste or
// Ctrl+Insert for Copy)
if (e.getID() == KeyEvent.KEY_RELEASED &&
e.getKeyCode() == KeyEvent.VK_INSERT &&
e.getModifiersEx() == 0) {
setOvertypeMode(!isOvertypeMode());
}
}
内容来源于网络,如有侵权,请联系作者删除!