menu.html

来自「维信SDK文档。源码要求为至少5个C或Java源码」· HTML 代码 · 共 467 行 · 第 1/2 页

HTML
467
字号
<CODE>&nbsp;<A HREF="../../widsets/api/Menu.html" title="class in ">Menu</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Menu.html#reset()">reset</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the focus and sets all MenuItems visible.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class <A HREF="../../widsets/api/Object.html" title="class in ">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../widsets/api/Object.html#toString()">toString</A>, <A HREF="../../widsets/api/Object.html#equals(Object)">equals</A>, <A HREF="../../widsets/api/Object.html#hashCode()">hashCode</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from </B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="Menu()"><!-- --></A><H3>Menu</H3><PRE>       <B>Menu</B>()</PRE><DL><DD>Constructs a new Menu instance.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="add(int, String)"><!-- --></A><H3>add</H3><PRE>       <A HREF="../../widsets/api/Menu.html" title="class in ">Menu</A> <B>add</B>(int&nbsp;id,                <A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;text)</PRE><DL><DD>Creates a new MenuItem with specified action id and  text.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - An action id. It is passed to <A HREF="../../widsets/api/Script.html#actionPerformed(Shell, Component, int)"><CODE>Script.actionPerformed(Shell, Component, int)</CODE></A>            when user selects this menu item. It can also be used to            enable or disable this item.<DD><CODE>text</CODE> - Text to show<DT><B>Returns:</B><DD>this Menu instance</DL></DD></DL><HR><A NAME="begin(int, String)"><!-- --></A><H3>begin</H3><PRE>       <A HREF="../../widsets/api/Menu.html" title="class in ">Menu</A> <B>begin</B>(int&nbsp;id,                  <A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;text)</PRE><DL><DD>Creates a new MenuItem with sub menu.  Sub menu is indicated with arrow at the right side of an item.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - An action id. It can be used to enable or disable           this item.<DD><CODE>text</CODE> - Text to show<DT><B>Returns:</B><DD>instance of sub Menu, use <A HREF="../../widsets/api/Menu.html#end()"><CODE>end()</CODE></A> method to close sub menu and return         parent menu</DL></DD></DL><HR><A NAME="end()"><!-- --></A><H3>end</H3><PRE>       <A HREF="../../widsets/api/Menu.html" title="class in ">Menu</A> <B>end</B>()</PRE><DL><DD>Closes sub menu and returns to parent menu.<P><DD><DL><DT><B>Returns:</B><DD>parent menu</DL></DD></DL><HR><A NAME="reset()"><!-- --></A><H3>reset</H3><PRE>       <A HREF="../../widsets/api/Menu.html" title="class in ">Menu</A> <B>reset</B>()</PRE><DL><DD>Resets the focus and sets all MenuItems visible.<P><DD><DL><DT><B>Returns:</B><DD>this Menu instance</DL></DD></DL><HR><A NAME="enable(int, boolean)"><!-- --></A><H3>enable</H3><PRE>       <A HREF="../../widsets/api/Menu.html" title="class in ">Menu</A> <B>enable</B>(int&nbsp;id,                   boolean&nbsp;enabled)</PRE><DL><DD>Enable or disable menu item with specified action id.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - Action id of MenuItem to hide/show<DD><CODE>enabled</CODE> - if <code>true</code> item is shown, otherwise it is                hidden<DT><B>Returns:</B><DD>this Menu instance</DL></DD></DL><HR><A NAME="get(int)"><!-- --></A><H3>get</H3><PRE>       <A HREF="../../widsets/api/MenuItem.html" title="class in ">MenuItem</A> <B>get</B>(int&nbsp;id)</PRE><DL><DD>Returns MenuItem with specified action id.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - Action id to search for<DT><B>Returns:</B><DD>MenuItem or <code>null</code> if no matching id was found.</DL></DD></DL><HR><A NAME="open(Shell)"><!-- --></A><H3>open</H3><PRE>       void <B>open</B>(<A HREF="../../widsets/api/Shell.html" title="class in ">Shell</A>&nbsp;parent)</PRE><DL><DD>Opens this menu.  Parent shell's action handler receives all the actions fired by the menu, or if action handler is not set then widget's global action handler.  Parent can be just blank shell created by <code>new Shell(null)</code>, it doesn't be visible or in the UI stack.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>parent</CODE> - Parent shell</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../widsets/api/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../widsets/api/Map.html" title="class in "><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../widsets/api/MenuCallback.html" title="interface in "><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?widsets/api/Menu.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Menu.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

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