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

📄 macro.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0) on Fri Feb 29 09:23:21 CST 2008 -->
<META http-equiv="Content-Type" content="text/html; charset=GB2312">
<TITLE>
Macro (永中集成Office二次开发API文档)
</TITLE>

<META NAME="date" CONTENT="2008-02-29">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Macro (永中集成Office二次开发API文档)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="跳过导航链接"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>类</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</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;上一个类&nbsp;
&nbsp;下一个类</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?application/util/Macro.html" target="_top"><B>框架</B></A>  &nbsp;
&nbsp;<A HREF="Macro.html" target="_top"><B>无框架</B></A>  &nbsp;
&nbsp;<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">
  摘要:&nbsp;嵌套&nbsp;|&nbsp;字段&nbsp;|&nbsp;<A HREF="#constructor_summary">构造方法</A>&nbsp;|&nbsp;<A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息:&nbsp;字段&nbsp;|&nbsp;<A HREF="#constructor_detail">构造方法</A>&nbsp;|&nbsp;<A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
application.util</FONT>
<BR>
类 Macro</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../resources/inherit.gif" ALT="继承者 "><B>application.util.Macro</B>
</PRE>
<DL>
<DT><B>所有已实现的接口:</B> <DD><A HREF="../../application/constants/MacroConstants.html" title="application.constants 中的接口">MacroConstants</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>Macro</B><DT>extends java.lang.Object<DT>implements <A HREF="../../application/constants/MacroConstants.html" title="application.constants 中的接口">MacroConstants</A></DL>
</PRE>

<P>
该类实现了一些工具方法,其中包括工具对话框(字体对话框,颜色对话框,打开保存对话框), 系统对话框,错误对话框等。 <p> <p>
<P>

<P>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>字段摘要</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_application.constants.MacroConstants"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>从接口 application.constants.<A HREF="../../application/constants/MacroConstants.html" title="application.constants 中的接口">MacroConstants</A> 继承的字段</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../application/constants/MacroConstants.html#ABORT">ABORT</A>, <A HREF="../../application/constants/MacroConstants.html#ABORT_RETRY_IGNORE">ABORT_RETRY_IGNORE</A>, <A HREF="../../application/constants/MacroConstants.html#CANCEL">CANCEL</A>, <A HREF="../../application/constants/MacroConstants.html#CONTINUE">CONTINUE</A>, <A HREF="../../application/constants/MacroConstants.html#CONTINUE_END">CONTINUE_END</A>, <A HREF="../../application/constants/MacroConstants.html#CRITICAL">CRITICAL</A>, <A HREF="../../application/constants/MacroConstants.html#DEFAULT_BUTTON1">DEFAULT_BUTTON1</A>, <A HREF="../../application/constants/MacroConstants.html#DEFAULT_BUTTON2">DEFAULT_BUTTON2</A>, <A HREF="../../application/constants/MacroConstants.html#DEFAULT_BUTTON3">DEFAULT_BUTTON3</A>, <A HREF="../../application/constants/MacroConstants.html#DEFAULT_BUTTON4">DEFAULT_BUTTON4</A>, <A HREF="../../application/constants/MacroConstants.html#DISABLE">DISABLE</A>, <A HREF="../../application/constants/MacroConstants.html#DISABLE_ENABLE">DISABLE_ENABLE</A>, <A HREF="../../application/constants/MacroConstants.html#EIO">EIO</A>, <A HREF="../../application/constants/MacroConstants.html#ENABLE">ENABLE</A>, <A HREF="../../application/constants/MacroConstants.html#END">END</A>, <A HREF="../../application/constants/MacroConstants.html#EXCEL">EXCEL</A>, <A HREF="../../application/constants/MacroConstants.html#EXCLAMATION">EXCLAMATION</A>, <A HREF="../../application/constants/MacroConstants.html#FIX_IGNORE">FIX_IGNORE</A>, <A HREF="../../application/constants/MacroConstants.html#HELP">HELP</A>, <A HREF="../../application/constants/MacroConstants.html#IGNORE">IGNORE</A>, <A HREF="../../application/constants/MacroConstants.html#INFORMATION">INFORMATION</A>, <A HREF="../../application/constants/MacroConstants.html#NO">NO</A>, <A HREF="../../application/constants/MacroConstants.html#OK">OK</A>, <A HREF="../../application/constants/MacroConstants.html#OK_CANCEL">OK_CANCEL</A>, <A HREF="../../application/constants/MacroConstants.html#OK_ONLY">OK_ONLY</A>, <A HREF="../../application/constants/MacroConstants.html#POWERPOINT">POWERPOINT</A>, <A HREF="../../application/constants/MacroConstants.html#QUESTION">QUESTION</A>, <A HREF="../../application/constants/MacroConstants.html#RETRY">RETRY</A>, <A HREF="../../application/constants/MacroConstants.html#RETRY_CANCEL">RETRY_CANCEL</A>, <A HREF="../../application/constants/MacroConstants.html#UNUPDATE">UNUPDATE</A>, <A HREF="../../application/constants/MacroConstants.html#UPDATE">UPDATE</A>, <A HREF="../../application/constants/MacroConstants.html#UPDATE_UNUPDATE">UPDATE_UNUPDATE</A>, <A HREF="../../application/constants/MacroConstants.html#WORD">WORD</A>, <A HREF="../../application/constants/MacroConstants.html#YES">YES</A>, <A HREF="../../application/constants/MacroConstants.html#YES_NO">YES_NO</A>, <A HREF="../../application/constants/MacroConstants.html#YES_NO_CANCEL">YES_NO_CANCEL</A>, <A HREF="../../application/constants/MacroConstants.html#YES_YESTOALL_NO_CANCEL">YES_YESTOALL_NO_CANCEL</A>, <A HREF="../../application/constants/MacroConstants.html#YESTOALL">YESTOALL</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>构造方法摘要</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../application/util/Macro.html#Macro()">Macro</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>方法摘要</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../application/util/Macro.html#analyze(byte[])">analyze</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;不启动永中集成office,读取eio数据源里面的文字内容。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../application/util/Macro.html#analyze(java.lang.String)">analyze</A></B>(java.lang.String&nbsp;fileName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;读取正文里面的文字内容。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../application/util/Macro.html#get(java.lang.String)">get</A></B>(java.lang.String&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回全局对象。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../application/util/Macro.html#invokeLater(java.lang.Runnable)">invokeLater</A></B>(java.lang.Runnable&nbsp;runnable)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;此方法相当于javax.swing.SwingUtilities.invokeLater (Runnable doRun)方法的功能;用于在事件派发线程中调用另一个线程doRun中的run()方法操作。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../application/util/Macro.html#remove(java.lang.String)">remove</A></B>(java.lang.String&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;清除某一全局对象。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../application/util/Macro.html#removeAllUserObjects()">removeAllUserObjects</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;清除所有全局对象。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../application/util/Macro.html#run(java.lang.String)">run</A></B>(java.lang.String&nbsp;macroName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;该方法为Macro提供运行用户窗体或运行用户窗体和类模块中的方法。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../application/util/Macro.html#runForm(java.lang.Object, java.lang.String)">runForm</A></B>(java.lang.Object&nbsp;parent,
        java.lang.String&nbsp;formName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;该方法为Macro提供运行用户窗体或运行用户窗体和类模块中的方法。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../application/util/Macro.html#runForm(java.lang.String)">runForm</A></B>(java.lang.String&nbsp;formName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;该方法为Macro提供运行用户窗体或运行用户窗体和类模块中的方法。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../application/util/Macro.html#set(java.lang.String, java.lang.Object)">set</A></B>(java.lang.String&nbsp;key,
    java.lang.Object&nbsp;obj)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;增加全局对象。</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>从类 java.lang.Object 继承的方法</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, 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>构造方法详细信息</B></FONT></TH>
</TR>
</TABLE>

<A NAME="Macro()"><!-- --></A><H3>
Macro</H3>
<PRE>
public <B>Macro</B>()</PRE>
<DL>
</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>方法详细信息</B></FONT></TH>
</TR>
</TABLE>

<A NAME="analyze(byte[])"><!-- --></A><H3>
analyze</H3>
<PRE>
public static java.lang.String <B>analyze</B>(byte[]&nbsp;data)
                                throws java.io.IOException</PRE>
<DL>
<DD>不启动永中集成office,读取eio数据源里面的文字内容。
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>参数:</B><DD><CODE>data</CODE> - 以byte数组表示的eio数据源
<DT><B>返回:</B><DD>String eio文档中的文字内容,如果所传文档格式不是eio,则返回null。
<DT><B>抛出:</B>

⌨️ 快捷键说明

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