javax.swing.JComboBox.registerKeyboardAction()方法的使用及代码示例

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

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

JComboBox.registerKeyboardAction介绍

暂无

代码示例

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

comboBox.registerKeyboardAction(downAction,
  KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0),
  JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
comboBox.registerKeyboardAction(downAction,
  KeyStroke.getKeyStroke("KP_DOWN"),
  JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
comboBox.registerKeyboardAction(altAction,
  KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.ALT_MASK),
  JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
comboBox.registerKeyboardAction(altAction,
  KeyStroke.getKeyStroke("alt KP_DOWN"),
  JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
comboBox.registerKeyboardAction(altAction,
  KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.ALT_MASK),
  JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
comboBox.registerKeyboardAction(altAction,
  KeyStroke.getKeyStroke("alt KP_UP"),
  JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
comboBox.registerKeyboardAction(upAction,
  KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0),
  JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
comboBox.registerKeyboardAction(upAction,

代码示例来源:origin: org.gdl-lang.gdl-tools/openehr-utils-gui-swing

private void init(Dimension size) {
  this.setSize(size);
  ScreenUtil.centerComponentOnScreen(this, this.getOwner());
  this.setResizable(false);
  this.addWindowListener(getCancelChangesAction());
  this.setContentPane(getMainPanel());
/* Enter KeyStroke */
  KeyStroke enter = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true);
  getComboBox().registerKeyboardAction(getAcceptChangesAction(), enter, JComponent.WHEN_IN_FOCUSED_WINDOW);
  KeyStroke esc = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, true);
  getComboBox().registerKeyboardAction(getCancelChangesAction(), esc, JComponent.WHEN_IN_FOCUSED_WINDOW);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-sun-appsrv

nameComboBox.registerKeyboardAction(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      nameComboBox.requestFocus();

相关文章

JComboBox类方法