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:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private char
ch
private char
pairedCh
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description InsertPairedCharacterAction(java.lang.String actionName, char ch, char pairedCh)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformedImpl(java.awt.event.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 Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
ch
private final char ch
-
pairedCh
private final char pairedCh
-
-
Method Detail
-
actionPerformedImpl
public void actionPerformedImpl(java.awt.event.ActionEvent e, RTextArea textArea)
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:
RecordableTextAction.actionPerformed(java.awt.event.ActionEvent)
-
wrapSelection
private void wrapSelection(RTextArea textArea)
-
-