java.lang.Object
java.awt.event.MouseAdapter
javax.swing.event.MouseInputAdapter
org.gjt.sp.jedit.textarea.TextAreaMouseHandler
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,MouseWheelListener
,EventListener
,MouseInputListener
- Direct Known Subclasses:
MouseHandler
Standalone TextArea MouseHandler.
- Version:
- $Id: TextAreaMouseHandler.java 25323 2020-05-09 08:29:47Z kpouer $
- Author:
- Matthieu Casanova
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected boolean
protected boolean
protected boolean
protected int
protected int
protected int
protected boolean
protected boolean
protected final TextArea
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
doSingleClick
(MouseEvent evt) protected void
static boolean
isLeftButton
(MouseEvent evt) static boolean
isMiddleButton
(int modifiers) Deprecated.static boolean
isMiddleButton
(MouseEvent evt) static boolean
isPopupTrigger
(MouseEvent evt) Returns if the specified event is the popup trigger event.static boolean
isRightButton
(int modifiers) Deprecated.static boolean
isRightButton
(MouseEvent evt) void
mouseDragged
(MouseEvent evt) void
mouseMoved
(MouseEvent evt) void
mousePressed
(MouseEvent evt) void
mouseReleased
(MouseEvent evt) protected void
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseWheelMoved
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited
-
Field Details
-
textArea
-
dragStartLine
protected int dragStartLine -
dragStartOffset
protected int dragStartOffset -
dragStart
protected int dragStart -
clickCount
protected int clickCount -
dragged
protected boolean dragged -
quickCopyDrag
protected boolean quickCopyDrag -
control
protected boolean control -
ctrlForRectangularSelection
protected boolean ctrlForRectangularSelection -
maybeDragAndDrop
protected boolean maybeDragAndDrop
-
-
Method Details
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classMouseAdapter
-
doSingleClick
-
doDoubleClick
protected void doDoubleClick() -
doTripleClick
protected void doTripleClick() -
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classMouseAdapter
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classMouseAdapter
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classMouseAdapter
-
isPopupTrigger
Returns if the specified event is the popup trigger event. This implements precisely defined behavior, as opposed to MouseEvent.isPopupTrigger().- Parameters:
evt
- The event- Since:
- jEdit 4.3pre7
-
isLeftButton
- Parameters:
evt
- A mouse event- Returns:
- true if the mouse event is due to the left button
- Since:
- jEdit 5.6
-
isMiddleButton
Deprecated.- Parameters:
modifiers
- The modifiers flag from a mouse event- Returns:
- true if the modifier match the middle button
- Since:
- jEdit 4.3pre7
-
isMiddleButton
- Parameters:
evt
- A mouse event- Returns:
- true if the mouse event is due to the middle button
- Since:
- jEdit 5.6
-
isRightButton
Deprecated.- Parameters:
modifiers
- The modifiers flag from a mouse event- Returns:
- true if the modifier match the right button
- Since:
- jEdit 4.3pre7
-
isRightButton
- Parameters:
evt
- A mouse event- Returns:
- true if the mouse event is due to the right button
- Since:
- jEdit 5.6
-
showCursor
protected void showCursor()
-
isMiddleButton(MouseEvent)