本文整理了Java中javax.swing.text.JTextComponent.getFocusListeners()
方法的一些代码示例,展示了JTextComponent.getFocusListeners()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextComponent.getFocusListeners()
方法的具体详情如下:
包路径:javax.swing.text.JTextComponent
类名称:JTextComponent
方法名:getFocusListeners
暂无
代码示例来源:origin: UISpec4J/UISpec4J
public void focusLost() {
for (FocusListener listener : jTextComponent.getFocusListeners()) {
listener.focusLost(new FocusEvent(jTextComponent, 0));
}
}
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets
static void undecorate(JTextComponent textComponent, Document originalDocument) {
Document doc = textComponent.getDocument();
if (doc instanceof AutoCompleteDocument) {
//remove autocomplete key/action mappings
InputMap map = textComponent.getInputMap();
while (map.getParent() != null) {
InputMap parent = map.getParent();
//if (parent instanceof AutoComplete.InputMap) {
if (parent.getClass().getName().contains("AutoComplete")) {
map.setParent(parent.getParent());
}
map = parent;
}
textComponent.getActionMap().put("nonstrict-backspace", null);
//remove old focus listener
for (FocusListener l : textComponent.getFocusListeners()) {
//if (l instanceof AutoComplete.FocusAdapter) {
if (l.getClass().getName().contains("AutoComplete")) {
textComponent.removeFocusListener(l);
break;
}
}
//reset to original document
//textComponent.setDocument(((AutoCompleteDocument) doc).delegate);
textComponent.setDocument(originalDocument);
}
}
代码示例来源:origin: tmyroadctfig/swingx
for (FocusListener l : textComponent.getFocusListeners()) {
if (l instanceof AutoComplete.FocusAdapter) {
textComponent.removeFocusListener(l);
代码示例来源:origin: org.swinglabs.swingx/swingx-all
for (FocusListener l : textComponent.getFocusListeners()) {
if (l instanceof AutoComplete.FocusAdapter) {
textComponent.removeFocusListener(l);
内容来源于网络,如有侵权,请联系作者删除!