Class RSyntaxTextAreaEditorKit.InsertBreakAction
java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
org.fife.ui.rtextarea.RecordableTextAction
org.fife.ui.rtextarea.RTextAreaEditorKit.InsertBreakAction
org.fife.ui.rsyntaxtextarea.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:
-
Field Summary
Fields inherited from class AbstractAction
changeSupport, enabledFields inherited from interface Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformedImpl(ActionEvent e, RTextArea textArea) The actual meat of the action.protected voidhandleInsertBreak(RSyntaxTextArea textArea, boolean noSelection) Actually inserts the newline into the document, and auto-indents if appropriate.Methods inherited from class RTextAreaEditorKit.InsertBreakAction
getMacroID, isEnabledMethods inherited from class RecordableTextAction
actionPerformed, getAccelerator, getDescription, getIcon, getMnemonic, getName, getShortDescription, isRecordable, setAccelerator, setMnemonic, setMnemonic, setName, setProperties, setRecordable, setShortDescriptionMethods inherited from class TextAction
augmentList, getFocusedComponent, getTextComponentMethods inherited from class AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
InsertBreakAction
public InsertBreakAction()
-
-
Method Details
-
actionPerformedImpl
Description copied from class:RecordableTextActionThe actual meat of the action. If you wish to subclass this action and modify its behavior, this is the method to override.- Overrides:
actionPerformedImplin classRTextAreaEditorKit.InsertBreakAction- Parameters:
e- The action being performed.textArea- The text area "receiving" the action.- See Also:
-
handleInsertBreak
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.
-