use of com.intellij.openapi.editor.event.EditorMouseMotionListener in project intellij-community by JetBrains.
the class EditorWindowImpl method addEditorMouseMotionListener.
@Override
public void addEditorMouseMotionListener(@NotNull final EditorMouseMotionListener listener) {
checkValid();
EditorMouseMotionListener wrapper = new EditorMouseMotionListener() {
@Override
public void mouseMoved(EditorMouseEvent e) {
listener.mouseMoved(new EditorMouseEvent(EditorWindowImpl.this, e.getMouseEvent(), e.getArea()));
}
@Override
public void mouseDragged(EditorMouseEvent e) {
listener.mouseDragged(new EditorMouseEvent(EditorWindowImpl.this, e.getMouseEvent(), e.getArea()));
}
};
myEditorMouseMotionListeners.registerWrapper(listener, wrapper);
myDelegate.addEditorMouseMotionListener(wrapper);
}
use of com.intellij.openapi.editor.event.EditorMouseMotionListener in project intellij-community by JetBrains.
the class EditorWindowImpl method dispose.
private void dispose() {
assert !myDisposed;
myCaretModelDelegate.disposeModel();
for (EditorMouseListener wrapper : myEditorMouseListeners.wrappers()) {
myDelegate.removeEditorMouseListener(wrapper);
}
myEditorMouseListeners.clear();
for (EditorMouseMotionListener wrapper : myEditorMouseMotionListeners.wrappers()) {
myDelegate.removeEditorMouseMotionListener(wrapper);
}
myEditorMouseMotionListeners.clear();
myDisposed = true;
Disposer.dispose(myDocumentWindow);
}
Aggregations