Package 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:
Serializable
,Cloneable
- Direct Known Subclasses:
RSyntaxTextAreaEditorKit
An extension of
DefaultEditorKit
that adds functionality found
in RTextArea
.- Version:
- 0.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Creates a beep.static class
Moves the caret to the beginning of the document.static class
Toggles the position of the caret between the beginning of the line, and the first non-whitespace character on the line.static class
Action that begins recording a macro.protected static class
Positions the caret at the beginning of the word.static class
Action for displaying a popup with a list of recently pasted text snippets.static class
Action for copying text.static class
Action for cutting text.static class
Action for decreasing the font size.static class
The action to use when no actions in the input/action map meet the key pressed.static class
Deletes the current line(s).static class
Deletes the character of content that follows the current caret position.static class
Deletes the character of content that precedes the current caret position.static class
Action that deletes the previous word in the text area.static class
Action that deletes all text from the caret position to the end of the caret's line.static class
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
Moves the caret to the end of the document.static class
Positions the caret at the end of the line.static class
Action that ends recording a macro.protected static class
Positions the caret at the end of the word.static class
Action for increasing the font size.static class
Action for when the user presses the Enter key.static class
Action taken when content is to be inserted.static class
Places a tab character into the document.static class
Action to invert the selection's case.static class
Action to join the current line and the following line.static class
Action that moves a line up or down.static class
Action to make the selection lower-case.static class
Action that moves the caret to the next (or previous) bookmark.static class
Selects the next occurrence of the text last selected.static class
Action to move the selection and/or caret.static class
Positions the caret at the next word.(package private) static class
Pages one view to the left or right.static class
Action for pasting text.static class
"Plays back" the last macro recorded.static class
Select the previous occurrence of the text last selected.static class
Positions the caret at the beginning of the previous word.static class
Re-does the last action undone.static class
Scrolls the text area one line up or down, without changing the caret position.static class
Selects the entire document.static class
Selects the line around the caret.static class
Selects the word around the caret.static class
Puts the text area into read-only mode.static class
Puts the text area into writable (from read-only) mode.static class
The action for inserting a time/date stamp.static class
Toggles whether the current line has a bookmark.static class
The action for the insert key toggling insert/overwrite modes.static class
Undoes the last action done.static class
Removes the selection, if any.static class
Action to make the selection upper-case.static class
Scrolls up/down vertically. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Action to display the paste history popup.private static final RecordableTextAction[]
The actions thatRTextAreaEditorKit
adds to those of the default editor kit.private static final int
The amount of characters read at a time when reading a file.static final String
The name of the action that begins recording a macro.static final String
The name of the action to decrease the font size.static final String
The name of the action that deletes the current line.static final String
The name of the action to delete the word before the caret.static final String
The name of the action taken to delete the remainder of the line (from the caret position to the end of the line).static final String
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 final String
The name of the action that ends recording a macro.static final String
The name of the action to increase the font size.static final String
The name of the action that inverts the case of the current selection.static final String
The name of the action to join two lines.static final String
Action to move a line down.static final String
Action to move a line up.static final String
The name of the action to make the current selection lower-case.static final String
Action to jump to the next bookmark.static final String
Action to select the next occurrence of the selected text.static final String
The name of the action that "plays back" the last macro.static final String
Action to jump to the previous bookmark.static final String
Action to select the previous occurrence of the selected text.static final String
The name of the action for "redoing" the last action undone.static final String
The name of the action to scroll the text area down one line without changing the caret's position.static final String
The name of the action to scroll the text area up one line without changing the caret's position.static final String
The name of the action for "paging down" with the selection.static final String
The name of the action for "paging left" with the selection.static final String
The name of the action for "paging right" with the selection.static final String
The name of the action for "paging up" with the selection.static final String
The name of the action for inserting a time/date stamp.static final String
Toggles whether the current line has a bookmark, if this text area is in anRTextScrollPane
.static final String
The name of the action taken when the user hits the Insert key (thus toggling between insert and overwrite modes).static final String
The name of the action for "undoing" the last action done.static final String
The name of the action for unselecting any selected text in the text area.static final String
The name of the action for making the current selection upper-case.Fields inherited from class javax.swing.text.DefaultEditorKit
backwardAction, beepAction, beginAction, beginLineAction, beginLineUpAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deleteNextWordAction, deletePrevCharAction, deletePrevWordAction, downAction, endAction, endLineAction, endLineDownAction, 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 -
Method Summary
Modifier and TypeMethodDescriptioncreateIconRowHeader
(RTextArea textArea) Creates an icon row header to use in the gutter for a text area.createLineNumberList
(RTextArea textArea) Creates a line number list to use in the gutter for a text area.Action[]
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
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
-
Field Details
-
rtaBeginRecordingMacroAction
The name of the action that begins recording a macro.- See Also:
-
rtaDecreaseFontSizeAction
The name of the action to decrease the font size.- See Also:
-
rtaDeleteLineAction
The name of the action that deletes the current line.- See Also:
-
rtaDeletePrevWordAction
The name of the action to delete the word before the caret.- See Also:
-
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
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
The name of the action that ends recording a macro.- See Also:
-
rtaIncreaseFontSizeAction
The name of the action to increase the font size.- See Also:
-
rtaInvertSelectionCaseAction
The name of the action that inverts the case of the current selection.- See Also:
-
rtaJoinLinesAction
The name of the action to join two lines.- See Also:
-
rtaLineDownAction
Action to move a line down.- See Also:
-
rtaLineUpAction
Action to move a line up.- See Also:
-
rtaLowerSelectionCaseAction
The name of the action to make the current selection lower-case.- See Also:
-
rtaNextOccurrenceAction
Action to select the next occurrence of the selected text.- See Also:
-
rtaPrevOccurrenceAction
Action to select the previous occurrence of the selected text.- See Also:
-
rtaNextBookmarkAction
Action to jump to the next bookmark.- See Also:
-
clipboardHistoryAction
Action to display the paste history popup.- See Also:
-
rtaPrevBookmarkAction
Action to jump to the previous bookmark.- See Also:
-
rtaPlaybackLastMacroAction
The name of the action that "plays back" the last macro.- See Also:
-
rtaRedoAction
The name of the action for "redoing" the last action undone.- See Also:
-
rtaScrollDownAction
The name of the action to scroll the text area down one line without changing the caret's position.- See Also:
-
rtaScrollUpAction
The name of the action to scroll the text area up one line without changing the caret's position.- See Also:
-
rtaSelectionPageUpAction
The name of the action for "paging up" with the selection.- See Also:
-
rtaSelectionPageDownAction
The name of the action for "paging down" with the selection.- See Also:
-
rtaSelectionPageLeftAction
The name of the action for "paging left" with the selection.- See Also:
-
rtaSelectionPageRightAction
The name of the action for "paging right" with the selection.- See Also:
-
rtaTimeDateAction
The name of the action for inserting a time/date stamp.- See Also:
-
rtaToggleBookmarkAction
Toggles whether the current line has a bookmark, if this text area is in anRTextScrollPane
.- See Also:
-
rtaToggleTextModeAction
The name of the action taken when the user hits the Insert key (thus toggling between insert and overwrite modes).- See Also:
-
rtaUndoAction
The name of the action for "undoing" the last action done.- See Also:
-
rtaUnselectAction
The name of the action for unselecting any selected text in the text area.- See Also:
-
rtaUpperSelectionCaseAction
The name of the action for making the current selection upper-case.- See Also:
-
defaultActions
The actions thatRTextAreaEditorKit
adds to those of the default editor kit. -
READBUFFER_SIZE
private static final int READBUFFER_SIZEThe amount of characters read at a time when reading a file.- See Also:
-
-
Constructor Details
-
RTextAreaEditorKit
public RTextAreaEditorKit()Constructor.
-
-
Method Details
-
createIconRowHeader
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
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
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 classDefaultEditorKit
- Returns:
- the command list
-
read
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 classDefaultEditorKit
- Parameters:
in
- The stream to read fromdoc
- The destination for the insertion.pos
- The location in the document to place the content >= 0.- Throws:
IOException
- on any I/O errorBadLocationException
- if pos represents an invalid location within the document.
-