use of com.intellij.openapi.editor.event.EditorMouseListener in project intellij-community by JetBrains.
the class EditorWindowImpl method addEditorMouseListener.
@Override
public void addEditorMouseListener(@NotNull final EditorMouseListener listener) {
checkValid();
EditorMouseListener wrapper = new EditorMouseListener() {
@Override
public void mousePressed(EditorMouseEvent e) {
listener.mousePressed(new EditorMouseEvent(EditorWindowImpl.this, e.getMouseEvent(), e.getArea()));
}
@Override
public void mouseClicked(EditorMouseEvent e) {
listener.mouseClicked(new EditorMouseEvent(EditorWindowImpl.this, e.getMouseEvent(), e.getArea()));
}
@Override
public void mouseReleased(EditorMouseEvent e) {
listener.mouseReleased(new EditorMouseEvent(EditorWindowImpl.this, e.getMouseEvent(), e.getArea()));
}
@Override
public void mouseEntered(EditorMouseEvent e) {
listener.mouseEntered(new EditorMouseEvent(EditorWindowImpl.this, e.getMouseEvent(), e.getArea()));
}
@Override
public void mouseExited(EditorMouseEvent e) {
listener.mouseExited(new EditorMouseEvent(EditorWindowImpl.this, e.getMouseEvent(), e.getArea()));
}
};
myEditorMouseListeners.registerWrapper(listener, wrapper);
myDelegate.addEditorMouseListener(wrapper);
}
use of com.intellij.openapi.editor.event.EditorMouseListener 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