RTextAreaEditorKit
Date: 2017-02-11

org.fife.ui.rtextarea

## Class RTextAreaEditorKit

- java.lang.Object
- - javax.swing.text.EditorKit
  - - javax.swing.text.DefaultEditorKit
    - - org.fife.ui.rtextarea.RTextAreaEditorKit

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    RSyntaxTextAreaEditorKit

      public class RTextAreaEditorKit
      extends javax.swing.text.DefaultEditorKit

  An extension of `DefaultEditorKit` that adds functionality found in `RTextArea`.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RTextAreaEditorKit.BeepAction` Creates a beep.
    `static class` | `RTextAreaEditorKit.BeginAction` Moves the caret to the beginning of the document.
    `static class` | `RTextAreaEditorKit.BeginLineAction` Toggles the position of the caret between the beginning of the line, and the first non-whitespace character on the line.
    `static class` | `RTextAreaEditorKit.BeginRecordingMacroAction` Action that begins recording a macro.
    `protected static class` | `RTextAreaEditorKit.BeginWordAction` Positions the caret at the beginning of the word.
    `static class` | `RTextAreaEditorKit.ClipboardHistoryAction` Action for displaying a popup with a list of recently pasted text snippets.
    `static class` | `RTextAreaEditorKit.CopyAction` Action for copying text.
    `static class` | `RTextAreaEditorKit.CutAction` Action for cutting text.
    `static class` | `RTextAreaEditorKit.DecreaseFontSizeAction` Action for decreasing the font size.
    `static class` | `RTextAreaEditorKit.DefaultKeyTypedAction` The action to use when no actions in the input/action map meet the key pressed.
    `static class` | `RTextAreaEditorKit.DeleteLineAction` Deletes the current line(s).
    `static class` | `RTextAreaEditorKit.DeleteNextCharAction` Deletes the character of content that follows the current caret position.
    `static class` | `RTextAreaEditorKit.DeletePrevCharAction` Deletes the character of content that precedes the current caret position.
    `static class` | `RTextAreaEditorKit.DeletePrevWordAction` Action that deletes the previous word in the text area.
    `static class` | `RTextAreaEditorKit.DeleteRestOfLineAction` Action that deletes all text from the caret position to the end of the caret's line.
    `static class` | `RTextAreaEditorKit.DumbCompleteWordAction` Finds the most recent word in the document that matches the "word" up to the current caret position, and auto-completes the rest.
    `static class` | `RTextAreaEditorKit.EndAction` Moves the caret to the end of the document.
    `static class` | `RTextAreaEditorKit.EndLineAction` Positions the caret at the end of the line.
    `static class` | `RTextAreaEditorKit.EndRecordingMacroAction` Action that ends recording a macro.
    `protected static class` | `RTextAreaEditorKit.EndWordAction` Positions the caret at the end of the word.
    `static class` | `RTextAreaEditorKit.IncreaseFontSizeAction` Action for increasing the font size.
    `static class` | `RTextAreaEditorKit.InsertBreakAction` Action for when the user presses the Enter key.
    `static class` | `RTextAreaEditorKit.InsertContentAction` Action taken when content is to be inserted.
    `static class` | `RTextAreaEditorKit.InsertTabAction` Places a tab character into the document.
    `static class` | `RTextAreaEditorKit.InvertSelectionCaseAction` Action to invert the selection's case.
    `static class` | `RTextAreaEditorKit.JoinLinesAction` Action to join the current line and the following line.
    `static class` | `RTextAreaEditorKit.LineMoveAction` Action that moves a line up or down.
    `static class` | `RTextAreaEditorKit.LowerSelectionCaseAction` Action to make the selection lower-case.
    `static class` | `RTextAreaEditorKit.NextBookmarkAction` Action that moves the caret to the next (or previous) bookmark.
    `static class` | `RTextAreaEditorKit.NextOccurrenceAction` Selects the next occurrence of the text last selected.
    `static class` | `RTextAreaEditorKit.NextVisualPositionAction` Action to move the selection and/or caret.
    `static class` | `RTextAreaEditorKit.NextWordAction` Positions the caret at the next word.
    `static class` | `RTextAreaEditorKit.PasteAction` Action for pasting text.
    `static class` | `RTextAreaEditorKit.PlaybackLastMacroAction` "Plays back" the last macro recorded.
    `static class` | `RTextAreaEditorKit.PreviousOccurrenceAction` Select the previous occurrence of the text last selected.
    `static class` | `RTextAreaEditorKit.PreviousWordAction` Positions the caret at the beginning of the previous word.
    `static class` | `RTextAreaEditorKit.RedoAction` Re-does the last action undone.
    `static class` | `RTextAreaEditorKit.ScrollAction` Scrolls the text area one line up or down, without changing the caret position.
    `static class` | `RTextAreaEditorKit.SelectAllAction` Selects the entire document.
    `static class` | `RTextAreaEditorKit.SelectLineAction` Selects the line around the caret.
    `static class` | `RTextAreaEditorKit.SelectWordAction` Selects the word around the caret.
    `static class` | `RTextAreaEditorKit.SetReadOnlyAction` Puts the text area into read-only mode.
    `static class` | `RTextAreaEditorKit.SetWritableAction` Puts the text area into writable (from read-only) mode.
    `static class` | `RTextAreaEditorKit.TimeDateAction` The action for inserting a time/date stamp.
    `static class` | `RTextAreaEditorKit.ToggleBookmarkAction` Toggles whether the current line has a bookmark.
    `static class` | `RTextAreaEditorKit.ToggleTextModeAction` The action for the insert key toggling insert/overwrite modes.
    `static class` | `RTextAreaEditorKit.UndoAction` Undoes the last action done.
    `static class` | `RTextAreaEditorKit.UnselectAction` Removes the selection, if any.
    `static class` | `RTextAreaEditorKit.UpperSelectionCaseAction` Action to make the selection upper-case.
    `static class` | `RTextAreaEditorKit.VerticalPageAction` Scrolls up/down vertically.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `clipboardHistoryAction` Action to display the paste history popup.
    `static java.lang.String` | `rtaBeginRecordingMacroAction` The name of the action that begins recording a macro.
    `static java.lang.String` | `rtaDecreaseFontSizeAction` The name of the action to decrease the font size.
    `static java.lang.String` | `rtaDeleteLineAction` The name of the action that deletes the current line.
    `static java.lang.String` | `rtaDeletePrevWordAction` The name of the action to delete the word before the caret.
    `static java.lang.String` | `rtaDeleteRestOfLineAction` The name of the action taken to delete the remainder of the line (from the caret position to the end of the line).
    `static java.lang.String` | `rtaDumbCompleteWordAction` The name of the action that completes the word at the caret position with the last word in the document that starts with the text up to the caret.
    `static java.lang.String` | `rtaEndRecordingMacroAction` The name of the action that ends recording a macro.
    `static java.lang.String` | `rtaIncreaseFontSizeAction` The name of the action to increase the font size.
    `static java.lang.String` | `rtaInvertSelectionCaseAction` The name of the action that inverts the case of the current selection.
    `static java.lang.String` | `rtaJoinLinesAction` The name of the action to join two lines.
    `static java.lang.String` | `rtaLineDownAction` Action to move a line down.
    `static java.lang.String` | `rtaLineUpAction` Action to move a line up.
    `static java.lang.String` | `rtaLowerSelectionCaseAction` The name of the action to make the current selection lower-case.
    `static java.lang.String` | `rtaNextBookmarkAction` Action to jump to the next bookmark.
    `static java.lang.String` | `rtaNextOccurrenceAction` Action to select the next occurrence of the selected text.
    `static java.lang.String` | `rtaPlaybackLastMacroAction` The name of the action that "plays back" the last macro.
    `static java.lang.String` | `rtaPrevBookmarkAction` Action to jump to the previous bookmark.
    `static java.lang.String` | `rtaPrevOccurrenceAction` Action to select the previous occurrence of the selected text.
    `static java.lang.String` | `rtaRedoAction` The name of the action for "redoing" the last action undone.
    `static java.lang.String` | `rtaScrollDownAction` The name of the action to scroll the text area down one line without changing the caret's position.
    `static java.lang.String` | `rtaScrollUpAction` The name of the action to scroll the text area up one line without changing the caret's position.
    `static java.lang.String` | `rtaSelectionPageDownAction` The name of the action for "paging down" with the selection.
    `static java.lang.String` | `rtaSelectionPageLeftAction` The name of the action for "paging left" with the selection.
    `static java.lang.String` | `rtaSelectionPageRightAction` The name of the action for "paging right" with the selection.
    `static java.lang.String` | `rtaSelectionPageUpAction` The name of the action for "paging up" with the selection.
    `static java.lang.String` | `rtaTimeDateAction` The name of the action for inserting a time/date stamp.
    `static java.lang.String` | `rtaToggleBookmarkAction` Toggles whether the current line has a bookmark, if this text area is in an `RTextScrollPane`.
    `static java.lang.String` | `rtaToggleTextModeAction` The name of the action taken when the user hits the Insert key (thus toggling between insert and overwrite modes).
    `static java.lang.String` | `rtaUndoAction` The name of the action for "undoing" the last action done.
    `static java.lang.String` | `rtaUnselectAction` The name of the action for unselecting any selected text in the text area.
    `static java.lang.String` | `rtaUpperSelectionCaseAction` The name of the action for making the current selection upper-case.

    - ### Fields inherited from class javax.swing.text.DefaultEditorKit

      `backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deleteNextWordAction, deletePrevCharAction, deletePrevWordAction, downAction, endAction, endLineAction, EndOfLineStringProperty, endParagraphAction, endWordAction, forwardAction, insertBreakAction, insertContentAction, insertTabAction, nextWordAction, pageDownAction, pageUpAction, pasteAction, previousWordAction, readOnlyAction, selectAllAction, selectionBackwardAction, selectionBeginAction, selectionBeginLineAction, selectionBeginParagraphAction, selectionBeginWordAction, selectionDownAction, selectionEndAction, selectionEndLineAction, selectionEndParagraphAction, selectionEndWordAction, selectionForwardAction, selectionNextWordAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, upAction, writableAction`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RTextAreaEditorKit()` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IconRowHeader` | `createIconRowHeader(RTextArea textArea)` Creates an icon row header to use in the gutter for a text area.
    `LineNumberList` | `createLineNumberList(RTextArea textArea)` Creates a line number list to use in the gutter for a text area.
    `javax.swing.Action[]` | `getActions()` Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.
    `void` | `read(java.io.Reader in, javax.swing.text.Document doc, int pos)` Inserts content from the given stream, which will be treated as plain text.

    - ### Methods inherited from class javax.swing.text.DefaultEditorKit

      `createCaret, createDefaultDocument, getContentType, getViewFactory, read, write, write`

    - ### Methods inherited from class javax.swing.text.EditorKit

      `clone, deinstall, install`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### rtaBeginRecordingMacroAction

          public static final java.lang.String rtaBeginRecordingMacroAction

      The name of the action that begins recording a macro.
      See Also:
        Constant Field Values

    - #### rtaDecreaseFontSizeAction

          public static final java.lang.String rtaDecreaseFontSizeAction

      The name of the action to decrease the font size.
      See Also:
        Constant Field Values

    - #### rtaDeleteLineAction

          public static final java.lang.String rtaDeleteLineAction

      The name of the action that deletes the current line.
      See Also:
        Constant Field Values

    - #### rtaDeletePrevWordAction

          public static final java.lang.String rtaDeletePrevWordAction

      The name of the action to delete the word before the caret.
      See Also:
        Constant Field Values

    - #### rtaDeleteRestOfLineAction

          public static final java.lang.String rtaDeleteRestOfLineAction

      The name of the action taken to delete the remainder of the line (from the caret position to the end of the line).
      See Also:
        Constant Field Values

    - #### rtaDumbCompleteWordAction

          public static final java.lang.String rtaDumbCompleteWordAction

      The name of the action that completes the word at the caret position with the last word in the document that starts with the text up to the caret.
      See Also:
        Constant Field Values

    - #### rtaEndRecordingMacroAction

          public static final java.lang.String rtaEndRecordingMacroAction

      The name of the action that ends recording a macro.
      See Also:
        Constant Field Values

    - #### rtaIncreaseFontSizeAction

          public static final java.lang.String rtaIncreaseFontSizeAction

      The name of the action to increase the font size.
      See Also:
        Constant Field Values

    - #### rtaInvertSelectionCaseAction

          public static final java.lang.String rtaInvertSelectionCaseAction

      The name of the action that inverts the case of the current selection.
      See Also:
        Constant Field Values

    - #### rtaJoinLinesAction

          public static final java.lang.String rtaJoinLinesAction

      The name of the action to join two lines.
      See Also:
        Constant Field Values

    - #### rtaLineDownAction

          public static final java.lang.String rtaLineDownAction

      Action to move a line down.
      See Also:
        Constant Field Values

    - #### rtaLineUpAction

          public static final java.lang.String rtaLineUpAction

      Action to move a line up.
      See Also:
        Constant Field Values

    - #### rtaLowerSelectionCaseAction

          public static final java.lang.String rtaLowerSelectionCaseAction

      The name of the action to make the current selection lower-case.
      See Also:
        Constant Field Values

    - #### rtaNextOccurrenceAction

          public static final java.lang.String rtaNextOccurrenceAction

      Action to select the next occurrence of the selected text.
      See Also:
        Constant Field Values

    - #### rtaPrevOccurrenceAction

          public static final java.lang.String rtaPrevOccurrenceAction

      Action to select the previous occurrence of the selected text.
      See Also:
        Constant Field Values

    - #### rtaNextBookmarkAction

          public static final java.lang.String rtaNextBookmarkAction

      Action to jump to the next bookmark.
      See Also:
        Constant Field Values

    - #### clipboardHistoryAction

          public static final java.lang.String clipboardHistoryAction

      Action to display the paste history popup.
      See Also:
        Constant Field Values

    - #### rtaPrevBookmarkAction

          public static final java.lang.String rtaPrevBookmarkAction

      Action to jump to the previous bookmark.
      See Also:
        Constant Field Values

    - #### rtaPlaybackLastMacroAction

          public static final java.lang.String rtaPlaybackLastMacroAction

      The name of the action that "plays back" the last macro.
      See Also:
        Constant Field Values

    - #### rtaRedoAction

          public static final java.lang.String rtaRedoAction

      The name of the action for "redoing" the last action undone.
      See Also:
        Constant Field Values

    - #### rtaScrollDownAction

          public static final java.lang.String rtaScrollDownAction

      The name of the action to scroll the text area down one line without changing the caret's position.
      See Also:
        Constant Field Values

    - #### rtaScrollUpAction

          public static final java.lang.String rtaScrollUpAction

      The name of the action to scroll the text area up one line without changing the caret's position.
      See Also:
        Constant Field Values

    - #### rtaSelectionPageUpAction

          public static final java.lang.String rtaSelectionPageUpAction

      The name of the action for "paging up" with the selection.
      See Also:
        Constant Field Values

    - #### rtaSelectionPageDownAction

          public static final java.lang.String rtaSelectionPageDownAction

      The name of the action for "paging down" with the selection.
      See Also:
        Constant Field Values

    - #### rtaSelectionPageLeftAction

          public static final java.lang.String rtaSelectionPageLeftAction

      The name of the action for "paging left" with the selection.
      See Also:
        Constant Field Values

    - #### rtaSelectionPageRightAction

          public static final java.lang.String rtaSelectionPageRightAction

      The name of the action for "paging right" with the selection.
      See Also:
        Constant Field Values

    - #### rtaTimeDateAction

          public static final java.lang.String rtaTimeDateAction

      The name of the action for inserting a time/date stamp.
      See Also:
        Constant Field Values

    - #### rtaToggleBookmarkAction

          public static final java.lang.String rtaToggleBookmarkAction

      Toggles whether the current line has a bookmark, if this text area is in an `RTextScrollPane`.
      See Also:
        Constant Field Values

    - #### rtaToggleTextModeAction

          public static final java.lang.String rtaToggleTextModeAction

      The name of the action taken when the user hits the Insert key (thus toggling between insert and overwrite modes).
      See Also:
        Constant Field Values

    - #### rtaUndoAction

          public static final java.lang.String rtaUndoAction

      The name of the action for "undoing" the last action done.
      See Also:
        Constant Field Values

    - #### rtaUnselectAction

          public static final java.lang.String rtaUnselectAction

      The name of the action for unselecting any selected text in the text area.
      See Also:
        Constant Field Values

    - #### rtaUpperSelectionCaseAction

          public static final java.lang.String rtaUpperSelectionCaseAction

      The name of the action for making the current selection upper-case.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RTextAreaEditorKit

          public RTextAreaEditorKit()

      Constructor.

  - ### Method Detail

    - #### createIconRowHeader

          public IconRowHeader createIconRowHeader(RTextArea textArea)

      Creates an icon row header to use in the gutter for a text area.
      Parameters:
        `textArea` - The text area.
      Returns:
        The icon row header.

    - #### createLineNumberList

          public LineNumberList createLineNumberList(RTextArea textArea)

      Creates a line number list to use in the gutter for a text area.
      Parameters:
        `textArea` - The text area.
      Returns:
        The line number list.

    - #### getActions

          public javax.swing.Action[] getActions()

      Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit.
      Overrides:
        `getActions` in class `javax.swing.text.DefaultEditorKit`
      Returns:
        the command list

    - #### read

          public void read(java.io.Reader in,
                  javax.swing.text.Document doc,
                  int pos)
                    throws java.io.IOException,
                           javax.swing.text.BadLocationException

      Inserts content from the given stream, which will be treated as plain text. This method is overridden merely so we can increase the number of characters read at a time.
      Overrides:
        `read` in class `javax.swing.text.DefaultEditorKit`
      Parameters:
        `in` - The stream to read from
        `doc` - The destination for the insertion.
        `pos` - The location in the document to place the content >= 0.
      Throws:
        `java.io.IOException` - on any I/O error
        `javax.swing.text.BadLocationException` - if pos represents an invalid location within the document.