📄 textaction.html
字号:
Fetches the text component that currently has focus.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/TextAction.html#getTextComponent(java.awt.event.ActionEvent)">getTextComponent</A></B>(<A HREF="../../../java/awt/event/ActionEvent.html">ActionEvent</A> e)</CODE><BR> Determines the component to use for the action.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.swing.AbstractAction"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class javax.swing.<A HREF="../../../javax/swing/AbstractAction.html">AbstractAction</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/swing/AbstractAction.html#addPropertyChangeListener(java.beans.PropertyChangeListener)">addPropertyChangeListener</A>, <A HREF="../../../javax/swing/AbstractAction.html#clone()">clone</A>, <A HREF="../../../javax/swing/AbstractAction.html#firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)">firePropertyChange</A>, <A HREF="../../../javax/swing/AbstractAction.html#getKeys()">getKeys</A>, <A HREF="../../../javax/swing/AbstractAction.html#getValue(java.lang.String)">getValue</A>, <A HREF="../../../javax/swing/AbstractAction.html#isEnabled()">isEnabled</A>, <A HREF="../../../javax/swing/AbstractAction.html#putValue(java.lang.String, java.lang.Object)">putValue</A>, <A HREF="../../../javax/swing/AbstractAction.html#removePropertyChangeListener(java.beans.PropertyChangeListener)">removePropertyChangeListener</A>, <A HREF="../../../javax/swing/AbstractAction.html#setEnabled(boolean)">setEnabled</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.event.ActionListener"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.awt.event.<A HREF="../../../java/awt/event/ActionListener.html">ActionListener</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/awt/event/ActionListener.html#actionPerformed(java.awt.event.ActionEvent)">actionPerformed</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="TextAction(java.lang.String)"><!-- --></A><H3>TextAction</H3><PRE>public <B>TextAction</B>(<A HREF="../../../java/lang/String.html">String</A> name)</PRE><DL><DD>Creates a new JTextAction object.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the action</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getTextComponent(java.awt.event.ActionEvent)"><!-- --></A><H3>getTextComponent</H3><PRE>protected final <A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> <B>getTextComponent</B>(<A HREF="../../../java/awt/event/ActionEvent.html">ActionEvent</A> e)</PRE><DL><DD>Determines the component to use for the action. This if fetched from the source of the ActionEvent if it's not null and can be narrowed. Otherwise, the last focused component is used.<DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - the ActionEvent<DT><B>Returns:</B><DD>the component</DL></DD></DL><HR><A NAME="augmentList(javax.swing.Action[], javax.swing.Action[])"><!-- --></A><H3>augmentList</H3><PRE>public static final <A HREF="../../../javax/swing/Action.html">Action</A>[] <B>augmentList</B>(<A HREF="../../../javax/swing/Action.html">Action</A>[] list1, <A HREF="../../../javax/swing/Action.html">Action</A>[] list2)</PRE><DL><DD>Takes one list of commands and augments it with another list of commands. The second list is considered to be higher priority than the first list and commands with the same name will both lists will only have the dominate command found in the second list in the returned list.<DD><DL><DT><B>Parameters:</B><DD><CODE>list1</CODE> - the first list, may be empty but not null<DD><CODE>list2</CODE> - the second list, may be empty but not null<DT><B>Returns:</B><DD>the augmented list</DL></DD></DL><HR><A NAME="getFocusedComponent()"><!-- --></A><H3>getFocusedComponent</H3><PRE>protected final <A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> <B>getFocusedComponent</B>()</PRE><DL><DD>Fetches the text component that currently has focus. This allows actions to be shared across text components which is useful for key-bindings where a large set of actions are defined, but generally used the same way across many different components.<DD><DL><DT><B>Returns:</B><DD>the component</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TextAction.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/swing/text/TabStop.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/swing/text/Utilities.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="TextAction.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_javax.swing.AbstractAction">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -