📄 index.html
字号:
baseText.insertText(0,"this is a test!\nthis is a test!"); IndexEntry entry= baseText.getIndexEntry(2,4); entry.setMainEntry("索引项1"); baseText.markIndexEntry(entry); Index index = baseText.getIndex(2,4); baseText.insertIndex(0,index); System.out.println("当前索引的制表位的前导符为:"+index.getTabLeader()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getType()"><!-- --></A><H3>
getType</H3>
<PRE>
public int <B>getType</B>()</PRE>
<DL>
<DD>获取索引的类型 (缩进式、接排式)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>索引的类型。0表示缩进式,1表示接排式 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!"); IndexEntry entry= baseText.getIndexEntry(2,4); entry.setMainEntry("索引项1"); baseText.markIndexEntry(entry); Index index = baseText.getIndex(2,4); baseText.insertIndex(0,index); System.out.println("当前索引的类型为:"+index.getType()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Index.html#setType(int)"><CODE>setType(int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isRight()"><!-- --></A><H3>
isRight</H3>
<PRE>
public boolean <B>isRight</B>()</PRE>
<DL>
<DD>判断页码是否右对齐。
<P>
<DD><DL>
<DT><B>返回:</B><DD>布尔型值,是否右对齐。如果右对齐,则返回true;否则,返回false <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!"); IndexEntry entry= baseText.getIndexEntry(2,4); entry.setMainEntry("索引项1"); baseText.markIndexEntry(entry); Index index = baseText.getIndex(2,4); baseText.insertIndex(0,index); System.out.println("当前索引是否设置页码右对齐:"+index.isRight()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="setColumns(int)"><!-- --></A><H3>
setColumns</H3>
<PRE>
public void <B>setColumns</B>(int columns)</PRE>
<DL>
<DD>设置索引中每页的栏数。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>columns</CODE> - 索引中每页的栏数。取值范围为:0 ~ 4。 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!"); IndexEntry entry= baseText.getIndexEntry(2,4); entry.setMainEntry("索引项1"); baseText.markIndexEntry(entry); Index index = baseText.getIndex(2,4); index.setColumns(2); baseText.insertIndex(0,index); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 参数越界<DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Index.html#setType(int)"><CODE>setType(int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setFormat(int)"><!-- --></A><H3>
setFormat</H3>
<PRE>
public void <B>setFormat</B>(int format)</PRE>
<DL>
<DD>设置索引的风格。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>format</CODE> - 索引的风格索引号 <pre> IndexAndTableConstants.FORMAT_TEMPLATE 索引的风格 来自模板 IndexAndTableConstants.FORMAT_CLASSIC 索引的风格 古典 IndexAndTableConstants.FORMAT_DISTINCTIVE 索引的风格 项目符号 IndexAndTableConstants.FORMAT_FANCY 索引的风格 流行 IndexAndTableConstants.FORMAT_MORDERN 索引的风格 现代 IndexAndTableConstants.FORMAT_FORMAL 索引的风格 正式 IndexAndTableConstants.FORMAT_SIMPLE 索引的风格 简单 </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!"); IndexEntry entry= baseText.getIndexEntry(2,4); entry.setMainEntry("索引项1"); baseText.markIndexEntry(entry); Index index = baseText.getIndex(2,4); index.setFormat(IndexAndTableConstants.FORMAT_CLASSIC); baseText.insertIndex(0,index); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当常量不存在<DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Index.html#getFormat()"><CODE>getFormat()</CODE></A>,
<A HREF="../../../../../application/constants/IndexAndTableConstants.html" title="application.constants 中的接口"><CODE>IndexAndTableConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setRight(boolean)"><!-- --></A><H3>
setRight</H3>
<PRE>
public void <B>setRight</B>(boolean right)</PRE>
<DL>
<DD>设置页码是否右对齐。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>right</CODE> - 布尔型值,是否右对齐。如果为true,表示右对齐;如果为false,表示不是右对齐 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!"); IndexEntry entry= baseText.getIndexEntry(2,4); entry.setMainEntry("索引项1"); baseText.markIndexEntry(entry); Index index = baseText.getIndex(2,4); index.setRight(true); baseText.insertIndex(0,index); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="setTabLeader(int)"><!-- --></A><H3>
setTabLeader</H3>
<PRE>
public void <B>setTabLeader</B>(int type)</PRE>
<DL>
<DD>设置制表位的前导符。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 制表位的前导符的类型 <pre> IndexAndTableConstants.SPACES 制表位前导符 无 IndexAndTableConstants.DOTS 制表位前导符 ... IndexAndTableConstants.DASHES 制表位前导符 ---- IndexAndTableConstants.LINES 制表位前导符 ___ IndexAndTableConstants.MIDDLEDOTS 制表位前导符 ...(点居中) </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!"); IndexEntry entry= baseText.getIndexEntry(2,4); entry.setMainEntry("索引项1"); baseText.markIndexEntry(entry); Index index = baseText.getIndex(2,4); index.setRight(true); index.setTabLeader(IndexAndTableConstants.MIDDLEDOTS); baseText.insertIndex(0,index); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当常量不存在<DT><B>另请参见:</B><DD><A HREF="../../../../../application/constants/IndexAndTableConstants.html" title="application.constants 中的接口"><CODE>IndexAndTableConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setType(int)"><!-- --></A><H3>
setType</H3>
<PRE>
public void <B>setType</B>(int type)</PRE>
<DL>
<DD>设置索引的类型 (缩进式、接排式)。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 显示类型 <pre> IndexAndTableConstants.INDENTED 索引的类型 缩进式 IndexAndTableConstants.RUNIN 索引的类型 接排式 </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!"); IndexEntry entry= baseText.getIndexEntry(2,4); entry.setMainEntry("索引项1"); baseText.markIndexEntry(entry); Index index = baseText.getIndex(2,4); index.setType(IndexAndTableConstants.INDENTED); baseText.insertIndex(0,index); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当常量不存在<DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/Index.html#getType()"><CODE>getType()</CODE></A>,
<A HREF="../../../../../application/constants/IndexAndTableConstants.html" title="application.constants 中的接口"><CODE>IndexAndTableConstants</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/GridSettings.html" title="application.workbooks.workbook.documents.document 中的类"><B>上一个类</B></A>
<A HREF="../../../../../application/workbooks/workbook/documents/document/IndexEntry.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/Index.html" target="_top"><B>框架</B></A>
<A HREF="Index.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="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息: 字段 | 构造方法 | <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 + -