Package org.fife.ui.rsyntaxtextarea
Class RSyntaxTextAreaEditorKit.InsertPairedCharacterAction
java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
org.fife.ui.rtextarea.RecordableTextAction
org.fife.ui.rtextarea.RTextAreaEditorKit.DefaultKeyTypedAction
org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaEditorKit.InsertPairedCharacterAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- Direct Known Subclasses:
RSyntaxTextAreaEditorKit.InsertQuoteAction
- Enclosing class:
RSyntaxTextAreaEditorKit
public static class RSyntaxTextAreaEditorKit.InsertPairedCharacterAction
extends RTextAreaEditorKit.DefaultKeyTypedAction
If there is no selection, a character is inserted. If there is a selection,
it is wrapped by the character and its pair. Useful for e.g. quotes, parens,
etc.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final char
private final char
private static final long
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.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 TypeMethodDescriptionvoid
actionPerformedImpl
(ActionEvent e, RTextArea textArea) The actual meat of the action.private void
wrapSelection
(RTextArea textArea) Methods inherited from class org.fife.ui.rtextarea.RTextAreaEditorKit.DefaultKeyTypedAction
getMacroID
Methods inherited from class org.fife.ui.rtextarea.RecordableTextAction
actionPerformed, getAccelerator, getDescription, getIcon, getMnemonic, getName, getShortDescription, isRecordable, setAccelerator, setMnemonic, setMnemonic, setName, setProperties, setRecordable, setShortDescription
Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
ch
private final char ch -
pairedCh
private final char pairedCh
-
-
Constructor Details
-
InsertPairedCharacterAction
-
-
Method Details
-
actionPerformedImpl
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 classRTextAreaEditorKit.DefaultKeyTypedAction
- Parameters:
e
- The action being performed.textArea
- The text area "receiving" the action.- See Also:
-
wrapSelection
-