📄 commandbars.html
字号:
<DL>
<DD>新建菜单。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>index</CODE> - 新建菜单在菜单条上的位置<DD><CODE>acceleratKey</CODE> - 新建菜单的助记符<DD><CODE>caption</CODE> - 新建菜单的显示文字
<DT><B>返回:</B><DD>新建的菜单 <p> <b>例子:</b> <pre> CommandBars bars = Application.getCommandBars(); bars.addMenu(2, 'C', "Customized Menu"); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="addToolBar(java.lang.String)"><!-- --></A><H3>
addToolBar</H3>
<PRE>
public <A HREF="../application/commandbars/CommandBar.html" title="application.commandbars 中的类">CommandBar</A> <B>addToolBar</B>(java.lang.String name)</PRE>
<DL>
<DD>新建工具条。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>name</CODE> - 新建工具条的名称
<DT><B>返回:</B><DD>新建的工具条 <p> <b>例子:</b> <pre> CommandBars bars = Application.getCommandBars(); bars.addToolBar("Customized ToolBar"); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="delete(application.commandbars.CommandBar)"><!-- --></A><H3>
delete</H3>
<PRE>
public void <B>delete</B>(<A HREF="../application/commandbars/CommandBar.html" title="application.commandbars 中的类">CommandBar</A> bar)</PRE>
<DL>
<DD>删除工具条和菜单。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>bar</CODE> - CommandBar对象 <p> <b>例子:</b> <pre> CommandBars bars = Application.getCommandBars(); CommandBar bar = bars.addToolBar("Customized ToolBar"); bars.delete(bar); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="deleteByID(int)"><!-- --></A><H3>
deleteByID</H3>
<PRE>
public void <B>deleteByID</B>(int ID)</PRE>
<DL>
<DD>根据已知工具条或菜单的ID删除工具条或菜单。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>ID</CODE> - 工具条或菜单的ID <p> <b>例子:</b> <pre> CommandBars bars = Application.getCommandBars(); CommandBar bar = bars.addToolBar("Customized ToolBar"); bars.deleteByID(bar.getID()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getCommandBarByID(int, int)"><!-- --></A><H3>
getCommandBarByID</H3>
<PRE>
public <A HREF="../application/commandbars/CommandBar.html" title="application.commandbars 中的类">CommandBar</A> <B>getCommandBarByID</B>(int type,
int ID)</PRE>
<DL>
<DD>根据ID获得CommandBar对象。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - CommandBar对象的类型,取值如下: 菜单: CommandBar.MENU 工具条: CommandBar.TOOLBAR<DD><CODE>ID</CODE> - CommandBar对象的ID
<DT><B>返回:</B><DD>CommandBar对象 <p> <b>例子:</b> <pre> CommandBars bars = Application.getCommandBars(); CommandBar bar = bars.getCommandBarByID(CommandBar.TOOLBAR, BarConstants.STANDARD_INDEX); bar.addItemByID(2,MenuIDConstants.FORMATTING_BOLD); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getCustomBarIDs()"><!-- --></A><H3>
getCustomBarIDs</H3>
<PRE>
public int[] <B>getCustomBarIDs</B>()</PRE>
<DL>
<DD>获得所有自定义工具条的ID数组。
<P>
<DD><DL>
<DT><B>返回:</B><DD>所有自定义工具条的ID数组 <pre> CommandBars bars = Application.getCommandBars(); CommandBar bar = bars.addToolBar("Customized ToolBar"); int[] IDs = bars.getCustomBarIDs(); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getCustomCommandBar(int, java.lang.String)"><!-- --></A><H3>
getCustomCommandBar</H3>
<PRE>
public <A HREF="../application/commandbars/CommandBar.html" title="application.commandbars 中的类">CommandBar</A> <B>getCustomCommandBar</B>(int type,
java.lang.String name)</PRE>
<DL>
<DD>根据自定义工具条的类型和名称获得工具条对象。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 工具条的类型,取值如下: 工具条: CommandBar.TOOLBAR<DD><CODE>name</CODE> - 工具条的名称
<DT><B>返回:</B><DD>符合条件的工具条对象 <p> <b>例子:</b> <pre> CommandBars bars = Application.getCommandBars(); CommandBar bar1 = bars.addToolBar("Customized ToolBar"); CommandBar cbs = bars.getCustomCommandBar(CommandBar.TOOLBAR, "Customized ToolBar"); System.out.println(cbs.getName()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getPopMenuBarID(int)"><!-- --></A><H3>
getPopMenuBarID</H3>
<PRE>
public <A HREF="../application/commandbars/CommandBar.html" title="application.commandbars 中的类">CommandBar</A> <B>getPopMenuBarID</B>(int ID)</PRE>
<DL>
<DD>根据ID得到相应的右键菜单
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>ID</CODE> - 右健菜单相应ID
<DT><B>返回:</B><DD>右键菜单 <p> <b>例子:</b> <pre> CommandBar bar = Application.getCommandBars().getPopMenuBarID(PopupMenuBarIDConstants.POPPICTURE); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="isLocked()"><!-- --></A><H3>
isLocked</H3>
<PRE>
public boolean <B>isLocked</B>()</PRE>
<DL>
<DD>是否主程序的工具条管理器的锁定状态。
<P>
<DD><DL>
<DT><B>返回:</B><DD>返回boolean 若为true 主程序的工具条管理器的锁定状态,否则没有锁定<p> <b>例子:</b> <pre> CommandBars bars = Application.getCommandBars(); bars.setLocked(false); System.out.print("主程序的工具条管理器的锁定状态为"+bars.isLocked()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="setLocked(boolean)"><!-- --></A><H3>
setLocked</H3>
<PRE>
public void <B>setLocked</B>(boolean locked)</PRE>
<DL>
<DD>设置主程序的工具条管理器的锁定状态。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>locked</CODE> - 锁定状态,true表示锁定。<p> <b>例子:</b> <pre> CommandBars bars = Application.getCommandBars(); bars.setLocked(true); </pre></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="跳过导航链接"></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="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>类</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../application/Application.html" title="application 中的类"><B>上一个类</B></A>
<A HREF="../application/EAbstractAction.html" title="application 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?application/CommandBars.html" target="_top"><B>框架</B></A>
<A HREF="CommandBars.html" target="_top"><B>无框架</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>所有类</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>所有类</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
摘要: 嵌套 | 字段 | <A HREF="#constructor_summary">构造方法</A> | <A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息: 字段 | <A HREF="#constructor_detail">构造方法</A> | <A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
版权所有 2001-2006 无锡永中科技有限公司
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -