Class RTextAreaEditorKit

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
RSyntaxTextAreaEditorKit

public class RTextAreaEditorKit extends DefaultEditorKit
An extension of DefaultEditorKit that adds functionality found in RTextArea.
Version:
0.1
See Also:
  • Field Details

    • rtaBeginRecordingMacroAction

      public static final String rtaBeginRecordingMacroAction
      The name of the action that begins recording a macro.
      See Also:
    • rtaDecreaseFontSizeAction

      public static final String rtaDecreaseFontSizeAction
      The name of the action to decrease the font size.
      See Also:
    • rtaDeleteLineAction

      public static final String rtaDeleteLineAction
      The name of the action that deletes the current line.
      See Also:
    • rtaDeletePrevWordAction

      public static final String rtaDeletePrevWordAction
      The name of the action to delete the word before the caret.
      See Also:
    • rtaDeleteRestOfLineAction

      public static final 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:
    • rtaDumbCompleteWordAction

      public static final 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:
    • rtaEndRecordingMacroAction

      public static final String rtaEndRecordingMacroAction
      The name of the action that ends recording a macro.
      See Also:
    • rtaIncreaseFontSizeAction

      public static final String rtaIncreaseFontSizeAction
      The name of the action to increase the font size.
      See Also:
    • rtaInvertSelectionCaseAction

      public static final String rtaInvertSelectionCaseAction
      The name of the action that inverts the case of the current selection.
      See Also:
    • rtaJoinLinesAction

      public static final String rtaJoinLinesAction
      The name of the action to join two lines.
      See Also:
    • rtaLineDownAction

      public static final String rtaLineDownAction
      Action to move a line down.
      See Also:
    • rtaLineUpAction

      public static final String rtaLineUpAction
      Action to move a line up.
      See Also:
    • rtaLowerSelectionCaseAction

      public static final String rtaLowerSelectionCaseAction
      The name of the action to make the current selection lower-case.
      See Also:
    • rtaNextOccurrenceAction

      public static final String rtaNextOccurrenceAction
      Action to select the next occurrence of the selected text.
      See Also:
    • rtaPrevOccurrenceAction

      public static final String rtaPrevOccurrenceAction
      Action to select the previous occurrence of the selected text.
      See Also:
    • rtaNextBookmarkAction

      public static final String rtaNextBookmarkAction
      Action to jump to the next bookmark.
      See Also:
    • clipboardHistoryAction

      public static final String clipboardHistoryAction
      Action to display the paste history popup.
      See Also:
    • rtaPrevBookmarkAction

      public static final String rtaPrevBookmarkAction
      Action to jump to the previous bookmark.
      See Also:
    • rtaPlaybackLastMacroAction

      public static final String rtaPlaybackLastMacroAction
      The name of the action that "plays back" the last macro.
      See Also:
    • rtaRedoAction

      public static final String rtaRedoAction
      The name of the action for "redoing" the last action undone.
      See Also:
    • rtaScrollDownAction

      public static final String rtaScrollDownAction
      The name of the action to scroll the text area down one line without changing the caret's position.
      See Also:
    • rtaScrollUpAction

      public static final String rtaScrollUpAction
      The name of the action to scroll the text area up one line without changing the caret's position.
      See Also:
    • rtaSelectionPageUpAction

      public static final String rtaSelectionPageUpAction
      The name of the action for "paging up" with the selection.
      See Also:
    • rtaSelectionPageDownAction

      public static final String rtaSelectionPageDownAction
      The name of the action for "paging down" with the selection.
      See Also:
    • rtaSelectionPageLeftAction

      public static final String rtaSelectionPageLeftAction
      The name of the action for "paging left" with the selection.
      See Also:
    • rtaSelectionPageRightAction

      public static final String rtaSelectionPageRightAction
      The name of the action for "paging right" with the selection.
      See Also:
    • rtaTimeDateAction

      public static final String rtaTimeDateAction
      The name of the action for inserting a time/date stamp.
      See Also:
    • rtaToggleBookmarkAction

      public static final String rtaToggleBookmarkAction
      Toggles whether the current line has a bookmark, if this text area is in an RTextScrollPane.
      See Also:
    • rtaToggleTextModeAction

      public static final String rtaToggleTextModeAction
      The name of the action taken when the user hits the Insert key (thus toggling between insert and overwrite modes).
      See Also:
    • rtaUndoAction

      public static final String rtaUndoAction
      The name of the action for "undoing" the last action done.
      See Also:
    • rtaUnselectAction

      public static final String rtaUnselectAction
      The name of the action for unselecting any selected text in the text area.
      See Also:
    • rtaUpperSelectionCaseAction

      public static final String rtaUpperSelectionCaseAction
      The name of the action for making the current selection upper-case.
      See Also:
    • defaultActions

      private static final RecordableTextAction[] defaultActions
      The actions that RTextAreaEditorKit adds to those of the default editor kit.
    • READBUFFER_SIZE

      private static final int READBUFFER_SIZE
      The amount of characters read at a time when reading a file.
      See Also:
  • Constructor Details

    • RTextAreaEditorKit

      public RTextAreaEditorKit()
      Constructor.
  • Method Details

    • 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 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 DefaultEditorKit
      Returns:
      the command list
    • read

      public void read(Reader in, Document doc, int pos) throws IOException, 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 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:
      IOException - on any I/O error
      BadLocationException - if pos represents an invalid location within the document.