popupmenu.html
来自「API資料大全」· HTML 代码 · 共 383 行 · 第 1/2 页
HTML
383 行
<BR> Shows the popup menu at the x, y position relative to an origin component.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.Menu"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.awt.<A HREF="../../java/awt/Menu.html">Menu</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/Menu.html#add(java.awt.MenuItem)">add</A>, <A HREF="../../java/awt/Menu.html#add(java.lang.String)">add</A>, <A HREF="../../java/awt/Menu.html#addSeparator()">addSeparator</A>, <A HREF="../../java/awt/Menu.html#countItems()">countItems</A>, <A HREF="../../java/awt/Menu.html#getItem(int)">getItem</A>, <A HREF="../../java/awt/Menu.html#getItemCount()">getItemCount</A>, <A HREF="../../java/awt/Menu.html#insert(java.awt.MenuItem, int)">insert</A>, <A HREF="../../java/awt/Menu.html#insert(java.lang.String, int)">insert</A>, <A HREF="../../java/awt/Menu.html#insertSeparator(int)">insertSeparator</A>, <A HREF="../../java/awt/Menu.html#isTearOff()">isTearOff</A>, <A HREF="../../java/awt/Menu.html#paramString()">paramString</A>, <A HREF="../../java/awt/Menu.html#remove(int)">remove</A>, <A HREF="../../java/awt/Menu.html#remove(java.awt.MenuComponent)">remove</A>, <A HREF="../../java/awt/Menu.html#removeAll()">removeAll</A>, <A HREF="../../java/awt/Menu.html#removeNotify()">removeNotify</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.MenuItem"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.awt.<A HREF="../../java/awt/MenuItem.html">MenuItem</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/MenuItem.html#addActionListener(java.awt.event.ActionListener)">addActionListener</A>, <A HREF="../../java/awt/MenuItem.html#deleteShortcut()">deleteShortcut</A>, <A HREF="../../java/awt/MenuItem.html#disable()">disable</A>, <A HREF="../../java/awt/MenuItem.html#disableEvents(long)">disableEvents</A>, <A HREF="../../java/awt/MenuItem.html#enable()">enable</A>, <A HREF="../../java/awt/MenuItem.html#enable(boolean)">enable</A>, <A HREF="../../java/awt/MenuItem.html#enableEvents(long)">enableEvents</A>, <A HREF="../../java/awt/MenuItem.html#getActionCommand()">getActionCommand</A>, <A HREF="../../java/awt/MenuItem.html#getLabel()">getLabel</A>, <A HREF="../../java/awt/MenuItem.html#getListeners(java.lang.Class)">getListeners</A>, <A HREF="../../java/awt/MenuItem.html#getShortcut()">getShortcut</A>, <A HREF="../../java/awt/MenuItem.html#isEnabled()">isEnabled</A>, <A HREF="../../java/awt/MenuItem.html#processActionEvent(java.awt.event.ActionEvent)">processActionEvent</A>, <A HREF="../../java/awt/MenuItem.html#processEvent(java.awt.AWTEvent)">processEvent</A>, <A HREF="../../java/awt/MenuItem.html#removeActionListener(java.awt.event.ActionListener)">removeActionListener</A>, <A HREF="../../java/awt/MenuItem.html#setActionCommand(java.lang.String)">setActionCommand</A>, <A HREF="../../java/awt/MenuItem.html#setEnabled(boolean)">setEnabled</A>, <A HREF="../../java/awt/MenuItem.html#setLabel(java.lang.String)">setLabel</A>, <A HREF="../../java/awt/MenuItem.html#setShortcut(java.awt.MenuShortcut)">setShortcut</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.MenuComponent"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.awt.<A HREF="../../java/awt/MenuComponent.html">MenuComponent</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/MenuComponent.html#dispatchEvent(java.awt.AWTEvent)">dispatchEvent</A>, <A HREF="../../java/awt/MenuComponent.html#getFont()">getFont</A>, <A HREF="../../java/awt/MenuComponent.html#getName()">getName</A>, <A HREF="../../java/awt/MenuComponent.html#getParent()">getParent</A>, <A HREF="../../java/awt/MenuComponent.html#getPeer()">getPeer</A>, <A HREF="../../java/awt/MenuComponent.html#getTreeLock()">getTreeLock</A>, <A HREF="../../java/awt/MenuComponent.html#postEvent(java.awt.Event)">postEvent</A>, <A HREF="../../java/awt/MenuComponent.html#setFont(java.awt.Font)">setFont</A>, <A HREF="../../java/awt/MenuComponent.html#setName(java.lang.String)">setName</A>, <A HREF="../../java/awt/MenuComponent.html#toString()">toString</A></CODE></TD></TR></TABLE> <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#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> <A NAME="methods_inherited_from_class_java.awt.MenuContainer"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.awt.<A HREF="../../java/awt/MenuContainer.html">MenuContainer</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/MenuContainer.html#getFont()">getFont</A>, <A HREF="../../java/awt/MenuContainer.html#postEvent(java.awt.Event)">postEvent</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="PopupMenu()"><!-- --></A><H3>PopupMenu</H3><PRE>public <B>PopupMenu</B>()</PRE><DL><DD>Creates a new popup menu.</DL><HR><A NAME="PopupMenu(java.lang.String)"><!-- --></A><H3>PopupMenu</H3><PRE>public <B>PopupMenu</B>(<A HREF="../../java/lang/String.html">String</A> label)</PRE><DL><DD>Creates a new popup menu with the specified name.<DD><DL><DT><B>Parameters:</B><DD><CODE>label</CODE> - a non-null string specifying the popup menu's label</DL></DD></DL><!-- ============ 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="addNotify()"><!-- --></A><H3>addNotify</H3><PRE>public void <B>addNotify</B>()</PRE><DL><DD>Creates the popup menu's peer. The peer allows us to change the appearance of the popup menu without changing any of the popup menu's functionality.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Menu.html#addNotify()">addNotify</A></CODE> in class <CODE><A HREF="../../java/awt/Menu.html">Menu</A></CODE></DL></DD></DL><HR><A NAME="show(java.awt.Component, int, int)"><!-- --></A><H3>show</H3><PRE>public void <B>show</B>(<A HREF="../../java/awt/Component.html">Component</A> origin, int x, int y)</PRE><DL><DD>Shows the popup menu at the x, y position relative to an origin component. The origin component must be contained within the component hierarchy of the popup menu's parent. Both the origin and the parent must be showing on the screen for this method to be valid.<p> If this PopupMenu is being used as a Menu (i.e., it has a non-Component parent), then you cannot call this method on the PopupMenu.<DD><DL><DT><B>Parameters:</B><DD><CODE>origin</CODE> - the component which defines the coordinate space<DD><CODE>x</CODE> - the x coordinate position to popup the menu<DD><CODE>y</CODE> - the y coordinate position to popup the menu<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if this PopupMenu has a non- Component parent</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 PopupMenu. For popup menus, the AccessibleContext takes the form of an AccessibleAWTPopupMenu. A new AccessibleAWTPopupMenu instance is created if necessary.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/awt/Menu.html#getAccessibleContext()">getAccessibleContext</A></CODE> in class <CODE><A HREF="../../java/awt/Menu.html">Menu</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an AccessibleAWTPopupMenu that serves as the AccessibleContext of this PopupMenu</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/PopupMenu.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/Polygon.html"><B>PREV CLASS</B></A> <A HREF="../../java/awt/PopupMenu.AccessibleAWTPopupMenu.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="PopupMenu.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_class_summary">INNER</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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 + -
显示快捷键?