Module jEdit

Class TextAreaMouseHandler

All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener, MouseInputListener
Direct Known Subclasses:
MouseHandler

public class TextAreaMouseHandler extends MouseInputAdapter
Standalone TextArea MouseHandler.
Version:
$Id: TextAreaMouseHandler.java 25323 2020-05-09 08:29:47Z kpouer $
Author:
Matthieu Casanova
  • Field Details

    • textArea

      protected final TextArea 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

      public void mousePressed(MouseEvent evt)
      Specified by:
      mousePressed in interface MouseListener
      Overrides:
      mousePressed in class MouseAdapter
    • doSingleClick

      protected void doSingleClick(MouseEvent evt)
    • doDoubleClick

      protected void doDoubleClick()
    • doTripleClick

      protected void doTripleClick()
    • mouseMoved

      public void mouseMoved(MouseEvent evt)
      Specified by:
      mouseMoved in interface MouseMotionListener
      Overrides:
      mouseMoved in class MouseAdapter
    • mouseDragged

      public void mouseDragged(MouseEvent evt)
      Specified by:
      mouseDragged in interface MouseMotionListener
      Overrides:
      mouseDragged in class MouseAdapter
    • mouseReleased

      public void mouseReleased(MouseEvent evt)
      Specified by:
      mouseReleased in interface MouseListener
      Overrides:
      mouseReleased in class MouseAdapter
    • isPopupTrigger

      public static boolean isPopupTrigger(MouseEvent evt)
      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

      public static boolean isLeftButton(MouseEvent evt)
      Parameters:
      evt - A mouse event
      Returns:
      true if the mouse event is due to the left button
      Since:
      jEdit 5.6
    • isMiddleButton

      @Deprecated public static boolean isMiddleButton(int modifiers)
      Parameters:
      modifiers - The modifiers flag from a mouse event
      Returns:
      true if the modifier match the middle button
      Since:
      jEdit 4.3pre7
    • isMiddleButton

      public static boolean isMiddleButton(MouseEvent evt)
      Parameters:
      evt - A mouse event
      Returns:
      true if the mouse event is due to the middle button
      Since:
      jEdit 5.6
    • isRightButton

      @Deprecated public static boolean isRightButton(int modifiers)
      Deprecated.
      Parameters:
      modifiers - The modifiers flag from a mouse event
      Returns:
      true if the modifier match the right button
      Since:
      jEdit 4.3pre7
    • isRightButton

      public static boolean isRightButton(MouseEvent evt)
      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()