JavaTM Platform
Standard Ed. 6

javax.swing.text
�� TextAction

java.lang.Object
  �̳��� javax.swing.AbstractAction
      �̳��� javax.swing.text.TextAction
������ʵ�ֵĽӿڣ�
ActionListener, Serializable, Cloneable, EventListener, Action
ֱ����֪���ࣺ
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction, StyledEditorKit.StyledTextAction

public abstract class TextAction
extends AbstractAction

���ڿ�����ͬ�ı���������ļ��󶨵� Action ʵ�֡���Ϊ�����ö�����������һ����һ������䶯��Ŀ���;���������ṩ��ͼ����Ҫ�������ı������֧�֡����Ҫ�������������ѡ;����ͨ�����յ��� ActionEvent������� getSource ���ص� Object ������Ϊһ���ı��������ʹ��������������¼�Ϊ null ���߲��ܱ����������������һ����ý�����ı��������ͨ�����ʹ��һ�������� TextAction ������Ϣ�� JTextController ��ȷ����

���棺����������л��������Ժ�� Swing �汾�����ݡ���ǰ���л�֧�������ڶ��ڴ洢��������ͬ Swing �汾��Ӧ�ó���֮��� RMI���� 1.4 �汾��ʼ������ java.beans ����������֧������ JavaBeansTM ���ڴ洢�Ĺ��ܡ���μ� XMLEncoder��


�ֶ�ժҪ
 
���� javax.swing.AbstractAction �̳е��ֶ�
changeSupport, enabled
 
�ӽӿ� 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
 
���췽��ժҪ
TextAction(String name)
          ����һ���µ� JTextAction ����
 
����ժҪ
static Action[] augmentList(Action[] list1, Action[] list2)
          ȡһ�������б�������һ�������б�ȥ���䡣
protected  JTextComponent getFocusedComponent()
          ��ȡ��ǰ���н�����ı������
protected  JTextComponent getTextComponent(ActionEvent e)
          ȷ��������ʹ�õ������
 
���� javax.swing.AbstractAction �̳еķ���
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
���� java.lang.Object �̳еķ���
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
�ӽӿ� java.awt.event.ActionListener �̳еķ���
actionPerformed
 

���췽����ϸ��Ϣ

TextAction

public TextAction(String name)
����һ���µ� JTextAction ����

������
name - ����������
������ϸ��Ϣ

getTextComponent

protected final JTextComponent getTextComponent(ActionEvent e)
ȷ��������ʹ�õ��������� ActionEvent ��Ϊ null ���ܹ������������ ActionEvent ��Դ��ȡ����������򣬾�ʹ�����һ����ý���������

������
e - ActionEvent
���أ�
���

augmentList

public static final Action[] augmentList(Action[] list1,
                                         Action[] list2)
ȡһ�������б�������һ�������б�ȥ���䡣�ڶ����б������ڵ�һ���б������������б�������ͬ���Ƶ�һ������ʱ��ʹ�õڶ����б��е��Ǹ����

������
list1 - ��һ���б�������Ϊ�յ����� null
list2 - �ڶ����б�������Ϊ�յ����� null
���أ�
�������б�

getFocusedComponent

protected final JTextComponent getFocusedComponent()
��ȡ��ǰ���н�����ı���������������������ı����֮�乲�����������Ҫ������Ͷ�������ͨ���ڲ�ͬ�����ʹ��ͬһ��ʽ�ļ��󶨺����á�

���أ�
���

JavaTM Platform
Standard Ed. 6

�ύ��������
�йظ���� API �ο����ϺͿ�����Ա�ĵ�������� Java SE ������Ա�ĵ������ĵ���������ϸ�ġ����򿪷���Ա���������Լ�������������ﶨ�塢ʹ�ü��ɺ͹�������ʾ����

��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������