javax.swing.text.JTextComponent.addFocusListener()方法的使用及代码示例

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

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

JTextComponent.addFocusListener介绍

暂无

代码示例

代码示例来源:origin: groovy/groovy-core

/**
 * @param textComponent the text component to listen to
 */
public static void registerTextComponent(JTextComponent textComponent) {
  textComponent.addFocusListener(TEXT_FOCUS_LISTENER);
}

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

textField.setText(configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName()));
textField.addFocusListener(new FocusAdapter()

代码示例来源:origin: org.codehaus.groovy/groovy-console

/**
 * @param textComponent the text component to listen to
 */
public static void registerTextComponent(JTextComponent textComponent) {
  textComponent.addFocusListener(TEXT_FOCUS_LISTENER);
}

代码示例来源:origin: org.codehaus.groovy/groovy-jdk14

/**
 * @param textComponent the text component to listen to
 */    
public static void registerTextComponent(JTextComponent textComponent) {
  textComponent.addFocusListener(TEXT_FOCUS_LISTENER);
}

代码示例来源:origin: org.jfree/jcommon

/**
 * Adds this instance as a listener for the specified text component.
 * 
 * @param t  the text component.
 */
public static void addTextComponent(final JTextComponent t) {
  if (singleton == null) {
    singleton = new JTextObserver();
  }
  t.addFocusListener(singleton);
}

代码示例来源:origin: jfree/jcommon

/**
 * Adds this instance as a listener for the specified text component.
 * 
 * @param t  the text component.
 */
public static void addTextComponent(final JTextComponent t) {
  if (singleton == null) {
    singleton = new JTextObserver();
  }
  t.addFocusListener(singleton);
}

代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler

protected void install(JTextComponent textComponent) {
  TimerScheduler ts = new TimerScheduler();
  textComponent.getDocument().addDocumentListener(ts);
  textComponent.addFocusListener(ts);
}

代码示例来源:origin: crashinvaders/gdx-texture-packer-gui

@Override
protected void installListeners() {
  super.installListeners();
  getComponent().addFocusListener(this);
}

代码示例来源:origin: RPTools/maptool

@Override
protected void installListeners() {
  super.installListeners();
  getComponent().addFocusListener(this);
}

代码示例来源:origin: crashinvaders/gdx-texture-packer-gui

@Override
protected void installListeners() {
  super.installListeners();
  getComponent().addFocusListener(this);
}

代码示例来源:origin: atarw/material-ui-swing

@Override
protected void installListeners () {
  getComponent ().addFocusListener (this);
  getComponent ().addPropertyChangeListener (this);
}

代码示例来源:origin: org.zaproxy/zap

private void setupWithCaret(Caret caret) {
  if (caret != null) {
    textComponent.addFocusListener(this);
    textComponent.addPropertyChangeListener("editable", this);
    caretBlinkRate = caret.getBlinkRate();
    if (!textComponent.isEditable()) {
      caret.setBlinkRate(0);
    }
  } else {
    caretBlinkRate = 0;
  }
}

代码示例来源:origin: atarw/material-ui-swing

@Override
protected void installListeners() {
  super.installListeners();
  getComponent().addFocusListener(this);
  getComponent().addPropertyChangeListener(this);
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

protected  void installListeners() {
 super.installListeners();
 miTextML = new MiTextML();
 getComponent().addMouseListener( miTextML);
 getComponent().addFocusListener( miTextML);
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

protected  void installListeners() {
 super.installListeners();
 miTextML = new MiTextML();
 getComponent().addMouseListener( miTextML);
 getComponent().addFocusListener( miTextML);
}

代码示例来源:origin: triplea-game/triplea

void configureEditor(final ComboBoxEditor newEditor) {
 if (editor != null) {
  editor.removeKeyListener(editorKeyListener);
  editor.removeFocusListener(editorFocusListener);
 }
 if (newEditor != null) {
  editor = (JTextComponent) newEditor.getEditorComponent();
  editor.addKeyListener(editorKeyListener);
  editor.addFocusListener(editorFocusListener);
  editor.setDocument(this);
 }
}

代码示例来源:origin: com.github.arnabk/pgslookandfeel

protected void installListeners() {
    super.installListeners();

    getComponent().addMouseListener(TextComponentPopupHandler.getInstance());
    getComponent().addFocusListener(TextComponentFocusListener.getInstance());
  }
}

代码示例来源:origin: com.github.arnabk/pgslookandfeel

protected void installListeners() {
    super.installListeners();

    getComponent().addMouseListener(TextComponentPopupHandler.getInstance());
    getComponent().addFocusListener(TextComponentFocusListener.getInstance());
  }
}

代码示例来源:origin: com.github.arnabk/pgslookandfeel

protected void installListeners() {
    super.installListeners();

    getComponent().addMouseListener(TextComponentPopupHandler.getInstance());
    getComponent().addFocusListener(TextComponentFocusListener.getInstance());
  }
}

代码示例来源:origin: com.github.arnabk/pgslookandfeel

protected void installListeners() {
    super.installListeners();

    getComponent().addMouseListener(TextComponentPopupHandler.getInstance());
    getComponent().addFocusListener(TextComponentFocusListener.getInstance());
  }
}

相关文章

JTextComponent类方法