SuspendCaretPopupListener
org.nlogo.editor.SuspendCaretPopupListener
class SuspendCaretPopupListener(component: JTextComponent) extends PopupMenuListener
This class solves a very particular and peculiar problem. When a JTextComponent launches a popup menu, the caret continues to process mouse events as normal. This is obviously undesirable for a number of reasons, and is especially problematic on a mac, where there is only one mouse button. This class ensures that the caret (and thus the selection) are frozen at the moment the popup menu is activated and are restored when it closes.
Attributes
- Source
- SuspendCaretPopupListener.scala
- Graph
-
- Supertypes
-
trait PopupMenuListenertrait EventListenerclass Objecttrait Matchableclass Any
Members list
In this article