javax.swing.text
public static class: DefaultEditorKit.InsertTabAction [javadoc |
source]
java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
javax.swing.text.DefaultEditorKit$InsertTabAction
All Implemented Interfaces:
Action, Cloneable, Serializable
Places a tab character into the document. If there
is a selection, it is removed before the tab is added.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the java.beans package.
Please see java.beans.XMLEncoder .
Also see:
- DefaultEditorKit#insertTabAction
- DefaultEditorKit#getActions
| Method from javax.swing.text.DefaultEditorKit$InsertTabAction Summary: |
|---|
|
actionPerformed |
| Methods from javax.swing.AbstractAction: |
|---|
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, hasSelectedKey, isEnabled, isSelected, putValue, removePropertyChangeListener, setEnabled, setEnabledFromAction, setToolTipTextFromAction, shouldReconfigure |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from javax.swing.text.DefaultEditorKit$InsertTabAction Detail: |
public void actionPerformed(ActionEvent e) {
JTextComponent target = getTextComponent(e);
if (target != null) {
if ((! target.isEditable()) || (! target.isEnabled())) {
UIManager.getLookAndFeel().provideErrorFeedback(target);
return;
}
target.replaceSelection("\t");
}
}
The operation to perform when this action is triggered. |