Package org.fife.ui.rsyntaxtextarea
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
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The type of quote to insert. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteType
private final String
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
ConstructorsConstructorDescriptionInsertQuoteAction
(String actionName, RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteType quoteType) -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformedImpl
(ActionEvent e, RTextArea textArea) The actual meat of the action.private void
insertEmptyQuoteLiteral
(RSyntaxTextArea 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
-
quoteType
-
stringifiedQuoteTypeCh
-
-
Constructor Details
-
InsertQuoteAction
public InsertQuoteAction(String actionName, RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteType quoteType)
-
-
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 classRSyntaxTextAreaEditorKit.InsertPairedCharacterAction
- Parameters:
e
- The action being performed.textArea
- The text area "receiving" the action.- See Also:
-
insertEmptyQuoteLiteral
-