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 charprivate final charprivate static final longFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields 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 TypeMethodDescriptionvoidactionPerformedImpl(ActionEvent e, RTextArea textArea) The actual meat of the action.private voidwrapSelection(RTextArea textArea) Methods inherited from class org.fife.ui.rtextarea.RTextAreaEditorKit.DefaultKeyTypedAction
getMacroIDMethods inherited from class org.fife.ui.rtextarea.RecordableTextAction
actionPerformed, getAccelerator, getDescription, getIcon, getMnemonic, getName, getShortDescription, isRecordable, setAccelerator, setMnemonic, setMnemonic, setName, setProperties, setRecordable, setShortDescriptionMethods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponentMethods 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: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.DefaultKeyTypedAction- Parameters:
e- The action being performed.textArea- The text area "receiving" the action.- See Also:
-
wrapSelection
-