📄 replacement.html
字号:
</pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Replacement.html#setText(java.lang.String)"><CODE>setText(String)</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Replacement.html#clearFormat()"><CODE>clearFormat()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/FindReplace.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>FindReplace</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setFontAttribute(application.workbooks.workbook.style.font.FontAttribute)"><!-- --></A><H3>
setFontAttribute</H3>
<PRE>
public void <B>setFontAttribute</B>(<A HREF="../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类">FontAttribute</A> fontAttribute)</PRE>
<DL>
<DD>设置替换文本的字体格式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>fontAttribute</CODE> - 替换文本的字体格式 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); FindReplace finding = new FindReplace(); finding.clearFormat(); finding.setText("永中OFFICE"); finding.setFormat(true); Replacement replacement = new Replacement(); replacement.clearFormat(); replacement.setText("microsoft"); FontAttribute font = new FontAttribute(); font.setBold(true); font.setFontSize(14); replacement.setFont(font); finding.setReplacement(replacement); replacement.setFormat(true); finding.setReplacement(replacement); baseText.replace(finding); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Replacement.html#clearFormat()"><CODE>clearFormat()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类"><CODE>FontAttribute</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/FindReplace.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>FindReplace</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setHighlight(int)"><!-- --></A><H3>
setHighlight</H3>
<PRE>
public void <B>setHighlight</B>(int highlightType)</PRE>
<DL>
<DD>设置替换文本匹配时是否高亮显示匹配区域。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>highlightType</CODE> - 替换文本匹配时匹配区域的显示方式,只能取以下三种: <pre> 0 匹配区域采用非高亮显示; 1 匹配区域采用高亮显示; 2 匹配区域不考虑是否高亮显示 </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); FindReplace finding = new FindReplace(); finding.clearFormat(); finding.setText("永中OFFICE"); finding.setForward(true); Replacement replacement = new Replacement(); replacement.clearFormat(); replacement.setText("Microsoft"); replacement.setHighlight(1); replacement.setFormat(true); finding.setReplacement(replacement); baseText.replace(finding); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Replacement.html#getHighlight()"><CODE>getHighlight()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Replacement.html#clearFormat()"><CODE>clearFormat()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/FindReplace.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>FindReplace</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setParagraphAttribute(application.workbooks.workbook.style.paragraph.ParagraphAttribute)"><!-- --></A><H3>
setParagraphAttribute</H3>
<PRE>
public void <B>setParagraphAttribute</B>(<A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类">ParagraphAttribute</A> paragraphAttribute)</PRE>
<DL>
<DD>设置替换文本的段落格式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>paragraphAttribute</CODE> - 替换文本的段落格式 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); FindReplace finding = new FindReplace(); finding.clearFormat(); finding.setText("永中OFFICE"); finding.setFormat(true); Replacement replacement = new Replacement(); replacement.clearFormat(); replacement.setText("microsoft"); ParagraphAttribute paraAttribute = new ParagraphAttribute(); paraAttribute.setAlignment(ParagraphConstants.ALIGNMENT_LEFT); paraAttribute.setLeftIndent(5.0f); replacement.setParagraph(paraAttribute); finding.setReplacement(replacement); replacement.setFormat(true); finding.setReplacement(replacement); baseText.replace(finding); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Replacement.html#clearFormat()"><CODE>clearFormat()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类"><CODE>ParagraphAttribute</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/FindReplace.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>FindReplace</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setStyle(java.lang.String)"><!-- --></A><H3>
setStyle</H3>
<PRE>
public void <B>setStyle</B>(java.lang.String styleName)</PRE>
<DL>
<DD>设置替换文本的样式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>styleName</CODE> - 替换文本的样式 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); FindReplace finding = new FindReplace(); finding.clearFormat(); finding.setText("永中OFFICE"); finding.setStyle("标题 1"); finding.setFormat(true); Replacement replacement = new Replacement(); replacement.clearFormat(); replacement.setText("microsoft"); replacement.setStyle("标题 2"); replacement.setFormat(true); finding.setReplacement(replacement); baseText.replace(finding); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Replacement.html#clearFormat()"><CODE>clearFormat()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/FindReplace.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>FindReplace</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setText(java.lang.String)"><!-- --></A><H3>
setText</H3>
<PRE>
public void <B>setText</B>(java.lang.String findString)</PRE>
<DL>
<DD>设置要替换的内容。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>findString</CODE> - 需要替换的字符串 <p> <b>例子:</b> <pre> //请输入一些文字 Document doc = Application.getWorkbooks().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); FindReplace finding = new FindReplace(); finding.clearFormat(); finding.setFindWrap(1); finding.setText("永中OFFICE"); Replacement replacement = new Replacement(); replacement.clearFormat(); replacement.setText("microsoft"); finding.setReplacement(replacement); baseText.replace(finding); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Replacement.html#getText()"><CODE>getText()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Replacement.html#clearFormat()"><CODE>clearFormat()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/FindReplace.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>FindReplace</CODE></A></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/workbooks/workbook/documents/document/PenMarkManager.html" title="application.workbooks.workbook.documents.document 中的类"><B>上一个类</B></A>
<A HREF="../../../../../application/workbooks/workbook/documents/document/Revisions.html" title="application.workbooks.workbook.documents.document 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?application/workbooks/workbook/documents/document/Replacement.html" target="_top"><B>框架</B></A>
<A HREF="Replacement.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 + -