Class RSyntaxTextAreaEditorKit.InsertQuoteAction
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
org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaEditorKit.InsertQuoteAction
- All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
- Enclosing class:
RSyntaxTextAreaEditorKit
public static class RSyntaxTextAreaEditorKit.InsertQuoteAction
extends RSyntaxTextAreaEditorKit.InsertPairedCharacterAction
Inserts a quote character. If the current language supports string literals with this
quote character, the following additional logic occurs:
- If the caret is not in a string literal or comment, both the opening and closing quotes are entered
- If the caret is at the end (the closing quote) of a valid quoted literal, the existing closing quote character is overwritten, rather than a new quote character being entered
- Version:
- 0.5
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe type of quote to insert. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteTypeprivate final StringFields 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
ConstructorsConstructorDescriptionInsertQuoteAction(String actionName, RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteType quoteType) -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformedImpl(ActionEvent e, RTextArea textArea) The actual meat of the action.private voidinsertEmptyQuoteLiteral(RSyntaxTextArea textArea) Methods inherited from class RTextAreaEditorKit.DefaultKeyTypedAction
getMacroIDMethods 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, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
quoteType
-
stringifiedQuoteTypeCh
-
-
Constructor Details
-
InsertQuoteAction
public InsertQuoteAction(String actionName, RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteType quoteType)
-
-
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 classRSyntaxTextAreaEditorKit.InsertPairedCharacterAction- Parameters:
e- The action being performed.textArea- The text area "receiving" the action.- See Also:
-
insertEmptyQuoteLiteral
-