Class RTextArea.RTextAreaMutableCaretEvent

  • All Implemented Interfaces:
    java.awt.event.FocusListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable, java.util.EventListener
    Direct Known Subclasses:
    RSyntaxTextArea.RSyntaxTextAreaMutableCaretEvent
    Enclosing class:
    RTextArea

    protected class RTextArea.RTextAreaMutableCaretEvent
    extends RTextAreaBase.RTAMouseListener
    Modified from MutableCaretEvent in JTextComponent so that mouse events get fired when the user is selecting text with the mouse as well. This class also displays the popup menu when the user right-clicks in the text area.
    See Also:
    Serialized Form
    • Constructor Detail

      • RTextAreaMutableCaretEvent

        protected RTextAreaMutableCaretEvent​(RTextArea textArea)
    • Method Detail

      • focusGained

        public void focusGained​(java.awt.event.FocusEvent e)
        Specified by:
        focusGained in interface java.awt.event.FocusListener
        Overrides:
        focusGained in class RTextAreaBase.RTAMouseListener
      • focusLost

        public void focusLost​(java.awt.event.FocusEvent e)
        Specified by:
        focusLost in interface java.awt.event.FocusListener
        Overrides:
        focusLost in class RTextAreaBase.RTAMouseListener
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent e)
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseDragged in class RTextAreaBase.RTAMouseListener
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Overrides:
        mousePressed in class RTextAreaBase.RTAMouseListener
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class RTextAreaBase.RTAMouseListener
      • showPopup

        private void showPopup​(java.awt.event.MouseEvent e)
        Shows a popup menu with cut, copy, paste, etc. options if the user clicked the right button.
        Parameters:
        e - The mouse event that caused this method to be called.