<html> <head> <title>Interface XMenu</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../../idl.css"> </head> <body> <div id="adc-idlref"> <a name="_top_"> </a><table class="navimain" border="0" cellpadding="3"> <tr> <td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td> <td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td> <td class="navimain"><a href="XMenu-xref.html" class="navimain">Use</a></td> <td class="navimainnone">Devguide</td> <td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td> </tr> </table> <table class="navisub" border="0" cellpadding="0"> <tr> <td class="navisub"><a href="#MethodsSummary" class="navisub">Methods' Summary</a></td> <td class="navisub">Attributes' Summary</td> <td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td> <td class="navisub">Attributes' Details</td> </tr> </table> <hr> <table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;"> <tr> <td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">awt</a> :: </p> </td> </tr> <tr> <td class="title">interface XMenu</td> </tr> <tr> <td/></tr> <tr> <td><dl> <dt><b>Description</b></dt> <dd>specifies a simple menu. </dd> </dl> </td> </tr> </table> <hr> <a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Methods' Summary</td> </tr> <tr> <td class="imsum_left"><a href="#addMenuListener">addMenuListener</a></td> <td class="imsum_right">adds the specified menu listener to receive events from this menu. </td> </tr> <tr> <td class="imsum_left"><a href="#removeMenuListener">removeMenuListener</a></td> <td class="imsum_right">removes the specified menu listener so that it no longer receives events from this menu. </td> </tr> <tr> <td class="imsum_left"><a href="#insertItem">insertItem</a></td> <td class="imsum_right">inserts an item into the menu. </td> </tr> <tr> <td class="imsum_left"><a href="#removeItem">removeItem</a></td> <td class="imsum_right">removes one or more items from the menu. </td> </tr> <tr> <td class="imsum_left"><a href="#getItemCount">getItemCount</a></td> <td class="imsum_right">returns the number of items in the menu. </td> </tr> <tr> <td class="imsum_left"><a href="#getItemId">getItemId</a></td> <td class="imsum_right">returns the id of the item at the specified position. </td> </tr> <tr> <td class="imsum_left"><a href="#getItemPos">getItemPos</a></td> <td class="imsum_right">returns the position of the item with the specified id. </td> </tr> <tr> <td class="imsum_left"><a href="#enableItem">enableItem</a></td> <td class="imsum_right">enables or disables the menu item. </td> </tr> <tr> <td class="imsum_left"><a href="#isItemEnabled">isItemEnabled</a></td> <td class="imsum_right">returns the state of the menu item. </td> </tr> <tr> <td class="imsum_left"><a href="#setItemText">setItemText</a></td> <td class="imsum_right">sets the text for the menu item. </td> </tr> <tr> <td class="imsum_left"><a href="#getItemText">getItemText</a></td> <td class="imsum_right">returns the string for the given item id. </td> </tr> <tr> <td class="imsum_left"><a href="#setPopupMenu">setPopupMenu</a></td> <td class="imsum_right">sets the popup menu for a specified menu item. </td> </tr> <tr> <td class="imsum_left"><a href="#getPopupMenu">getPopupMenu</a></td> <td class="imsum_right">returns the popup menu from the menu item. </td> </tr> </table> <a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle">Methods' Details</td> </tr> <tr> <td class="imdetail"><a name="addMenuListener" class="membertitle">addMenuListener</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">[oneway] void</td> </tr> <tr> <td valign="top"><b>addMenuListener</b>(</td> <td valign="top">[in] <a href="XMenuListener.html">XMenuListener</a></td> <td valign="bottom"> xListener );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>adds the specified menu listener to receive events from this menu. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="removeMenuListener" class="membertitle">removeMenuListener</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">[oneway] void</td> </tr> <tr> <td valign="top"><b>removeMenuListener</b>(</td> <td valign="top">[in] <a href="XMenuListener.html">XMenuListener</a></td> <td valign="bottom"> xListener );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>removes the specified menu listener so that it no longer receives events from this menu. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="insertItem" class="membertitle">insertItem</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">[oneway] void</td> </tr> <tr> <td valign="top"><b>insertItem</b>(</td> <td valign="top">[in] short</td> <td valign="bottom"> nItemId,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> aText,</td> </tr> <tr> <td/><td valign="top">[in] short</td> <td valign="bottom"> nItemStyle,</td> </tr> <tr> <td/><td valign="top">[in] short</td> <td valign="bottom"> nPos );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>inserts an item into the menu. </dd> <dd><p>The item is appended if the position is greater than or equal to <code>getItemCount()</code> or if it is negative.</p> </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="removeItem" class="membertitle">removeItem</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">[oneway] void</td> </tr> <tr> <td valign="top"><b>removeItem</b>(</td> <td valign="top">[in] short</td> <td valign="bottom"> nPos,</td> </tr> <tr> <td/><td valign="top">[in] short</td> <td valign="bottom"> nCount );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>removes one or more items from the menu. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getItemCount" class="membertitle">getItemCount</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">short</td> </tr> <tr> <td valign="top"><b>getItemCount</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>returns the number of items in the menu. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getItemId" class="membertitle">getItemId</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">short</td> </tr> <tr> <td valign="top"><b>getItemId</b>(</td> <td valign="top">[in] short</td> <td valign="bottom"> nPos );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>returns the id of the item at the specified position. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getItemPos" class="membertitle">getItemPos</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">short</td> </tr> <tr> <td valign="top"><b>getItemPos</b>(</td> <td valign="top">[in] short</td> <td valign="bottom"> nId );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>returns the position of the item with the specified id. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="enableItem" class="membertitle">enableItem</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">[oneway] void</td> </tr> <tr> <td valign="top"><b>enableItem</b>(</td> <td valign="top">[in] short</td> <td valign="bottom"> nItemId,</td> </tr> <tr> <td/><td valign="top">[in] boolean</td> <td valign="bottom"> bEnable );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>enables or disables the menu item. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="isItemEnabled" class="membertitle">isItemEnabled</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">boolean</td> </tr> <tr> <td valign="top"><b>isItemEnabled</b>(</td> <td valign="top">[in] short</td> <td valign="bottom"> nItemId );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>returns the state of the menu item. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="setItemText" class="membertitle">setItemText</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">[oneway] void</td> </tr> <tr> <td valign="top"><b>setItemText</b>(</td> <td valign="top">[in] short</td> <td valign="bottom"> nItemId,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> aText );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>sets the text for the menu item. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getItemText" class="membertitle">getItemText</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">string</td> </tr> <tr> <td valign="top"><b>getItemText</b>(</td> <td valign="top">[in] short</td> <td valign="bottom"> nItemId );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>returns the string for the given item id. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="setPopupMenu" class="membertitle">setPopupMenu</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">[oneway] void</td> </tr> <tr> <td valign="top"><b>setPopupMenu</b>(</td> <td valign="top">[in] short</td> <td valign="bottom"> nItemId,</td> </tr> <tr> <td/><td valign="top">[in] <a href="XPopupMenu.html">XPopupMenu</a></td> <td valign="bottom"> aPopupMenu );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>sets the popup menu for a specified menu item. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="getPopupMenu" class="membertitle">getPopupMenu</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3"><a href="XPopupMenu.html">XPopupMenu</a></td> </tr> <tr> <td valign="top"><b>getPopupMenu</b>(</td> <td valign="top">[in] short</td> <td valign="bottom"> nItemId );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>returns the popup menu from the menu item. </dd> </dl> </td> </tr> </table> </td> </tr> </table> <a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p> </div> <!-- id="adc-idlref" --> </body> </html>