📄 jpopupmenu.html
字号:
<BR> Messaged when the menubar selection changes to activate or deactivate this 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="../../javax/swing/JPopupMenu.html#pack()">pack</A></B>()</CODE><BR> Lays out the container so that it uses the minimum space needed to display its contents.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JPopupMenu.html#paintBorder(java.awt.Graphics)">paintBorder</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> Paints the popup menu's border if <code>BorderPainted</code> property is true.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JPopupMenu.html#paramString()">paramString</A></B>()</CODE><BR> Returns a string representation of this <code>JPopupMenu</code>.</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="../../javax/swing/JPopupMenu.html#processKeyEvent(java.awt.event.KeyEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager)">processKeyEvent</A></B>(<A HREF="../../java/awt/event/KeyEvent.html">KeyEvent</A> e, <A HREF="../../javax/swing/MenuElement.html">MenuElement</A>[] path, <A HREF="../../javax/swing/MenuSelectionManager.html">MenuSelectionManager</A> manager)</CODE><BR> This method is required to conform to the <code>MenuElement</code> interface, but it not implemented.</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="../../javax/swing/JPopupMenu.html#processMouseEvent(java.awt.event.MouseEvent, javax.swing.MenuElement[], javax.swing.MenuSelectionManager)">processMouseEvent</A></B>(<A HREF="../../java/awt/event/MouseEvent.html">MouseEvent</A> event, <A HREF="../../javax/swing/MenuElement.html">MenuElement</A>[] path, <A HREF="../../javax/swing/MenuSelectionManager.html">MenuSelectionManager</A> manager)</CODE><BR> This method is required to conform to the <code>MenuElement</code> interface, but it not implemented.</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="../../javax/swing/JPopupMenu.html#remove(int)">remove</A></B>(int pos)</CODE><BR> Removes the component at the specified index from this popup 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="../../javax/swing/JPopupMenu.html#removePopupMenuListener(javax.swing.event.PopupMenuListener)">removePopupMenuListener</A></B>(<A HREF="../../javax/swing/event/PopupMenuListener.html">PopupMenuListener</A> l)</CODE><BR> Removes a <code>PopupMenu</code> listener.</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="../../javax/swing/JPopupMenu.html#setBorderPainted(boolean)">setBorderPainted</A></B>(boolean b)</CODE><BR> Sets whether the border should be painted.</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><A HREF="../../javax/swing/JPopupMenu.html#setDefaultLightWeightPopupEnabled(boolean)">setDefaultLightWeightPopupEnabled</A></B>(boolean aFlag)</CODE><BR> Sets the default value for the <code>lightWeightPopupEnabled</code> property.</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="../../javax/swing/JPopupMenu.html#setInvoker(java.awt.Component)">setInvoker</A></B>(<A HREF="../../java/awt/Component.html">Component</A> invoker)</CODE><BR> Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.</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="../../javax/swing/JPopupMenu.html#setLabel(java.lang.String)">setLabel</A></B>(<A HREF="../../java/lang/String.html">String</A> label)</CODE><BR> Sets the popup menu's label.</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="../../javax/swing/JPopupMenu.html#setLightWeightPopupEnabled(boolean)">setLightWeightPopupEnabled</A></B>(boolean aFlag)</CODE><BR> When displaying the popup, <code>JPopupMenu</code> chooses to use a light weight popup if it fits.</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="../../javax/swing/JPopupMenu.html#setLocation(int, int)">setLocation</A></B>(int x, int y)</CODE><BR> Sets the location of the upper left corner of the popup menu using x, y coordinates.</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="../../javax/swing/JPopupMenu.html#setPopupSize(java.awt.Dimension)">setPopupSize</A></B>(<A HREF="../../java/awt/Dimension.html">Dimension</A> d)</CODE><BR> Sets the size of the Popup window using a <code>Dimension</code> object.</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="../../javax/swing/JPopupMenu.html#setPopupSize(int, int)">setPopupSize</A></B>(int width, int height)</CODE><BR> Sets the size of the Popup window to the specified width and height.</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="../../javax/swing/JPopupMenu.html#setSelected(java.awt.Component)">setSelected</A></B>(<A HREF="../../java/awt/Component.html">Component</A> sel)</CODE><BR> Sets the currently selected component, This will result in a change to the selection model.</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="../../javax/swing/JPopupMenu.html#setSelectionModel(javax.swing.SingleSelectionModel)">setSelectionModel</A></B>(<A HREF="../../javax/swing/SingleSelectionModel.html">SingleSelectionModel</A> model)</CODE><BR> Sets the model object to handle single selections.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -