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:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteType
The type of quote to insert.
-
Field Summary
Fields Modifier and Type Field Description private RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteType
quoteType
private java.lang.String
stringifiedQuoteTypeCh
-
Constructor Summary
Constructors Constructor Description InsertQuoteAction(java.lang.String actionName, RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteType quoteType)
-
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
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 Detail
-
quoteType
private final RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteType quoteType
-
stringifiedQuoteTypeCh
private final java.lang.String stringifiedQuoteTypeCh
-
-
Constructor Detail
-
InsertQuoteAction
public InsertQuoteAction(java.lang.String actionName, RSyntaxTextAreaEditorKit.InsertQuoteAction.QuoteType quoteType)
-
-
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 classRSyntaxTextAreaEditorKit.InsertPairedCharacterAction
- Parameters:
e
- The action being performed.textArea
- The text area "receiving" the action.- See Also:
RecordableTextAction.actionPerformed(java.awt.event.ActionEvent)
-
insertEmptyQuoteLiteral
private void insertEmptyQuoteLiteral(RSyntaxTextArea textArea)
-
-