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

📄 tableattribute.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setAdjustableSpacing(float)">setAdjustableSpacing</A></B>(float&nbsp;spacing)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setAlignment(int)">setAlignment</A></B>(int&nbsp;tableAlign)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setAllowAutoFit(boolean)">setAllowAutoFit</A></B>(boolean&nbsp;autofit)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setAllowOverlap(boolean)">setAllowOverlap</A></B>(boolean&nbsp;overlap)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setBottomDistance(float)">setBottomDistance</A></B>(float&nbsp;bottomDistance)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setDefaultCellBottomMargin(float)">setDefaultCellBottomMargin</A></B>(float&nbsp;margin)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setDefaultCellLeftMargin(float)">setDefaultCellLeftMargin</A></B>(float&nbsp;margin)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setDefaultCellRightMargin(float)">setDefaultCellRightMargin</A></B>(float&nbsp;margin)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setDefaultCellTopMargin(float)">setDefaultCellTopMargin</A></B>(float&nbsp;margin)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setHorizontalPosition(int)">setHorizontalPosition</A></B>(int&nbsp;position)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setHorizontalRelative(int)">setHorizontalRelative</A></B>(int&nbsp;relativePosition)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setLeftDistance(float)">setLeftDistance</A></B>(float&nbsp;leftDistance)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setLeftIndent(float)">setLeftIndent</A></B>(float&nbsp;leftIndent)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setPreferredWidth(float)">setPreferredWidth</A></B>(float&nbsp;width)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setPreferredWidthMeasure(int)">setPreferredWidthMeasure</A></B>(int&nbsp;widthType)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setRightDistance(float)">setRightDistance</A></B>(float&nbsp;rightDistance)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setTopDistance(float)">setTopDistance</A></B>(float&nbsp;topDistance)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setVerticalPosition(int)">setVerticalPosition</A></B>(int&nbsp;position)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setVerticalRelative(int)">setVerticalRelative</A></B>(int&nbsp;relativePosition)</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setWrapAroundText(boolean)">setWrapAroundText</A></B>(boolean&nbsp;around)</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>

<!-- ============ 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="getAdjustableSpacing()"><!-- --></A><H3>
getAdjustableSpacing</H3>
<PRE>
public float <B>getAdjustableSpacing</B>()</PRE>
<DL>
<DD>得到表格的默认单元格间距。说明:当默认单元格间距不允许被调整时,返回默认值0。
<P>
<DD><DL>

<DT><B>返回:</B><DD>默认单元格间距(单位取磅值) <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); System.out.println("表格默认的单元格间距为:" + tableAttribute.getAdjustableSpacing()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setAdjustableSpacing(float)"><CODE>setAdjustableSpacing(float)</CODE></A>, 
<A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#isAllowAdjustSpacing()"><CODE>isAllowAdjustSpacing()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getAlignment()"><!-- --></A><H3>
getAlignment</H3>
<PRE>
public int <B>getAlignment</B>()</PRE>
<DL>
<DD>获得表格的对齐方式。
<P>
<DD><DL>

<DT><B>返回:</B><DD>表格的对齐方式,只能取以下整型值之一: <pre> TableConstants.TABLE_LEFT   = 0     左对齐 TableConstants.TABLE_CENTER = 1     居中对齐   TableConstants.TABLE_RIGHT  = 2     右对齐 </pre>                 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); System.out.println("表格的对齐方式为:" + tableAttribute.getAlignment()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setAlignment(int)"><CODE>setAlignment(int)</CODE></A>, 
<A HREF="../../../../application/constants/TableConstants.html" title="application.constants 中的接口"><CODE>TableConstants</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getBottomDistance()"><!-- --></A><H3>
getBottomDistance</H3>
<PRE>
public float <B>getBottomDistance</B>()</PRE>
<DL>
<DD>得到正文文本与表格之间的下边距。 说明:如果表格文字环绕方式为无,则返回默认值0。
<P>
<DD><DL>

<DT><B>返回:</B><DD>float  表格距正文下的间距 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); System.out.println("正文文本与表格之间的下边距为:"+ tableAttribute.getBottomDistance()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../application/workbooks/workbook/tables/TableAttribute.html#setBottomDistance(float)"><CODE>setBottomDistance(float)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getDefaultCellBottomMargin()"><!-- --></A><H3>
getDefaultCellBottomMargin</H3>
<PRE>
public float <B>getDefaultCellBottomMargin</B>()</PRE>
<DL>
<DD>得到表格默认的单元格下边距。说明:边距的范围为0~1584磅。
<P>
<DD><DL>

<DT><B>返回:</B><DD>默认单元格下边距(单位为磅值) <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); TextRange range = doc.getRange(0); Tables tables = doc.getTables(); Table table = tables.addTable(range, 5, 5); TableAttribute tableAttribute = table.getTableAttribute(); System.out.println("表格默认的单元格下边距为:" + tableAttribute.getDefaultCellBottomMargin());

⌨️ 快捷键说明

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