window.html
来自「API資料大全」· HTML 代码 · 共 1,082 行 · 第 1/5 页
HTML
1,082 行
<DD>Adds the specified window listener to receive window events from this window. If l is null, no exception is thrown and no action is performed.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the window listener</DL></DD></DL><HR><A NAME="removeWindowListener(java.awt.event.WindowListener)"><!-- --></A><H3>removeWindowListener</H3><PRE>public void <B>removeWindowListener</B>(<A HREF="../../java/awt/event/WindowListener.html">WindowListener</A> l)</PRE><DL><DD>Removes the specified window listener so that it no longer receives window events from this window. If l is null, no exception is thrown and no action is performed.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the window listener</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> listenerType)</PRE><DL><DD>Return an array of all the listeners that were added to the Window with addXXXListener(), where XXX is the name of the <code>listenerType</code> argument. For example, to get all of the WindowListener(s) for the given Window <code>w</code>, one would write: <pre> WindowListener[] wls = (WindowListener[])(w.getListeners(WindowListener.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/Container.html#getListeners(java.lang.Class)">getListeners</A></CODE> in class <CODE><A HREF="../../java/awt/Container.html">Container</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> e)</PRE><DL><DD>Processes events on this window. If the event is an WindowEvent, it invokes the processWindowEvent method, else it invokes its superclass's processEvent.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Container.html#processEvent(java.awt.AWTEvent)">processEvent</A></CODE> in class <CODE><A HREF="../../java/awt/Container.html">Container</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - the event</DL></DD></DL><HR><A NAME="processWindowEvent(java.awt.event.WindowEvent)"><!-- --></A><H3>processWindowEvent</H3><PRE>protected void <B>processWindowEvent</B>(<A HREF="../../java/awt/event/WindowEvent.html">WindowEvent</A> e)</PRE><DL><DD>Processes window events occurring on this window by dispatching them to any registered WindowListener objects. NOTE: This method will not be called unless window events are enabled for this component; this happens when one of the following occurs: a) A WindowListener object is registered via addWindowListener() b) Window events are enabled via enableEvents()<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - the window event<DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#enableEvents(long)"><CODE>Component.enableEvents(long)</CODE></A></DL></DD></DL><HR><A NAME="getFocusOwner()"><!-- --></A><H3>getFocusOwner</H3><PRE>public <A HREF="../../java/awt/Component.html">Component</A> <B>getFocusOwner</B>()</PRE><DL><DD>Returns the child component of this Window which has focus if and only if this Window is active.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the component with focus, or null if no children have focus assigned to them.</DL></DD></DL><HR><A NAME="postEvent(java.awt.Event)"><!-- --></A><H3>postEvent</H3><PRE>public boolean <B>postEvent</B>(<A HREF="../../java/awt/Event.html">Event</A> e)</PRE><DL><DD><B>Deprecated.</B> <I>As of JDK version 1.1 replaced by <code>dispatchEvent(AWTEvent)</code>.</I><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Component.html#postEvent(java.awt.Event)">postEvent</A></CODE> in class <CODE><A HREF="../../java/awt/Component.html">Component</A></CODE></DL></DD></DL><HR><A NAME="isShowing()"><!-- --></A><H3>isShowing</H3><PRE>public boolean <B>isShowing</B>()</PRE><DL><DD>Checks if this Window is showing on screen.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Component.html#isShowing()">isShowing</A></CODE> in class <CODE><A HREF="../../java/awt/Component.html">Component</A></CODE></DL></DD><DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/Component.html#setVisible(boolean)"><CODE>Component.setVisible(boolean)</CODE></A></DL></DD></DL><HR><A NAME="applyResourceBundle(java.util.ResourceBundle)"><!-- --></A><H3>applyResourceBundle</H3><PRE>public void <B>applyResourceBundle</B>(<A HREF="../../java/util/ResourceBundle.html">ResourceBundle</A> rb)</PRE><DL><DD>Apply the settings in the given ResourceBundle to this Window. Currently, this applies the ResourceBundle's ComponentOrientation to this Window and all components contained within it.<DD><DL></DL></DD><DD><DL><DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/ComponentOrientation.html"><CODE>ComponentOrientation</CODE></A></DL></DD></DL><HR><A NAME="applyResourceBundle(java.lang.String)"><!-- --></A><H3>applyResourceBundle</H3><PRE>public void <B>applyResourceBundle</B>(<A HREF="../../java/lang/String.html">String</A> rbName)</PRE><DL><DD>Load the ResourceBundle with the given name using the default locale and apply its settings to this window. Currently, this applies the ResourceBundle's ComponentOrientation to this Window and all components contained within it.<DD><DL></DL></DD><DD><DL><DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/ComponentOrientation.html"><CODE>ComponentOrientation</CODE></A></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 Window. For windows, the AccessibleContext takes the form of an AccessibleAWTWindow. A new AccessibleAWTWindow instance is created if necessary.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../javax/accessibility/Accessible.html#getAccessibleContext()">getAccessibleContext</A></CODE> in interface <CODE><A HREF="../../javax/accessibility/Accessible.html">Accessible</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Component.html#getAccessibleContext()">getAccessibleContext</A></CODE> in class <CODE><A HREF="../../java/awt/Component.html">Component</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an AccessibleAWTWindow that serves as the AccessibleContext of this Window</DL></DD></DL><HR><A NAME="getGraphicsConfiguration()"><!-- --></A><H3>getGraphicsConfiguration</H3><PRE>public <A HREF="../../java/awt/GraphicsConfiguration.html">GraphicsConfiguration</A> <B>getGraphicsConfiguration</B>()</PRE><DL><DD>This method returns the GraphicsConfiguration used by this Window.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Component.html#getGraphicsConfiguration()">getGraphicsConfiguration</A></CODE> in class <CODE><A HREF="../../java/awt/Component.html">Component</A></CODE></DL></DD><DD>Following copied from class: <CODE>java.awt.Component</CODE></DD><DD><DL><DT><B>Returns:</B><DD>the <code>GraphicsConfiguration</code> used by this <code>Component</code> or <code>null</code></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/Window.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-f
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?