org.netbeans.editor
Class BaseKit.DefaultKeyTypedAction
java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
org.netbeans.editor.BaseAction
org.netbeans.editor.BaseKit.DefaultKeyTypedAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
- Direct Known Subclasses:
- ExtKit.ExtDefaultKeyTypedAction
- Enclosing class:
- BaseKit
public static class BaseKit.DefaultKeyTypedAction
- extends BaseAction
Default typed action
- See Also:
- Serialized Form
| Fields inherited from class org.netbeans.editor.BaseAction |
ABBREV_RESET, CLEAR_STATUS_TEXT, ICON_RESOURCE_PROPERTY, LOCALE_DESC_PREFIX, LOCALE_POPUP_PREFIX, MAGIC_POSITION_RESET, NO_KEYBINDING, NO_RECORDING, POPUP_MENU_TEXT, SAVE_POSITION, SELECTION_REMOVE, UNDO_MERGE_RESET, updateMask, WORD_MATCH_RESET |
|
Method Summary |
void |
actionPerformed(ActionEvent evt,
JTextComponent target)
The target method that performs the real action functionality. |
protected void |
checkIndent(JTextComponent target,
String typedText)
Check whether there was any important character typed
so that the line should be possibly reformatted. |
protected Class |
getShortDescriptionBundleClass()
Get the class in a package where resource bundle for localization
of the short description of this action resides. |
protected void |
insertString(BaseDocument doc,
int dotPos,
Caret caret,
String str,
boolean overwrite)
Hook to insert the given string at the given position into
the given document in insert-mode, no selection, writeable
document. |
protected void |
replaceSelection(JTextComponent target,
int dotPos,
Caret caret,
String str,
boolean overwrite)
Hook to insert the given string at the given position into
the given document in insert-mode with selection visible
Designed to be overridden by subclasses that want
to intercept inserted characters. |
| Methods inherited from class org.netbeans.editor.BaseAction |
actionNameUpdate, actionPerformed, asynchonous, createDefaultValue, findValue, getDefaultShortDescription, getPopupMenuItem, getPopupMenuText, getValue, putValue, updateComponent, updateComponent |
BaseKit.DefaultKeyTypedAction
public BaseKit.DefaultKeyTypedAction()
actionPerformed
public void actionPerformed(ActionEvent evt,
JTextComponent target)
- Description copied from class:
BaseAction
- The target method that performs the real action functionality.
- Specified by:
actionPerformed in class BaseAction
- Parameters:
evt - action event describing the action that occuredtarget - target component where the action occured. It's retrieved
by the TextAction.getTextComponent(evt).
insertString
protected void insertString(BaseDocument doc,
int dotPos,
Caret caret,
String str,
boolean overwrite)
throws BadLocationException
- Hook to insert the given string at the given position into
the given document in insert-mode, no selection, writeable
document. Designed to be overridden by subclasses that want
to intercept inserted characters.
- Throws:
BadLocationException
replaceSelection
protected void replaceSelection(JTextComponent target,
int dotPos,
Caret caret,
String str,
boolean overwrite)
throws BadLocationException
- Hook to insert the given string at the given position into
the given document in insert-mode with selection visible
Designed to be overridden by subclasses that want
to intercept inserted characters.
- Throws:
BadLocationException
checkIndent
protected void checkIndent(JTextComponent target,
String typedText)
- Check whether there was any important character typed
so that the line should be possibly reformatted.
getShortDescriptionBundleClass
protected Class getShortDescriptionBundleClass()
- Description copied from class:
BaseAction
- Get the class in a package where resource bundle for localization
of the short description of this action resides.
By default this method returns null.
- Overrides:
getShortDescriptionBundleClass in class BaseAction