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

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

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

JTextField.removeFocusListener介绍

暂无

代码示例

代码示例来源:origin: org.jspresso/jspresso-swing-components

/**
 * Removes a focus listener from the text field.
 * 
 * @param l
 *            the listener to remove.
 */
public void removeTextFieldFocusListener(FocusListener l) {
 textField.removeFocusListener(l);
}

代码示例来源:origin: org.jspresso.framework/jspresso-swing-components

/**
 * Removes a focus listener from the text field.
 *
 * @param l
 *          the listener to remove.
 */
public void removeTextFieldFocusListener(FocusListener l) {
 textField.removeFocusListener(l);
}

代码示例来源:origin: JetBrains/jediterm

@Override
 public void keyPressed(KeyEvent keyEvent) {
  if (keyEvent.getKeyCode() == KeyEvent.VK_ESCAPE) {
   textField.removeFocusListener(focusAdapter);
   finishRename(selectedIndex, label, null, callBack);
  }
  else if (keyEvent.getKeyCode() == KeyEvent.VK_ENTER) {
   textField.removeFocusListener(focusAdapter);
   finishRename(selectedIndex, label, textField.getText(), callBack);
  }
  else {
   super.keyPressed(keyEvent);
  }
 }
});

代码示例来源:origin: stackoverflow.com

textField.addFocusListener(new FocusAdapter() {
  public void focusGained(FocusEvent e) {
    JTextField source = (JTextField)e.getComponent();
    source.setText("");
    source.removeFocusListener(this);
  }
});

代码示例来源:origin: in.jlibs/org-netbeans-api-visual

public void notifyClosing (EditorController controller, Widget widget, JTextField editor, boolean commit) {
  editor.getDocument ().removeDocumentListener (documentListener);
  editor.removeFocusListener (focusListener);
  editor.removeKeyListener (keyListener);
  if (commit) {
    this.editor.setText (widget, editor.getText ());
    if (widget != null)
      widget.getScene ().validate ();
  }
}

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

public void notifyClosing (EditorController controller, Widget widget, JTextField editor, boolean commit) {
  editor.getDocument ().removeDocumentListener (documentListener);
  editor.removeFocusListener (focusListener);
  editor.removeKeyListener (keyListener);
  if (commit) {
    this.editor.setText (widget, editor.getText ());
    if (widget != null)
      widget.getScene ().validate ();
  }
}

代码示例来源:origin: khuxtable/seaglass

/**
 * @inheritDoc
 */
@Override
protected void uninstallListeners() {
  super.uninstallListeners();
  spinner.removePropertyChangeListener(this);
  JComponent editor = spinner.getEditor();
  if (editor instanceof JSpinner.DefaultEditor) {
    JTextField tf = ((JSpinner.DefaultEditor)editor).getTextField();
    if (tf != null) {
      tf.removeFocusListener(editorFocusHandler);
    }
  }
}

代码示例来源:origin: khuxtable/seaglass

JTextField tf = ((JSpinner.DefaultEditor)oldEditor).getTextField();
if (tf != null) {
  tf.removeFocusListener(editorFocusHandler);

代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java16

this.comboBoxEditorComponent.removeFocusListener(selectTextOnFocusGainHandler);

代码示例来源:origin: com.haulmont.thirdparty/glazedlists

this.comboBoxEditorComponent.removeFocusListener(selectTextOnFocusGainHandler);

代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java15

this.comboBoxEditorComponent.removeFocusListener(selectTextOnFocusGainHandler);

代码示例来源:origin: net.sf.cuf/cuf-swing

((JTextField)eventSource).removeFocusListener (SCM);

代码示例来源:origin: org.icepdf.os/icepdf-viewer

if (currentPageNumberTextField != null) {
  currentPageNumberTextField.removeActionListener(this);
  currentPageNumberTextField.removeFocusListener(this);
  currentPageNumberTextField.removeKeyListener(this);
  currentPageNumberTextField = null;

相关文章

JTextField类方法