⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dialogs.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
          YES_YESTOALL_NO_CANCEL,CONTINUE_END,DISABLE_ENABLE,          ABORT_RETRY_IGNORE,UPDATE_UNUPDATE,FIX_IGNORE图标类型:CRITICAL,QUESTION,EXCLAMATION,INFORMATION默认按钮类型:DEFAULT_BUTTON1,DEFAULT_BUTTON2,DEFAULT_BUTTON3,DEFAULT_BUTTON4<p><DD><CODE>title</CODE> - 对话框的标题(null表示永中集成Office的统一图标)
<DT><B>返回:</B><DD>按下的按钮类型(具体见OfficeDialogConstants)注:用户按下的按钮类型:      OK,NO,CANCEL,ABORT,YES,RETRY,YESTOALL,IGNORE,CONTINUE,      END,DISABLE,ENABLE,HELP,UPDATE,UNUPDATE <p> <b>例子:</b> <pre> ...... application.util.Dialogs.showMessageDialog(dialog,"I have a message to tell you.",OfficeDialogConstants.OK_CANCEL        + OfficeDialogConstants.INFORMATION ,"Message title"); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="showMessageDialog(java.awt.Dialog, java.lang.String, java.lang.String)"><!-- --></A><H3>
showMessageDialog</H3>
<PRE>
public static int <B>showMessageDialog</B>(java.awt.Dialog&nbsp;dialog,
                                    java.lang.String&nbsp;prompt,
                                    java.lang.String&nbsp;title)</PRE>
<DL>
<DD>该方法为Dialogs提供对话框的显示。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>dialog</CODE> - 对话框的容器(对话框的父窗体)<DD><CODE>prompt</CODE> - 对话框显示的内容<p><DD><CODE>title</CODE> - 对话框的标题(null表示永中集成Office的统一图标)
<DT><B>返回:</B><DD>按下的按钮类型(具体见OfficeDialogConstants)注:用户按下的按钮类型:      OK,NO,CANCEL,ABORT,YES,RETRY,YESTOALL,IGNORE,CONTINUE,      END,DISABLE,ENABLE,HELP,UPDATE,UNUPDATE <p> <b>例子:</b> <pre> ...... application.util.Dialogs.showMessageDialog(dialog,"I have a message to tell you.","Hello"); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="showMessageDialog(java.awt.Frame, java.lang.String, int, java.lang.String)"><!-- --></A><H3>
showMessageDialog</H3>
<PRE>
public static int <B>showMessageDialog</B>(java.awt.Frame&nbsp;parent,
                                    java.lang.String&nbsp;prompt,
                                    int&nbsp;buttonStyle,
                                    java.lang.String&nbsp;title)</PRE>
<DL>
<DD>该方法为Dialogs提供对话框的显示。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>parent</CODE> - 对话框的容器(null表示永中集成Office的主窗体)<DD><CODE>prompt</CODE> - 对话框显示的内容<DD><CODE>buttonStyle</CODE> - 对话框的类型 (具体见OfficeDialogConstants)注:对话框的类型 由三部分组成,即 按钮类型 + 图标类型 + 默认按钮类型按钮类型:OK_ONLY,OK_CANCEL,RETRY_CANCEL,YES_NO,YES_NO_CANCEL,          YES_YESTOALL_NO_CANCEL,CONTINUE_END,DISABLE_ENABLE,          ABORT_RETRY_IGNORE,UPDATE_UNUPDATE,FIX_IGNORE图标类型:CRITICAL,QUESTION,EXCLAMATION,INFORMATION默认按钮类型:DEFAULT_BUTTON1,DEFAULT_BUTTON2,DEFAULT_BUTTON3,DEFAULT_BUTTON4<p><DD><CODE>title</CODE> - 对话框的标题(null表示永中集成Office的统一图标)
<DT><B>返回:</B><DD>按下的按钮类型(具体见OfficeDialogConstants)注:用户按下的按钮类型:      OK,NO,CANCEL,ABORT,YES,RETRY,YESTOALL,IGNORE,CONTINUE,      END,DISABLE,ENABLE,HELP,UPDATE,UNUPDATE <p> <b>例子:</b> <pre> ...... application.util.Dialogs.showMessageDialog(frame,"I have a message to tell you.",OfficeDialogConstants.OK_CANCEL        + OfficeDialogConstants.INFORMATION ,"Message title"); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="showMessageDialog(java.lang.String)"><!-- --></A><H3>
showMessageDialog</H3>
<PRE>
public static int <B>showMessageDialog</B>(java.lang.String&nbsp;prompt)</PRE>
<DL>
<DD>该方法为Dialogs提供对话框的显示。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>prompt</CODE> - 对话框显示的内容
<DT><B>返回:</B><DD>按下的按钮类型(具体见OfficeDialogConstants)注:用户按下的按钮类型:      OK,NO,CANCEL,ABORT,YES,RETRY,YESTOALL,IGNORE,CONTINUE,      END,DISABLE,ENABLE,HELP,UPDATE,UNUPDATE <p> <b>例子:</b> <pre> application.util.Dialogs.showMessageDialog("I have a message to tell you."); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="showMessageDialog(java.lang.String, int)"><!-- --></A><H3>
showMessageDialog</H3>
<PRE>
public static int <B>showMessageDialog</B>(java.lang.String&nbsp;prompt,
                                    int&nbsp;buttonStyle)</PRE>
<DL>
<DD>该方法为Dialogs提供对话框的显示。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>prompt</CODE> - 对话框显示的内容<DD><CODE>buttonStyle</CODE> - 对话框的类型 (具体见OfficeDialogConstants)注:对话框的类型 由三部分组成,即 按钮类型 + 图标类型 + 默认按钮类型按钮类型:OK_ONLY,OK_CANCEL,RETRY_CANCEL,YES_NO,YES_NO_CANCEL,          YES_YESTOALL_NO_CANCEL,CONTINUE_END,DISABLE_ENABLE,          ABORT_RETRY_IGNORE,UPDATE_UNUPDATE,FIX_IGNORE图标类型:CRITICAL,QUESTION,EXCLAMATION,INFORMATION默认按钮类型:DEFAULT_BUTTON1,DEFAULT_BUTTON2,DEFAULT_BUTTON3,DEFAULT_BUTTON4
<DT><B>返回:</B><DD>按下的按钮类型(具体见OfficeDialogConstants)注:用户按下的按钮类型:      OK,NO,CANCEL,ABORT,YES,RETRY,YESTOALL,IGNORE,CONTINUE,      END,DISABLE,ENABLE,HELP,UPDATE,UNUPDATE <p> <b>例子:</b> <pre> application.util.Dialogs.showMessageDialog("I have a message to tell you.",OfficeDialogConstants.OK_CANCEL + OfficeDialogConstants.INFORMATION ); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="showMessageDialog(java.lang.String, int, java.lang.String)"><!-- --></A><H3>
showMessageDialog</H3>
<PRE>
public static int <B>showMessageDialog</B>(java.lang.String&nbsp;prompt,
                                    int&nbsp;buttonStyle,
                                    java.lang.String&nbsp;title)</PRE>
<DL>
<DD>该方法为Dialogs提供对话框的显示。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>prompt</CODE> - 对话框显示的内容<DD><CODE>buttonStyle</CODE> - 对话框的类型 (具体见OfficeDialogConstants)注:对话框的类型 由三部分组成,即 按钮类型 + 图标类型 + 默认按钮类型按钮类型:OK_ONLY,OK_CANCEL,RETRY_CANCEL,YES_NO,YES_NO_CANCEL,          YES_YESTOALL_NO_CANCEL,CONTINUE_END,DISABLE_ENABLE,          ABORT_RETRY_IGNORE,UPDATE_UNUPDATE,FIX_IGNORE图标类型:CRITICAL,QUESTION,EXCLAMATION,INFORMATION默认按钮类型:DEFAULT_BUTTON1,DEFAULT_BUTTON2,DEFAULT_BUTTON3,DEFAULT_BUTTON4<DD><CODE>title</CODE> - 对话框的标题(null表示永中集成Office的统一图标)
<DT><B>返回:</B><DD>按下的按钮类型(具体见OfficeDialogConstants)注:用户按下的按钮类型:      OK,NO,CANCEL,ABORT,YES,RETRY,YESTOALL,IGNORE,CONTINUE,      END,DISABLE,ENABLE,HELP,UPDATE,UNUPDATE <p> <b>例子:</b> <pre> application.util.Dialogs.showMessageDialog("I have a message to tell you.",OfficeDialogConstants.OK_CANCEL        + OfficeDialogConstants.INFORMATION ,"Message title"); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="showNewDialog(java.awt.Frame, boolean)"><!-- --></A><H3>
showNewDialog</H3>
<PRE>
public static java.lang.String <B>showNewDialog</B>(java.awt.Frame&nbsp;parent,
                                             boolean&nbsp;modal)</PRE>
<DL>
<DD>提供弹出新建对话框,返回用户选择的模板文件的路径。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>parent</CODE> - 对话框的容器 ,如果为null,代表没有容器。<DD><CODE>modal</CODE> - 模态
<DT><B>返回:</B><DD>用户选择的模板文件的路径 <p> <pre> <b>例子:</b> <pre> String path = Dialogs.showNewDialog(null, true); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="showOfficeDialog(int)"><!-- --></A><H3>
showOfficeDialog</H3>
<PRE>
public static void <B>showOfficeDialog</B>(int&nbsp;type)</PRE>
<DL>
<DD>显示指定的对话框。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 传入的对话盒类型,取值如下:<br> OfficeDialogConstants.FILE_OPEN              文档打开对话框<br> OfficeDialogConstants.FILE_PAGE_SETUP        页面设置对话框<br> OfficeDialogConstants.FILE_PRINT             打印对话框<br> OfficeDialogConstants.FILE_SEND              发送对话框<br> OfficeDialogConstants.FILE_NEW               新建对话框<br> OfficeDialogConstants.FILE_PROPERTIES        属性对话框<br> OfficeDialogConstants.FILE_SAVE_AS           另存为对话框<br> OfficeDialogConstants.EDIT_FIND              查找对话框<br> OfficeDialogConstants.EDIT_REPLACE           替换对话框<br> OfficeDialogConstants.EDIT_LOCATION          定位对话框<br> OfficeDialogConstants.EDIT_RENAME            重命名对话框<br> OfficeDialogConstants.VIEW_ZOOM              显示比例对话框<br> OfficeDialogConstants.VIEW_CUSTOM_VIEWS      自定义视图对话框<br> OfficeDialogConstants.INSERT_OBJECT          插入对象对话框<br> OfficeDialogConstants.INSERT_HYPERLINK       插入超级链接对话框<br> OfficeDialogConstants.INSERT_NUMBER          插入数字样式对话框<br> OfficeDialogConstants.INSERT_PAGE_NUMBERS    插入页码对话框<br> OfficeDialogConstants.INSERT_DATE_TIME       插入日期时间对话框<br> OfficeDialogConstants.INSERT_AUTOTEXT        插入自动文集对话框<br> OfficeDialogConstants.INSERT_BOOKMARK        插入书签对话框<br> OfficeDialogConstants.INSERT_FIELD           插入域对话框<br> OfficeDialogConstants.INSERT_SYMBOL          插入符号对话框<br> OfficeDialogConstants.INSERT_DOCUMENT        插入文档对话框<br> OfficeDialogConstants.INSERT_CLIPART         插入剪贴画对话框<br> OfficeDialogConstants.INSERT_PICTURE         插入图片对话框<br> OfficeDialogConstants.FORMAT_CELL            格式化单元格属性对话框<br> OfficeDialogConstants.FORMAT_FONT            格式化字体对话框<br> OfficeDialogConstants.FORMAT_BORDER          格式化边框对话框<br> OfficeDialogConstants.FORMAT_BACKGROUND      格式化背景对话框<br> OfficeDialogConstants.FORMAT_PARAGRAPH       格式化段落对话框<br> OfficeDialogConstants.FORMAT_BULLETS_NUMBERING   格式化项目符号及编号对话框<br> OfficeDialogConstants.TOOLS_AUTOCORRECT      自动更正对话框<br> OfficeDialogConstants.TOOLS_SEAL             电子签章对话框<br> OfficeDialogConstants.TOOLS_OPTION           选项对话框<br> OfficeDialogConstants.TOOLS_TRACT_CHANGES_HIGHLIGHT  高亮显示修订对话框修订对话框<br> OfficeDialogConstants.TOOLS_TRACT_CHANGES_ACCEPT_REJECT  接受及拒绝修订对话框<br> OfficeDialogConstants.TOOLS_AUTOSUMMARIZE    自动编写摘要对话框<br> OfficeDialogConstants.TOOLS_WORD_COUNT       字数统计对话框<br>  注意:执行该方法时,当Office当前状态不能弹出指定对话盒时,抛MacroRunException异常 <p> <b>例子:</b> <pre> application.util.Dialogs.showOfficeDialog(OfficeDialogConstants.FILE_OPEN); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当Office当前状态不能弹出指定对话盒时</DL>
</DD>
</DL>
<HR>

<A NAME="showOfficeDialogForApplet(int)"><!-- --></A><H3>
showOfficeDialogForApplet</H3>
<PRE>
public static void <B>showOfficeDialogForApplet</B>(int&nbsp;type)</PRE>
<DL>
<DD>显示指定的对话框,此方法供在Applet中调用。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 传入的对话盒类型,取值如下:<br> OfficeDialogConstants.FILE_OPEN              文档打开对话框<br> OfficeDialogConstants.FILE_PAGE_SETUP        页面设置对话框<br> OfficeDialogConstants.FILE_PRINT             打印对话框<br> OfficeDialogConstants.FILE_SEND              发送对话框<br> OfficeDialogConstants.FILE_NEW               新建对话框<br> OfficeDialogConstants.FILE_PROPERTIES        属性对话框<br> OfficeDialogConstants.FILE_SAVE_AS           另存为对话框<br> OfficeDialogConstants.EDIT_FIND              查找对话框<br> OfficeDialogConstants.EDIT_REPLACE           替换对话框<br> OfficeDialogConstants.EDIT_LOCATION          定位对话框<br> OfficeDialogConstants.EDIT_RENAME            重命名对话框<br> OfficeDialogConstants.VIEW_ZOOM              显示比例对话框<br> OfficeDialogConstants.VIEW_CUSTOM_VIEWS      自定义视图对话框<br> OfficeDialogConstants.INSERT_OBJECT          插入对象对话框<br> OfficeDialogConstants.INSERT_HYPERLINK       插入超级链接对话框<br> OfficeDialogConstants.INSERT_NUMBER          插入数字样式对话框<br> OfficeDialogConstants.INSERT_PAGE_NUMBERS    插入页码对话框<br> OfficeDialogConstants.INSERT_DATE_TIME       插入日期时间对话框<br> OfficeDialogConstants.INSERT_AUTOTEXT        插入自动文集对话框<br> OfficeDialogConstants.INSERT_BOOKMARK        插入书签对话框<br> OfficeDialogConstants.INSERT_FIELD           插入域对话框<br> OfficeDialogConstants.INSERT_SYMBOL          插入符号对话框<br> OfficeDialogConstants.INSERT_DOCUMENT        插入文档对话框<br> OfficeDialogConstants.INSERT_CLIPART         插入剪贴画对话框<br> OfficeDialogConstants.INSERT_PICTURE         插入图片对话框<br> OfficeDialogConstants.FORMAT_CELL            格式化单元格属性对话框<br> OfficeDialogConstants.FORMAT_FONT            格式化字体对话框<br> OfficeDialogConstants.FORMAT_BORDER          格式化边框对话框<br> OfficeDialogConstants.FORMAT_BACKGROUND      格式化背景对话框<br> OfficeDialogConstants.FORMAT_PARAGRAPH       格式化段落对话框<br> OfficeDialogConstants.FORMAT_BULLETS_NUMBERING   格式化项目符号及编号对话框<br> OfficeDialogConstants.TOOLS_AUTOCORRECT      自动更正对话框<br> OfficeDialogConstants.TOOLS_SEAL             电子签章对话框<br> OfficeDialogConstants.TOOLS_OPTION           选项对话框<br> OfficeDialogConstants.TOOLS_TRACT_CHANGES_HIGHLIGHT  高亮显示修订对话框修订对话框<br> OfficeDialogConstants.TOOLS_TRACT_CHANGES_ACCEPT_REJECT  接受及拒绝修订对话框<br> OfficeDialogConstants.TOOLS_AUTOSUMMARIZE    自动编写摘要对话框<br> OfficeDialogConstants.TOOLS_WORD_COUNT       字数统计对话框<br>  注意:执行该方法时,当Office当前状态不能弹出指定对话盒时,抛MacroRunException异常 <p> <b>例子:</b> <pre> application.util.Dialogs.showOfficeDialogForApplet(OfficeDialogConstants.FILE_OPEN); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="showOpenDialog()"><!-- --></A><H3>
showOpenDialog</H3>
<PRE>
public static java.lang.String <B>showOpenDialog</B>()</PRE>
<DL>
<DD>此方法显示打开对话盒。
<P>
<DD><DL>

<DT><B>返回:</B><DD>String 返回打开文件的路径。         <p>         <b>例子:</b> 

⌨️ 快捷键说明

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