removeMouseListener ( )源码实例Demo

javax.swing.text.JTextComponent#removeMouseListener ( )源码实例Demo

下面列出了javax.swing.text.JTextComponent#removeMouseListener ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: netbeans   文件: EditorCaret.java
@Override
public void deinstall(JTextComponent c) {
    if (LOG.isLoggable(Level.FINE)) {
        LOG.fine("EditorCaret.deinstall: Deinstalling from " + s2s(c) + "\n"); //NOI18N
    }
    
    synchronized (listenerList) {
        if (blinkTimer != null) {
            setBlinkRate(0);
        }
    }
    
    c.removeComponentListener(listenerImpl);
    c.removePropertyChangeListener(listenerImpl);
    c.removeFocusListener(listenerImpl);
    c.removeMouseListener(listenerImpl);
    c.removeMouseMotionListener(listenerImpl);
    ViewHierarchy.get(c).removeViewHierarchyListener(listenerImpl);

    
    modelChanged(activeDoc, null);
}
 
源代码2 项目: darklaf   文件: DarkTextFieldUI.java
@Override
protected void uninstallListeners() {
    JTextComponent c = getComponent();
    c.removeMouseListener(this);
    c.removeMouseMotionListener(mouseMotionListener);
    c.removeKeyListener(keyListener);
}
 
源代码3 项目: netbeans   文件: BaseCaret.java
/** Called when UI is being removed from JTextComponent */
@Override
@SuppressWarnings("NestedSynchronizedStatement")
public void deinstall(JTextComponent c) {
    if (LOG.isLoggable(Level.FINE)) {
        LOG.fine("Deinstalling from " + s2s(c)); //NOI18N
    }
    
    component = null; // invalidate
    caretBounds = null;

    // No idea why the sync is done the way how it is, but the locks must
    // always be acquired in the same order otherwise the code will deadlock
    // sooner or later. See #100734
    synchronized (this) {
        synchronized (listenerImpl) {
            if (flasher != null) {
                setBlinkRate(0);
            }
        }
    }
    
    c.removeComponentListener(listenerImpl);
    c.removePropertyChangeListener(this);
    c.removeFocusListener(listenerImpl);
    c.removeMouseListener(this);
    c.removeMouseMotionListener(this);
    ViewHierarchy.get(c).removeViewHierarchyListener(listenerImpl);

    
    EditorUI editorUI = Utilities.getEditorUI(c);
    editorUI.removePropertyChangeListener(this);

    modelChanged(listenDoc, null);
}
 
源代码4 项目: Darcula   文件: DarculaTextFieldUI.java
@Override
protected void uninstallListeners() {
  final JTextComponent c = getComponent();
  c.removeMouseListener(myMouseListener);
  c.removeMouseMotionListener(myMouseMotionListener);
  c.removeFocusListener(myFocusListener);
  super.uninstallListeners();
}
 
public static void uninstall(JTextComponent c) { 
    c.putClientProperty(LINE_HIGHLIGHT, null); 
    c.putClientProperty(PREVIOUS_CARET, null); 
    c.removeCaretListener(caretListener); 
    c.removeMouseListener(mouseListener); 
    c.removeMouseMotionListener(mouseListener); 
}
 
源代码6 项目: openjdk-jdk9   文件: CaretFloatingPointAPITest.java
@Override
public void deinstall(JTextComponent c) {
    c.removeMouseListener(mouseListener);
    this.component = null;
}
 
源代码7 项目: jdk8u_jdk   文件: CaretFloatingPointAPITest.java
@Override
public void deinstall(JTextComponent c) {
    c.removeMouseListener(mouseListener);
    this.component = null;
}
 
源代码8 项目: xtunnel   文件: TextComponentPopupMenu.java
public static void uninstallFromComponent(JTextComponent c) {
	if (c instanceof JTextField && !(c instanceof JPasswordField)) {
		c.removeMouseListener(getSharedInstance());
	}
}