⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 swingutilities.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to change the UI ActionMap for <code>component</code> to <code>uiActionMap</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/SwingUtilities.html#replaceUIInputMap(javax.swing.JComponent, int, javax.swing.InputMap)">replaceUIInputMap</A></B>(<A HREF="../../javax/swing/JComponent.html">JComponent</A>&nbsp;component,                  int&nbsp;type,                  <A HREF="../../javax/swing/InputMap.html">InputMap</A>&nbsp;uiInputMap)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience method to change the UI InputMap for <code>component</code> to <code>uiInputMap</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/SwingUtilities.html#updateComponentTreeUI(java.awt.Component)">updateComponentTreeUI</A></B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A simple minded look and feel change: ask each node in the tree to updateUI() -- that is, to initialize its UI property with the current look and feel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../java/awt/Window.html">Window</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/SwingUtilities.html#windowForComponent(java.awt.Component)">windowForComponent</A></B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;aComponent)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return <code>aComponent</code>'s window</TD></TR></TABLE>&nbsp;<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#clone()">clone</A>, <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>&nbsp;<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="isRectangleContainingRectangle(java.awt.Rectangle, java.awt.Rectangle)"><!-- --></A><H3>isRectangleContainingRectangle</H3><PRE>public static final boolean <B>isRectangleContainingRectangle</B>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A>&nbsp;a,                                                           <A HREF="../../java/awt/Rectangle.html">Rectangle</A>&nbsp;b)</PRE><DL><DD>Return true if <code>a</code> contains <code>b</code><DD><DL></DL></DD></DL><HR><A NAME="getLocalBounds(java.awt.Component)"><!-- --></A><H3>getLocalBounds</H3><PRE>public static <A HREF="../../java/awt/Rectangle.html">Rectangle</A> <B>getLocalBounds</B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;aComponent)</PRE><DL><DD>Return the rectangle (0,0,bounds.width,bounds.height) for the component <code>aComponent</code><DD><DL></DL></DD></DL><HR><A NAME="getWindowAncestor(java.awt.Component)"><!-- --></A><H3>getWindowAncestor</H3><PRE>public static <A HREF="../../java/awt/Window.html">Window</A> <B>getWindowAncestor</B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;c)</PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the first Window ancestor of c, or null if component is not contained inside a window</DL></DD></DL><HR><A NAME="convertPoint(java.awt.Component, java.awt.Point, java.awt.Component)"><!-- --></A><H3>convertPoint</H3><PRE>public static <A HREF="../../java/awt/Point.html">Point</A> <B>convertPoint</B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;source,                                 <A HREF="../../java/awt/Point.html">Point</A>&nbsp;aPoint,                                 <A HREF="../../java/awt/Component.html">Component</A>&nbsp;destination)</PRE><DL><DD>Convert a <code>aPoint</code> in <code>source</code> coordinate system to <code>destination</code> coordinate system. If <code>source></code>is null,<code>aPoint</code> is assumed to be in <code>destination</code>'s root component coordinate system. If <code>destination</code>is null, <code>aPoint</code> will be converted to <code>source</code>'s root component coordinate system. If both <code>source</code> and <code>destination</code> are null, return <code>aPoint</code> without any conversion.<DD><DL></DL></DD></DL><HR><A NAME="convertPoint(java.awt.Component, int, int, java.awt.Component)"><!-- --></A><H3>convertPoint</H3><PRE>public static <A HREF="../../java/awt/Point.html">Point</A> <B>convertPoint</B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;source,                                 int&nbsp;x,                                 int&nbsp;y,                                 <A HREF="../../java/awt/Component.html">Component</A>&nbsp;destination)</PRE><DL><DD>Convert the point <code>(x,y)</code> in <code>source</code> coordinate system to <code>destination</code> coordinate system. If <code>source></code>is null,<code>(x,y)</code> is assumed to be in <code>destination</code>'s root component coordinate system. If <code>destination</code>is null, <code>(x,y)</code> will be converted to <code>source</code>'s root component coordinate system. If both <code>source</code> and <code>destination</code> are null, return <code>(x,y)</code> without any conversion.<DD><DL></DL></DD></DL><HR><A NAME="convertRectangle(java.awt.Component, java.awt.Rectangle, java.awt.Component)"><!-- --></A><H3>convertRectangle</H3><PRE>public static <A HREF="../../java/awt/Rectangle.html">Rectangle</A> <B>convertRectangle</B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;source,                                         <A HREF="../../java/awt/Rectangle.html">Rectangle</A>&nbsp;aRectangle,                                         <A HREF="../../java/awt/Component.html">Component</A>&nbsp;destination)</PRE><DL><DD>Convert the rectangle <code>aRectangle</code> in <code>source</code> coordinate system to <code>destination</code> coordinate system. If <code>source></code>is null,<code>aRectangle</code> is assumed to be in <code>destination</code>'s root component coordinate system. If <code>destination</code>is null, <code>aRectangle</code> will be converted to <code>source</code>'s root component coordinate system. If both <code>source</code> and <code>destination</code> are null, return <code>aRectangle</code> without any conversion.<DD><DL></DL></DD></DL><HR><A NAME="getAncestorOfClass(java.lang.Class, java.awt.Component)"><!-- --></A><H3>getAncestorOfClass</H3><PRE>public static <A HREF="../../java/awt/Container.html">Container</A> <B>getAncestorOfClass</B>(<A HREF="../../java/lang/Class.html">Class</A>&nbsp;c,                                           <A HREF="../../java/awt/Component.html">Component</A>&nbsp;comp)</PRE><DL><DD>Convenience method for searching above <code>comp</code> in the component hierarchy and returns the first object of class <code>c</code> it finds. Can return null, if a class <code>c</code> cannot be found.<DD><DL></DL></DD></DL><HR><A NAME="getAncestorNamed(java.lang.String, java.awt.Component)"><!-- --></A><H3>getAncestorNamed</H3><PRE>public static <A HREF="../../java/awt/Container.html">Container</A> <B>getAncestorNamed</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;name,                                         <A HREF="../../java/awt/Component.html">Component</A>&nbsp;comp)</PRE><DL><DD>Convenience method for searching above <code>comp</code> in the component hierarchy and returns the first object of <code>name</code> it finds. Can return null, if <code>name</code> cannot be found.<DD><DL></DL></DD></DL><HR><A NAME="getDeepestComponentAt(java.awt.Component, int, int)"><!-- --></A><H3>getDeepestComponentAt</H3><PRE>public static <A HREF="../../java/awt/Component.html">Component</A> <B>getDeepestComponentAt</B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;parent,                                              int&nbsp;x,                                              int&nbsp;y)</PRE><DL><DD>Returns the deepest visible descendent Component of <code>parent</code>  that contains the location <code>x</code>, <code>y</code>.  If <code>parent</code> does not contain the specified location, then <code>null</code> is returned.  If <code>parent</code> is not a  container, or none of <code>parent</code>'s visible descendents  contain the specified location, <code>parent</code> is returned.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>parent</CODE> - the root component to begin the search<DD><CODE>x</CODE> - the x target location<DD><CODE>y</CODE> - the y target location</DL></DD></DL><HR><A NAME="convertMouseEvent(java.awt.Component, java.awt.event.MouseEvent, java.awt.Component)"><!-- --></A><H3>convertMouseEvent</H3><PRE>public static <A HREF="../../java/awt/event/MouseEvent.html">MouseEvent</A> <B>convertMouseEvent</B>(<A HREF="../../java/awt/Component.html">Component</A>&nbsp;source,                                           <A HREF="../../java/awt/event/MouseEvent.html">MouseEvent</A>&nbsp;sourceEvent,                                           <A HREF="../../java/awt/Component.html">Component</A>&nbsp;destination)</PRE><DL><DD>Returns a MouseEvent similar to <code>sourceEvent</code> except that its x and y members have been converted to <code>destination</code>'s coordinate system.  If <code>source</code> is null, <code>sourceEvent</code> x and y members are assumed to be into <code>destination</code>'s root component coordinate system. If <code>destination</code> is <code>null</code>, the returned MouseEvent will be in <code>source</code>'s coordinate system. <code>sourceEvent</code> will not be changed. A new event is returned. the <code>source</code> field of the returned event will be set to <code>destination</code> if destination is non null use the translateMouseEvent() method to translate a mouse event from one component to another without changing the source.<DD><DL></DL></DD></DL><HR><A NAME="convertPointToScreen(java.awt.Point, java.awt.Component)"><!-- --></A><H3>convertPointToScreen</H3><PRE>public static void <B>convertPointToScreen</B>(<A HREF="../../java/awt/Point.html">Point</A>&nbsp;p,                                        <A HREF="../../java/awt/Component.html">Component</A>&nbsp;c)</PRE><DL><DD>Convert a point from a component's coordinate system to screen coordinates.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - a Point object (converted to the new coordinate system)<DD><CODE>c</CODE> - a Component object</DL></DD></DL><HR><A NAME="convertPointFromScreen(java.awt.Point, java.awt.Component)"><!-- --></A><H3>convertPointFromScreen</H3><PRE>public static void <B>convertPointFromScreen</B>(<A HREF="../../java/awt/Point.html">Point</A>&nbsp;p,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -