focusevent.html
来自「API資料大全」· HTML 代码 · 共 435 行 · 第 1/2 页
HTML
435 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:33:25 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class FocusEvent</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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/FocusEvent.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="../../../java/awt/event/FocusAdapter.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/event/HierarchyBoundsAdapter.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="FocusEvent.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">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: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt.event</FONT><BR>Class FocusEvent</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A> | +--<A HREF="../../../java/util/EventObject.html">java.util.EventObject</A> | +--<A HREF="../../../java/awt/AWTEvent.html">java.awt.AWTEvent</A> | +--<A HREF="../../../java/awt/event/ComponentEvent.html">java.awt.event.ComponentEvent</A> | +--<B>java.awt.event.FocusEvent</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../java/io/Serializable.html">Serializable</A></DD></DL><HR><DL><DT>public class <B>FocusEvent</B><DT>extends <A HREF="../../../java/awt/event/ComponentEvent.html">ComponentEvent</A></DL><P>A low-level event which indicates that a component has gained or lost the keyboard focus. This low-level event is generated by a component (such as a text field). The event is passed to every <code>FocusListener</code> or <code>FocusAdapter</code> object which registered to receive such events using the component's <code>addFocusListener</code> method. (<code>FocusAdapter</code> objects implement the <code>FocusListener</code> interface.) Each such listener object gets this <code>FocusEvent</code> when the event occurs. <P> There are two levels of focus change events: permanent and temporary. Permanent focus change events occur when focus is directly moved from one component to another, such as through calls to requestFocus() or as the user uses the Tab key to traverse components. Temporary focus change events occur when focus is temporarily gained or lost for a component as the indirect result of another operation, such as window deactivation or a scrollbar drag. In this case, the original focus state will automatically be restored once that operation is finished, or, for the case of window deactivation, when the window is reactivated. Both permanent and temporary focus events are delivered using the FOCUS_GAINED and FOCUS_LOST event ids; the levels may be distinguished in the event using the isTemporary() method.<P><DL><DT><B>Since: </B><DD>1.1</DD><DT><B>See Also: </B><DD><A HREF="../../../java/awt/event/FocusAdapter.html"><CODE>FocusAdapter</CODE></A>, <A HREF="../../../java/awt/event/FocusListener.html"><CODE>FocusListener</CODE></A>, <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/focuslistener.html">Tutorial: Writing a Focus Listener</a>, <a href="http://www.awl.com/cp/javaseries/jcl1_2.html">Reference: The Java Class Libraries (update file)</a>, <A HREF="../../../serialized-form.html#java.awt.event.FocusEvent">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/FocusEvent.html#FOCUS_FIRST">FOCUS_FIRST</A></B></CODE><BR> The first number in the range of ids used for focus events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/FocusEvent.html#FOCUS_GAINED">FOCUS_GAINED</A></B></CODE><BR> This event indicates that the component gained the keyboard focus.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/FocusEvent.html#FOCUS_LAST">FOCUS_LAST</A></B></CODE><BR> The last number in the range of ids used for focus events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/FocusEvent.html#FOCUS_LOST">FOCUS_LOST</A></B></CODE><BR> This event indicates that the component lost the keyboard focus.</TD></TR></TABLE> <A NAME="fields_inherited_from_class_java.awt.event.ComponentEvent"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.awt.event.<A HREF="../../../java/awt/event/ComponentEvent.html">ComponentEvent</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/awt/event/ComponentEvent.html#COMPONENT_FIRST">COMPONENT_FIRST</A>, <A HREF="../../../java/awt/event/ComponentEvent.html#COMPONENT_HIDDEN">COMPONENT_HIDDEN</A>, <A HREF="../../../java/awt/event/ComponentEvent.html#COMPONENT_LAST">COMPONENT_LAST</A>, <A HREF="../../../java/awt/event/ComponentEvent.html#COMPONENT_MOVED">COMPONENT_MOVED</A>, <A HREF="../../../java/awt/event/ComponentEvent.html#COMPONENT_RESIZED">COMPONENT_RESIZED</A>, <A HREF="../../../java/awt/event/ComponentEvent.html#COMPONENT_SHOWN">COMPONENT_SHOWN</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_java.awt.AWTEvent"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.awt.<A HREF="../../../java/awt/AWTEvent.html">AWTEvent</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/awt/AWTEvent.html#ACTION_EVENT_MASK">ACTION_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#ADJUSTMENT_EVENT_MASK">ADJUSTMENT_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#COMPONENT_EVENT_MASK">COMPONENT_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#consumed">consumed</A>, <A HREF="../../../java/awt/AWTEvent.html#CONTAINER_EVENT_MASK">CONTAINER_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#FOCUS_EVENT_MASK">FOCUS_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#HIERARCHY_BOUNDS_EVENT_MASK">HIERARCHY_BOUNDS_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#HIERARCHY_EVENT_MASK">HIERARCHY_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#id">id</A>, <A HREF="../../../java/awt/AWTEvent.html#INPUT_METHOD_EVENT_MASK">INPUT_METHOD_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#INVOCATION_EVENT_MASK">INVOCATION_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#ITEM_EVENT_MASK">ITEM_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#KEY_EVENT_MASK">KEY_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#MOUSE_EVENT_MASK">MOUSE_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#MOUSE_MOTION_EVENT_MASK">MOUSE_MOTION_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#PAINT_EVENT_MASK">PAINT_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#RESERVED_ID_MAX">RESERVED_ID_MAX</A>, <A HREF="../../../java/awt/AWTEvent.html#TEXT_EVENT_MASK">TEXT_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#WINDOW_EVENT_MASK">WINDOW_EVENT_MASK</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_java.util.EventObject"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.util.<A HREF="../../../java/util/EventObject.html">EventObject</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/util/EventObject.html#source">source</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/event/FocusEvent.html#FocusEvent(java.awt.Component, int)">FocusEvent</A></B>(<A HREF="../../../java/awt/Component.html">Component</A> source, int id)</CODE><BR> Constructs a FocusEvent object and identifies it as a permanent change in focus.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/event/FocusEvent.html#FocusEvent(java.awt.Component, int, boolean)">FocusEvent</A></B>(<A HREF="../../../java/awt/Component.html">Component</A> source, int id, boolean temporary)</CODE><BR> Constructs a FocusEvent object and identifies whether or not the change is temporary.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?