📄 tabstops.html
字号:
tabStop.setLeader(TabStopConstants.DASHES); tabStop.setPosition(1.5f,UnitConstants.CENTIMETER); tabStops.addTabStop(tabStop); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html" title="application.workbooks.workbook.documents.document.tabstops 中的类"><CODE>TabStop</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="clearAllTabStops()"><!-- --></A><H3>
clearAllTabStops</H3>
<PRE>
public void <B>clearAllTabStops</B>()</PRE>
<DL>
<DD>删除所有制表位。 <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!"); TabStops tabStops = baseText.getParagraphs().getParagraph(1).getTabStops(); TabStop tabStop =new TabStop(); tabStop.setAlignment(TabStopConstants.ALIGNMENT_RIGHT); tabStop.setLeader(TabStopConstants.DASHES); tabStop.setPosition(1.5f,UnitConstants.CENTIMETER); tabStops.addTabStop(tabStop); tabStops.clearAllTabStops(); </pre>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getAllTabStops()"><!-- --></A><H3>
getAllTabStops</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html" title="application.workbooks.workbook.documents.document.tabstops 中的类">TabStop</A>[] <B>getAllTabStops</B>()</PRE>
<DL>
<DD>在指定段落得到制表位数组。
<P>
<DD><DL>
<DT><B>返回:</B><DD>制表位数组 <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!"); TabStops tabStops = baseText.getParagraphs().getParagraph(1).getTabStops(); TabStop tabStop =new TabStop(); tabStop.setAlignment(TabStopConstants.ALIGNMENT_RIGHT); tabStop.setLeader(TabStopConstants.DASHES); tabStop.setPosition(1.5f,UnitConstants.CENTIMETER); tabStops.addTabStop(tabStop); System.out.println(tabStops.getAllTabStops().length()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html" title="application.workbooks.workbook.documents.document.tabstops 中的类"><CODE>TabStop</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getDefaultTabStop()"><!-- --></A><H3>
getDefaultTabStop</H3>
<PRE>
public float <B>getDefaultTabStop</B>()</PRE>
<DL>
<DD>得到默认制表位位置大小(默认单位是磅)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>默认制表位的大小,范围为-1584到1584磅之间 说明:get方法默认返回为磅值,如果要用其他的度量单位(英寸、厘米、毫米、十二点活字),可以用 application.util.Utilities.pointToOther(double, int)方法将返回的磅值转换为其他度量单位。 <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!"); TabStops tabStops = baseText.getParagraphs().getParagraph(1).getTabStops(); tabStops.setDefaultTabStop(1.5f); TabStops tabStops = baseText.getParagraphs().getParagraph(1).getTabStops(); System.out.println(tabStops.getDefaultTabStop()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getTabStop(int)"><!-- --></A><H3>
getTabStop</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html" title="application.workbooks.workbook.documents.document.tabstops 中的类">TabStop</A> <B>getTabStop</B>(int tabStopIndex)</PRE>
<DL>
<DD>得到指定的制表位。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>tabStopIndex</CODE> - 制表位索引号
<DT><B>返回:</B><DD>制表位 <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!"); TabStops tabStops = baseText.getParagraphs().getParagraph(1).getTabStops(); TabStop tabStop =new TabStop(); tabStop.setAlignment(TabStopConstants.ALIGNMENT_RIGHT); tabStop.setLeader(TabStopConstants.DASHES); tabStop.setPosition(1.5f,UnitConstants.CENTIMETER); tabStops.addTabStop(tabStop); System.out.println(tabStops.getTabStop(0)); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html" title="application.workbooks.workbook.documents.document.tabstops 中的类"><CODE>TabStop</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setDefaultTabStop(float)"><!-- --></A><H3>
setDefaultTabStop</H3>
<PRE>
public void <B>setDefaultTabStop</B>(float value)</PRE>
<DL>
<DD>设置默认制表位位置大小(默认单位是磅)。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>value</CODE> - 需要设置默认制表位的大小,范围为-1584到1584磅之间 说明:set方法的参数默认取磅值,如果要用其他的度量单位(英寸、厘米、毫米、十二点活字), 可以用 application.util.Utilities.otherToPoint(double, int)方法将其他度量单位转换为磅值后再调用相应的设置方法。 <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!"); TabStops tabStops = baseText.getParagraphs().getParagraph(1).getTabStops(); tabStops.setDefaultTabStop(1.5f); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当默认制表位位置大小超出指定范围</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/TableOfContent.html" title="application.workbooks.workbook.documents.document 中的类"><B>上一个类</B></A>
<A HREF="../../../../../application/workbooks/workbook/documents/document/TextRange.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/TabStops.html" target="_top"><B>框架</B></A>
<A HREF="TabStops.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 + -