textfield.html

来自「API資料大全」· HTML 代码 · 共 975 行 · 第 1/4 页

HTML
975
字号
public <A HREF="../../java/awt/Dimension.html">Dimension</A> <B>preferredSize</B>()</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>getPreferredSize()</code>.</I><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Component.html#preferredSize()">preferredSize</A></CODE> in class <CODE><A HREF="../../java/awt/Component.html">Component</A></CODE></DL></DD></DL><HR><A NAME="getMinimumSize(int)"><!-- --></A><H3>getMinimumSize</H3><PRE>public <A HREF="../../java/awt/Dimension.html">Dimension</A> <B>getMinimumSize</B>(int&nbsp;columns)</PRE><DL><DD>Gets the minumum dimensions for a text field with the specified number of columns.<DD><DL><DT><B>Parameters:</B><DD><CODE>columns</CODE> - the number of columns in                          this text field.<DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="minimumSize(int)"><!-- --></A><H3>minimumSize</H3><PRE>public <A HREF="../../java/awt/Dimension.html">Dimension</A> <B>minimumSize</B>(int&nbsp;columns)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>getMinimumSize(int)</code>.</I><P></DL><HR><A NAME="getMinimumSize()"><!-- --></A><H3>getMinimumSize</H3><PRE>public <A HREF="../../java/awt/Dimension.html">Dimension</A> <B>getMinimumSize</B>()</PRE><DL><DD>Gets the minumum dimensions for this text field.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Component.html#getMinimumSize()">getMinimumSize</A></CODE> in class <CODE><A HREF="../../java/awt/Component.html">Component</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the minimum dimensions for                  displaying this text field.<DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><HR><A NAME="minimumSize()"><!-- --></A><H3>minimumSize</H3><PRE>public <A HREF="../../java/awt/Dimension.html">Dimension</A> <B>minimumSize</B>()</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>getMinimumSize()</code>.</I><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Component.html#minimumSize()">minimumSize</A></CODE> in class <CODE><A HREF="../../java/awt/Component.html">Component</A></CODE></DL></DD></DL><HR><A NAME="addActionListener(java.awt.event.ActionListener)"><!-- --></A><H3>addActionListener</H3><PRE>public void <B>addActionListener</B>(<A HREF="../../java/awt/event/ActionListener.html">ActionListener</A>&nbsp;l)</PRE><DL><DD>Adds the specified action listener to receive action events from this text field.   If l is null, no exception is thrown and no action is performed.<DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the action listener.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/event/package-summary.html">java.awt.event</A>, <A HREF="../../java/awt/TextField.html#removeActionListener(java.awt.event.ActionListener)"><CODE>removeActionListener(java.awt.event.ActionListener)</CODE></A></DL></DD></DL><HR><A NAME="removeActionListener(java.awt.event.ActionListener)"><!-- --></A><H3>removeActionListener</H3><PRE>public void <B>removeActionListener</B>(<A HREF="../../java/awt/event/ActionListener.html">ActionListener</A>&nbsp;l)</PRE><DL><DD>Removes the specified action listener so that it no longer receives action events from this text field. If l is null, no exception is thrown and no action is performed.<DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the action listener.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/event/package-summary.html">java.awt.event</A>, <A HREF="../../java/awt/TextField.html#addActionListener(java.awt.event.ActionListener)"><CODE>addActionListener(java.awt.event.ActionListener)</CODE></A></DL></DD></DL><HR><A NAME="getListeners(java.lang.Class)"><!-- --></A><H3>getListeners</H3><PRE>public <A HREF="../../java/util/EventListener.html">EventListener</A>[] <B>getListeners</B>(<A HREF="../../java/lang/Class.html">Class</A>&nbsp;listenerType)</PRE><DL><DD>Return an array of all the listeners that were added to the TextField with addXXXListener(), where XXX is the name of the <code>listenerType</code> argument.  For example, to get all of the ActionListener(s) for the given TextField <code>t</code>, one would write: <pre> ActionListener[] als = (ActionListener[])(t.getListeners(ActionListener.class)) </pre> If no such listener list exists, then an empty array is returned.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/TextComponent.html#getListeners(java.lang.Class)">getListeners</A></CODE> in class <CODE><A HREF="../../java/awt/TextComponent.html">TextComponent</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listenerType</CODE> - Type of listeners requested<DT><B>Returns:</B><DD>all of the listeners of the specified type supported by this text field<DT><B>Since: </B><DD>1.3</DD></DL></DD></DL><HR><A NAME="processEvent(java.awt.AWTEvent)"><!-- --></A><H3>processEvent</H3><PRE>protected void <B>processEvent</B>(<A HREF="../../java/awt/AWTEvent.html">AWTEvent</A>&nbsp;e)</PRE><DL><DD>Processes events on this text field. If the event is an instance of <code>ActionEvent</code>, it invokes the <code>processActionEvent</code> method. Otherwise, it invokes <code>processEvent</code> on the superclass.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/TextComponent.html#processEvent(java.awt.AWTEvent)">processEvent</A></CODE> in class <CODE><A HREF="../../java/awt/TextComponent.html">TextComponent</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - the event.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/event/ActionEvent.html"><CODE>ActionEvent</CODE></A>, <A HREF="../../java/awt/TextField.html#processActionEvent(java.awt.event.ActionEvent)"><CODE>processActionEvent(java.awt.event.ActionEvent)</CODE></A></DL></DD></DL><HR><A NAME="processActionEvent(java.awt.event.ActionEvent)"><!-- --></A><H3>processActionEvent</H3><PRE>protected void <B>processActionEvent</B>(<A HREF="../../java/awt/event/ActionEvent.html">ActionEvent</A>&nbsp;e)</PRE><DL><DD>Processes action events occurring on this text field by dispatching them to any registered <code>ActionListener</code> objects. <p> This method is not called unless action events are enabled for this component. Action events are enabled when one of the following occurs: <p><ul> <li>An <code>ActionListener</code> object is registered via <code>addActionListener</code>. <li>Action events are enabled via <code>enableEvents</code>. </ul><DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - the action event.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/event/ActionListener.html"><CODE>ActionListener</CODE></A>, <A HREF="../../java/awt/TextField.html#addActionListener(java.awt.event.ActionListener)"><CODE>addActionListener(java.awt.event.ActionListener)</CODE></A>, <A HREF="../../java/awt/Component.html#enableEvents(long)"><CODE>Component.enableEvents(long)</CODE></A></DL></DD></DL><HR><A NAME="paramString()"><!-- --></A><H3>paramString</H3><PRE>protected <A HREF="../../java/lang/String.html">String</A> <B>paramString</B>()</PRE><DL><DD>Returns the parameter string representing the state of this text field. This string is useful for debugging.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/TextComponent.html#paramString()">paramString</A></CODE> in class <CODE><A HREF="../../java/awt/TextComponent.html">TextComponent</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the parameter string of this text field.</DL></DD></DL><HR><A NAME="getAccessibleContext()"><!-- --></A><H3>getAccessibleContext</H3><PRE>public <A HREF="../../javax/accessibility/AccessibleContext.html">AccessibleContext</A> <B>getAccessibleContext</B>()</PRE><DL><DD>Gets the AccessibleContext associated with this TextField.  For text fields, the AccessibleContext takes the form of an  AccessibleAWTTextField.  A new AccessibleAWTTextField instance is created if necessary.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/TextComponent.html#getAccessibleContext()">getAccessibleContext</A></CODE> in class <CODE><A HREF="../../java/awt/TextComponent.html">TextComponent</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an AccessibleAWTTextField that serves as the          AccessibleContext of this TextField</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TextField.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/awt/TextComponent.AccessibleAWTTextComponent.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/awt/TextField.AccessibleAWTTextField.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>  &nbsp;&nbsp;<A HREF="TextField.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.awt.TextComponent">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 + =
减小字号Ctrl + -
显示快捷键?