📄 jcomponent.html
字号:
<A HREF="../../../java/awt/FontMetrics.html">FontMetrics</A> fm, <A HREF="../../../java/lang/String.html">String</A> text, <A HREF="../../../javax/swing/Icon.html">Icon</A> icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, <A HREF="../../../java/awt/Rectangle.html">Rectangle</A> viewR, <A HREF="../../../java/awt/Rectangle.html">Rectangle</A> iconR, <A HREF="../../../java/awt/Rectangle.html">Rectangle</A> textR, int textIconGap)</CODE><BR> Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B>SwingUtilities.</B><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> component, int type, <A HREF="../../../javax/swing/InputMap.html">InputMap</A> uiInputMap)</CODE><BR> 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 void</CODE></FONT></TD><TD><CODE><B>SwingUtilities.</B><B><A HREF="../../../javax/swing/SwingUtilities.html#replaceUIActionMap(javax.swing.JComponent, javax.swing.ActionMap)">replaceUIActionMap</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> component, <A HREF="../../../javax/swing/ActionMap.html">ActionMap</A> uiActionMap)</CODE><BR> 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 <A HREF="../../../javax/swing/InputMap.html">InputMap</A></CODE></FONT></TD><TD><CODE><B>SwingUtilities.</B><B><A HREF="../../../javax/swing/SwingUtilities.html#getUIInputMap(javax.swing.JComponent, int)">getUIInputMap</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> component, int condition)</CODE><BR> Returns the InputMap provided by the UI for condition <code>condition</code> in component <code>component</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../javax/swing/ActionMap.html">ActionMap</A></CODE></FONT></TD><TD><CODE><B>SwingUtilities.</B><B><A HREF="../../../javax/swing/SwingUtilities.html#getUIActionMap(javax.swing.JComponent)">getUIActionMap</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> component)</CODE><BR> Returns the ActionMap provided by the UI in component <code>component</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract boolean</CODE></FONT></TD><TD><CODE><B>InputVerifier.</B><B><A HREF="../../../javax/swing/InputVerifier.html#verify(javax.swing.JComponent)">verify</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> input)</CODE><BR> Checks whether the JComponent's input is valid.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B>InputVerifier.</B><B><A HREF="../../../javax/swing/InputVerifier.html#shouldYieldFocus(javax.swing.JComponent)">shouldYieldFocus</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> input)</CODE><BR> Calls <code>verify(input)</code> to ensure that the input is valid.</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>DesktopManager.</B><B><A HREF="../../../javax/swing/DesktopManager.html#beginDraggingFrame(javax.swing.JComponent)">beginDraggingFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f)</CODE><BR> This method is normally called when the user has indicated that they will begin dragging a component around.</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>DesktopManager.</B><B><A HREF="../../../javax/swing/DesktopManager.html#dragFrame(javax.swing.JComponent, int, int)">dragFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f, int newX, int newY)</CODE><BR> The user has moved the frame.</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>DesktopManager.</B><B><A HREF="../../../javax/swing/DesktopManager.html#endDraggingFrame(javax.swing.JComponent)">endDraggingFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f)</CODE><BR> This method signals the end of the dragging session.</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>DesktopManager.</B><B><A HREF="../../../javax/swing/DesktopManager.html#beginResizingFrame(javax.swing.JComponent, int)">beginResizingFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f, int direction)</CODE><BR> This methods is normally called when the user has indicated that they will begin resizing the frame.</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>DesktopManager.</B><B><A HREF="../../../javax/swing/DesktopManager.html#resizeFrame(javax.swing.JComponent, int, int, int, int)">resizeFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f, int newX, int newY, int newWidth, int newHeight)</CODE><BR> The user has resized the component.</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>DesktopManager.</B><B><A HREF="../../../javax/swing/DesktopManager.html#endResizingFrame(javax.swing.JComponent)">endResizingFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f)</CODE><BR> This method signals the end of the resize session.</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>DesktopManager.</B><B><A HREF="../../../javax/swing/DesktopManager.html#setBoundsForFrame(javax.swing.JComponent, int, int, int, int)">setBoundsForFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f, int newX, int newY, int newWidth, int newHeight)</CODE><BR> This is a primative reshape method.</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>JToolTip.</B><B><A HREF="../../../javax/swing/JToolTip.html#setComponent(javax.swing.JComponent)">setComponent</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> c)</CODE><BR> Specifies the component that the tooltip describes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/plaf/ComponentUI.html">ComponentUI</A></CODE></FONT></TD><TD><CODE><B>UIDefaults.</B><B><A HREF="../../../javax/swing/UIDefaults.html#getUI(javax.swing.JComponent)">getUI</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> target)</CODE><BR> Creates an <code>ComponentUI</code> implementation for the specified component.</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>DefaultDesktopManager.</B><B><A HREF="../../../javax/swing/DefaultDesktopManager.html#beginDraggingFrame(javax.swing.JComponent)">beginDraggingFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f)</CODE><BR> </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>DefaultDesktopManager.</B><B><A HREF="../../../javax/swing/DefaultDesktopManager.html#dragFrame(javax.swing.JComponent, int, int)">dragFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f, int newX, int newY)</CODE><BR> Moves the visible location of the frame being dragged to the location specified.</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>DefaultDesktopManager.</B><B><A HREF="../../../javax/swing/DefaultDesktopManager.html#endDraggingFrame(javax.swing.JComponent)">endDraggingFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f)</CODE><BR> </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>DefaultDesktopManager.</B><B><A HREF="../../../javax/swing/DefaultDesktopManager.html#beginResizingFrame(javax.swing.JComponent, int)">beginResizingFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f, int direction)</CODE><BR> </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>DefaultDesktopManager.</B><B><A HREF="../../../javax/swing/DefaultDesktopManager.html#resizeFrame(javax.swing.JComponent, int, int, int, int)">resizeFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f, int newX, int newY, int newWidth, int newHeight)</CODE><BR> Calls setBoundsForFrame() with the new values.</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>DefaultDesktopManager.</B><B><A HREF="../../../javax/swing/DefaultDesktopManager.html#endResizingFrame(javax.swing.JComponent)">endResizingFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f)</CODE><BR> </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>DefaultDesktopManager.</B><B><A HREF="../../../javax/swing/DefaultDesktopManager.html#setBoundsForFrame(javax.swing.JComponent, int, int, int, int)">setBoundsForFrame</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> f, int newX, int newY, int newWidth, int newHeight)</CODE><BR> This moves the JComponent and repaints the damaged areas.</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>JFileChooser.</B><B><A HREF="../../../javax/swing/JFileChooser.html#setAccessory(javax.swing.JComponent)">setAccessory</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> newAccessory)</CODE><BR> Sets the accessory component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../javax/swing/plaf/ComponentUI.html">ComponentUI</A></CODE></FONT></TD><TD><CODE><B>UIManager.</B><B><A HREF="../../../javax/swing/UIManager.html#getUI(javax.swing.JComponent)">getUI</A></B>(<A HREF="../../../javax/swing/JComponent.html">JComponent</A> target)</CODE><BR> Returns the L&F object that renders the target component.</TD></TR></TABLE> <P><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TD COLSPAN=2>Constructors in <A HREF="../../../javax/swing/package-summary.html">javax.swing</A> with parameters of type <A HREF="../../../javax/swing/JComponent.html">JComponent</A></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -