javax.swing.JTextField.setFocusTraversalKeys()方法的使用及代码示例

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

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

JTextField.setFocusTraversalKeys介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-swingapp

private void setupAccelField() {
  acceleratorListener = new AcceleratorKeyListener(this);
    // add the special listener
  acceleratorText.addKeyListener(acceleratorListener);
  // turn off focus keys
  acceleratorText.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, Collections.EMPTY_SET);
  acceleratorText.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, Collections.EMPTY_SET);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards

/** Creates new form ShortcutCustomizerPanel */
public ShortcutEnterPanel() {
  initComponents();
  bTab = new JButton();
  bClear = new JButton();
  loc(bTab, "CTL_Tab");
  loc(bClear, "CTL_Clear");
  tfShortcut.setFocusTraversalKeys(
      KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
      Collections.<AWTKeyStroke>emptySet()
      );
  tfShortcut.setFocusTraversalKeys(
      KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS,
      Collections.<AWTKeyStroke>emptySet()
      );
  tfShortcut.setFocusTraversalKeys(
      KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS,
      Collections.<AWTKeyStroke>emptySet()
      );
  
  tfShortcut.addKeyListener(listener);        
}

代码示例来源:origin: org.gephi/directory-chooser

filenameTextField.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, newTKeys);

代码示例来源:origin: org.scijava/ui-behaviour

textField.getDocument().addDocumentListener( autoComplete );
textField.getInputMap().put( KeyStroke.getKeyStroke( KeyEvent.VK_ENTER, 0 ), COMMIT_ACTION );
textField.setFocusTraversalKeys( KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, Collections.emptySet() );
textField.getInputMap().put( KeyStroke.getKeyStroke( KeyEvent.VK_TAB, 0 ), COMMIT_ACTION );
textField.getActionMap().put( COMMIT_ACTION, autoComplete.new CommitAction() );

代码示例来源:origin: org.scijava/ui-behaviour

textField.getInputMap().put( KeyStroke.getKeyStroke( KeyEvent.VK_ENTER, 0 ), COMMIT_ACTION );
textField.getInputMap().put( KeyStroke.getKeyStroke( ' ' ), COMMIT_ACTION );
textField.setFocusTraversalKeys( KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, Collections.emptySet() );
textField.getInputMap().put( KeyStroke.getKeyStroke( KeyEvent.VK_TAB, 0 ), COMMIT_ACTION );
textField.getActionMap().put( COMMIT_ACTION, autoComplete.new CommitAction() );

代码示例来源:origin: blurpy/kouchat

msgTF.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
    new HashSet<AWTKeyStroke>());

相关文章

微信公众号

最新文章

更多

JTextField类方法