Class RSyntaxTextAreaEditorKit.InsertBreakAction

All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
AbstractJFlexCTokenMaker.CStyleInsertBreakAction
Enclosing class:
RSyntaxTextAreaEditorKit

public static class RSyntaxTextAreaEditorKit.InsertBreakAction extends RTextAreaEditorKit.InsertBreakAction
Action for when the user presses the Enter key. This is here so we can be smart and "auto-indent" for programming languages.
Version:
0.5
Author:
Robert Futrell
See Also:
  • Constructor Details

    • InsertBreakAction

      public InsertBreakAction()
  • Method Details

    • actionPerformedImpl

      public void actionPerformedImpl(ActionEvent e, RTextArea textArea)
      Description copied from class: RecordableTextAction
      The actual meat of the action. If you wish to subclass this action and modify its behavior, this is the method to override.
      Overrides:
      actionPerformedImpl in class RTextAreaEditorKit.InsertBreakAction
      Parameters:
      e - The action being performed.
      textArea - The text area "receiving" the action.
      See Also:
    • handleInsertBreak

      protected void handleInsertBreak(RSyntaxTextArea textArea, boolean noSelection)
      Actually inserts the newline into the document, and auto-indents if appropriate. This method can be called by token makers who implement a custom action for inserting newlines.
      Parameters:
      textArea - The text area to examine.
      noSelection - Whether there is no selection.