📄 tabstop.html
字号:
<!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:15 CST 2008 -->
<META http-equiv="Content-Type" content="text/html; charset=GB2312">
<TITLE>
TabStop (永中集成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="TabStop (永中集成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> </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">
上一个类
下一个类</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?application/workbooks/workbook/documents/document/tabstops/TabStop.html" target="_top"><B>框架</B></A>
<A HREF="TabStop.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_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
application.workbooks.workbook.documents.document.tabstops</FONT>
<BR>
类 TabStop</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../../resources/inherit.gif" ALT="继承者 "><B>application.workbooks.workbook.documents.document.tabstops.TabStop</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>TabStop</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
制表位 <p> <p>
<P>
<P>
<HR>
<P>
<!-- ======== 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/workbooks/workbook/documents/document/tabstops/TabStop.html#TabStop()">TabStop</A></B>()</CODE>
<BR>
默认构造器</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html#TabStop(float, int, int)">TabStop</A></B>(float position,
int alignment,
int leader)</CODE>
<BR>
制表位构造器。</TD>
</TR>
</TABLE>
<!-- ========== 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> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html#getAlignment()">getAlignment</A></B>()</CODE>
<BR>
获得对齐方式。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html#getLeader()">getLeader</A></B>()</CODE>
<BR>
返回前导符索引。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html#getPosition()">getPosition</A></B>()</CODE>
<BR>
返回制表位的位置大小(以磅为单位)。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html#getPositionOfChar()">getPositionOfChar</A></B>()</CODE>
<BR>
返回制表位的位置大小(以字符为单位)。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html#setAlignment(int)">setAlignment</A></B>(int alignment)</CODE>
<BR>
设置制表位的对齐方式。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html#setLeader(int)">setLeader</A></B>(int leader)</CODE>
<BR>
设置制表位的前导符索引。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html#setPosition(float)">setPosition</A></B>(float position)</CODE>
<BR>
设置制表位的位置,默认以磅为单位。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/tabstops/TabStop.html#setPositionOfChar(float)">setPositionOfChar</A></B>(float position)</CODE>
<BR>
设置制表位的位置,以字符为单位。</TD>
</TR>
</TABLE>
<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>
<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="TabStop()"><!-- --></A><H3>
TabStop</H3>
<PRE>
public <B>TabStop</B>()</PRE>
<DL>
<DD>默认构造器
<P>
</DL>
<HR>
<A NAME="TabStop(float, int, int)"><!-- --></A><H3>
TabStop</H3>
<PRE>
public <B>TabStop</B>(float position,
int alignment,
int leader)</PRE>
<DL>
<DD>制表位构造器。
<P>
<DL>
<DT><B>参数:</B><DD><CODE>position</CODE> - 制表位位置(默认取磅值) 说明:set方法的参数默认取磅值,如果要用其他的度量单位(英寸、厘米、毫米、十二点活字), 可以用 application.util.Utilities.otherToPoint(double, int)方法将其他度量单位转换为磅值后再调用相应的设置方法。<DD><CODE>alignment</CODE> - 对齐方式<DD><CODE>leader</CODE> - 前导符索引</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="getAlignment()"><!-- --></A><H3>
getAlignment</H3>
<PRE>
public int <B>getAlignment</B>()</PRE>
<DL>
<DD>获得对齐方式。
<P>
<DD><DL>
<DT><B>返回:</B><DD>对齐方式的类型 <pre> TabStopConstants.ALIGNMENT_LEFT 左对齐 TabStopConstants.ALIGNMENT_RIGHT 右对齐 TabStopConstants.ALIGNMENT_CENTER 居中 TabStopConstants.ALIGNMENT_DOT 小数点对齐 TabStopConstants.ALIGNMENT_PERPENDICULAR 竖线对齐 </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!\nthis is a test!"); TabStops tabStops = baseText.getParagraphs().getParagraph(0).getTabStops(); TabStop tabStop = new TabStop(); tabStop.setAlignment(TabStopConstants.ALIGNMENT_RIGHT); tabStop.setLeader(TabStopConstants.DASHES); tabStop.setPosition(3.0f,UnitConstants.CENTIMETER); tabStops.addTabStop(tabStop); TabStop tabStop2 = tabStops.getTabStop(0); System.out.println("获得制表位的对齐方式是:"+tabStop2.getAlignment()); </pre></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -