Class RSyntaxTextAreaEditorKit.PreviousWordAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
    Enclosing class:
    RSyntaxTextAreaEditorKit

    public static class RSyntaxTextAreaEditorKit.PreviousWordAction
    extends RTextAreaEditorKit.PreviousWordAction
    Action to move the selection and/or caret. Constructor indicates direction to use. This class overrides the behavior defined in RTextAreaEditorKit to better skip "words" in source code.
    See Also:
    Serialized Form
    • Field Detail

      • seg

        private javax.swing.text.Segment seg
    • Constructor Detail

      • PreviousWordAction

        public PreviousWordAction​(java.lang.String nm,
                                  boolean select)
    • Method Detail

      • getPreviousWord

        protected int getPreviousWord​(RTextArea textArea,
                                      int offs)
                               throws javax.swing.text.BadLocationException
        Overridden to do better with skipping "words" in code.
        Overrides:
        getPreviousWord in class RTextAreaEditorKit.PreviousWordAction
        Throws:
        javax.swing.text.BadLocationException