windowlistener.html
来自「API資料大全」· HTML 代码 · 共 332 行
HTML
332 行
<!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:23 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Interface WindowListener</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/WindowListener.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/TextListener.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="WindowListener.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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>Interface WindowListener</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../java/util/EventListener.html">EventListener</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../java/awt/AWTEventMulticaster.html">AWTEventMulticaster</A>, <A HREF="../../../java/awt/event/WindowAdapter.html">WindowAdapter</A></DD></DL><HR><DL><DT>public interface <B>WindowListener</B><DT>extends <A HREF="../../../java/util/EventListener.html">EventListener</A></DL><P>The listener interface for receiving window events. The class that is interested in processing a window event either implements this interface (and all the methods it contains) or extends the abstract <code>WindowAdapter</code> class (overriding only the methods of interest). The listener object created from that class is then registered with a Window using the window's <code>addWindowListener</code> method. When the window's status changes by virtue of being opened, closed, activated or deactivated, iconified or deiconified, the relevant method in the listener object is invoked, and the <code>WindowEvent</code> is passed to it.<P><DL><DT><B>Since: </B><DD>1.1</DD><DT><B>See Also: </B><DD><A HREF="../../../java/awt/event/WindowAdapter.html"><CODE>WindowAdapter</CODE></A>, <A HREF="../../../java/awt/event/WindowEvent.html"><CODE>WindowEvent</CODE></A>, <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/windowlistener.html">Tutorial: Writing a Window Listener</a>, <a href="http://www.awl.com/cp/javaseries/jcl1_2.html">Reference: The Java Class Libraries (update file)</a></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== 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></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/WindowListener.html#windowActivated(java.awt.event.WindowEvent)">windowActivated</A></B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</CODE><BR> Invoked when the window is set to be the user's active window, which means the window (or one of its subcomponents) will receive keyboard events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/WindowListener.html#windowClosed(java.awt.event.WindowEvent)">windowClosed</A></B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</CODE><BR> Invoked when a window has been closed as the result of calling dispose on the window.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/WindowListener.html#windowClosing(java.awt.event.WindowEvent)">windowClosing</A></B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</CODE><BR> Invoked when the user attempts to close the window from the window's system menu.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/WindowListener.html#windowDeactivated(java.awt.event.WindowEvent)">windowDeactivated</A></B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</CODE><BR> Invoked when a window is no longer the user's active window, which means that keyboard events will no longer be delivered to the window or its subcomponents.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/WindowListener.html#windowDeiconified(java.awt.event.WindowEvent)">windowDeiconified</A></B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</CODE><BR> Invoked when a window is changed from a minimized to a normal state.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/WindowListener.html#windowIconified(java.awt.event.WindowEvent)">windowIconified</A></B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</CODE><BR> Invoked when a window is changed from a normal to a minimized state.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/WindowListener.html#windowOpened(java.awt.event.WindowEvent)">windowOpened</A></B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</CODE><BR> Invoked the first time a window is made visible.</TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ 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="windowOpened(java.awt.event.WindowEvent)"><!-- --></A><H3>windowOpened</H3><PRE>public void <B>windowOpened</B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</PRE><DL><DD>Invoked the first time a window is made visible.<DD><DL></DL></DD></DL><HR><A NAME="windowClosing(java.awt.event.WindowEvent)"><!-- --></A><H3>windowClosing</H3><PRE>public void <B>windowClosing</B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</PRE><DL><DD>Invoked when the user attempts to close the window from the window's system menu. If the program does not explicitly hide or dispose the window while processing this event, the window close operation will be cancelled.<DD><DL></DL></DD></DL><HR><A NAME="windowClosed(java.awt.event.WindowEvent)"><!-- --></A><H3>windowClosed</H3><PRE>public void <B>windowClosed</B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</PRE><DL><DD>Invoked when a window has been closed as the result of calling dispose on the window.<DD><DL></DL></DD></DL><HR><A NAME="windowIconified(java.awt.event.WindowEvent)"><!-- --></A><H3>windowIconified</H3><PRE>public void <B>windowIconified</B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</PRE><DL><DD>Invoked when a window is changed from a normal to a minimized state. For many platforms, a minimized window is displayed as the icon specified in the window's iconImage property.<DD><DL></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/Frame.html#setIconImage(java.awt.Image)"><CODE>Frame.setIconImage(java.awt.Image)</CODE></A></DL></DD></DL><HR><A NAME="windowDeiconified(java.awt.event.WindowEvent)"><!-- --></A><H3>windowDeiconified</H3><PRE>public void <B>windowDeiconified</B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</PRE><DL><DD>Invoked when a window is changed from a minimized to a normal state.<DD><DL></DL></DD></DL><HR><A NAME="windowActivated(java.awt.event.WindowEvent)"><!-- --></A><H3>windowActivated</H3><PRE>public void <B>windowActivated</B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</PRE><DL><DD>Invoked when the window is set to be the user's active window, which means the window (or one of its subcomponents) will receive keyboard events.<DD><DL></DL></DD></DL><HR><A NAME="windowDeactivated(java.awt.event.WindowEvent)"><!-- --></A><H3>windowDeactivated</H3><PRE>public void <B>windowDeactivated</B>(<A HREF="../../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</PRE><DL><DD>Invoked when a window is no longer the user's active window, which means that keyboard events will no longer be delivered to the window or its subcomponents.<DD><DL></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/WindowListener.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/TextListener.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="WindowListener.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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 + -
显示快捷键?