javax.swing.JMenuBar.processKeyBinding()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(128)

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

JMenuBar.processKeyBinding介绍

暂无

代码示例

代码示例来源:origin: freeplane/freeplane

@Override
  public boolean processKeyBinding(final KeyStroke ks, final KeyEvent e, final int condition, final boolean pressed) {
    // ignore key events without modifiers if text component is a source
    if (e.getKeyChar() != KeyEvent.CHAR_UNDEFINED && e.getKeyChar() != '\0' && e.getKeyChar() != KeyEvent.VK_ESCAPE
        && 0 == (e.getModifiers() & ~KEY_MODIFIERS) && e.getSource() instanceof JTextComponent) {
      return false;
    }
    if (keyEventProcessor.processKeyBinding(ks, e) || super.processKeyBinding(ks, e, condition, pressed)) {
      return true;
    }
    final KeyStroke derivedKS = FreeplaneMenuBar.derive(ks, e.getKeyChar());
    if (derivedKS == ks) {
      return false;
    }
    return super.processKeyBinding(derivedKS, e, condition, pressed);
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide-loaders

mods |= KeyEvent.ALT_DOWN_MASK;
} else if (!isAlt && !isCtrl) {
  return super.processKeyBinding (ks, e, condition, pressed);
  !ks.isOnKeyRelease());
boolean result = super.processKeyBinding (newStroke, newEvent, 
  condition, pressed);
return super.processKeyBinding (ks, e, condition, pressed);

相关文章