📄 section.html
字号:
<A NAME="getHeader(int)"><!-- --></A><H3>
getHeader</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/section/Header.html" title="application.workbooks.workbook.documents.document.section 中的类">Header</A> <B>getHeader</B>(int headerType)</PRE>
<DL>
<DD>返回当前章节的指定页眉。 注:页眉可分为首页不同,奇数页不同,偶数页不同三种不同的形式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>headerType</CODE> - 指定当前章节的页眉属于哪一种形式 <pre> HeaderFooterConstants.FIRST_PAGE 首页 HeaderFooterConstants.ODD 奇数页 HeaderFooterConstants.EVEN 偶数页 </pre>
<DT><B>返回:</B><DD>Header类,即当前章节的指定页眉 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); Header oddheader = section.getHeader(HeaderFooterConstants.ODD); oddheader.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); </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/Section.html#getHeader()"><CODE>getHeader()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getFooter()"><CODE>getFooter()</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/Section.html#getFooter(int)"><CODE>getFooter(int)</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/documents/document/section/Header.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>Header</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getPageNumbers()"><!-- --></A><H3>
getPageNumbers</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/section/PageNumbers.html" title="application.workbooks.workbook.documents.document.section 中的类">PageNumbers</A> <B>getPageNumbers</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); PageNumbers pageNumbers = section.getPageNumbers(); pageNumbers.addPageNumber(PageNumbersConstants.POSITION_HEADER, PageNumbersConstants.ALIGNMENT_CENTER); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getPageSetup()"><!-- --></A><H3>
getPageSetup</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/document/WpPageSetup.html" title="application.workbooks.workbook.documents.document 中的类">WpPageSetup</A> <B>getPageSetup</B>()</PRE>
<DL>
<DD>得到当前章节的页面设置属性集。
<P>
<DD><DL>
<DT><B>返回:</B><DD>WpPageSetup类,即前章节的页面设置属性集 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); WpPageSetup pageSetup = section.getPageSetup(); pageSetup.setPageHeight(500.0f); pageSetup.setPageWidth(500.0f); section.setPageSetup(pageSetup); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/documents/document/WpPageSetup.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>WpPageSetup</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getParent()"><!-- --></A><H3>
getParent</H3>
<PRE>
public <A HREF="../../../../../application/workbooks/workbook/documents/Document.html" title="application.workbooks.workbook.documents 中的类">Document</A> <B>getParent</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.getParent(); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="setBorderAttribute(application.workbooks.workbook.style.border.BorderAttribute)"><!-- --></A><H3>
setBorderAttribute</H3>
<PRE>
public void <B>setBorderAttribute</B>(<A HREF="../../../../../application/workbooks/workbook/style/border/BorderAttribute.html" title="application.workbooks.workbook.style.border 中的类">BorderAttribute</A> borderAttribute)</PRE>
<DL>
<DD>为整个章节设置一个边框。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>borderAttribute</CODE> - 所设置的边框属性 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); doc.insertBreak(0, BreakConstants.BREAK_SECTION_NEXTPAGE); Section section = doc.getSection(1); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test!\nthis is a test!\nthis is a test!"); BorderAttribute borderAttr = doc.getBorderAttribute(); borderAttr.setBorderType(BorderAndShadingConstants.BORDERTYPE_SHADOW); borderAttr.setBorderLineType(BorderAndShadingConstants.TOP, 1); borderAttr.setBorderLineType(BorderAndShadingConstants.LEFT, 3); borderAttr.setBorderLineType(BorderAndShadingConstants.RIGHT, 6); borderAttr.setBorderLineType(BorderAndShadingConstants.BOTTOM, 8); borderAttr.setBorderLineColor(BorderAndShadingConstants.TOP, Color.RED); borderAttr.setBorderLineColor(BorderAndShadingConstants.LEFT, Color.CYAN); borderAttr.setBorderLineColor(BorderAndShadingConstants.RIGHT, Color.YELLOW); borderAttr.setBorderLineColor(BorderAndShadingConstants.BOTTOM, Color.ORANGE); borderAttr.setBorderLineWidth(BorderAndShadingConstants.TOP, 8f); borderAttr.setBorderLineWidth(BorderAndShadingConstants.LEFT, 5f); borderAttr.setBorderLineWidth(BorderAndShadingConstants.RIGHT, 3f); borderAttr.setBorderLineWidth(BorderAndShadingConstants.BOTTOM, 1f); section.setBorderAttribute(borderAttr); </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.html" title="application.workbooks.workbook.documents 中的类"><CODE>Document</CODE></A>,
<A HREF="../../../../../application/workbooks/workbook/style/border/BorderAttribute.html" title="application.workbooks.workbook.style.border 中的类"><CODE>BorderAttribute</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setColumn(application.workbooks.workbook.documents.document.Column)"><!-- --></A><H3>
setColumn</H3>
<PRE>
public void <B>setColumn</B>(<A HREF="../../../../../application/workbooks/workbook/documents/document/Column.html" title="application.workbooks.workbook.documents.document 中的类">Column</A> column)</PRE>
<DL>
<DD>设置当前节的分栏属性
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>column</CODE> - 分栏对象 <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!"); Column column = section.getColumn(); column.setCount(3); column.setEqualsWidth(false); column.setWidth(0, 100.0f); column.setWidth(1, 200.0f); column.setWidth(2, 100.0f); section.setColumn(column); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当节中存在保护区域
<DD><CODE><A HREF="../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当前节处于保护状态</DL>
</DD>
</DL>
<HR>
<A NAME="setPageSetup(application.workbooks.workbook.documents.document.WpPageSetup)"><!-- --></A><H3>
setPageSetup</H3>
<PRE>
public void <B>setPageSetup</B>(<A HREF="../../../../../application/workbooks/workbook/documents/document/WpPageSetup.html" title="application.workbooks.workbook.documents.document 中的类">WpPageSetup</A> pageSetup)</PRE>
<DL>
<DD>设置章节的页面设置属性集
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>pageSetup</CODE> - 页面设置属性集 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); WpPageSetup pageSetup = section.getPageSetup(); pageSetup.setPageHeight(500.0f); pageSetup.setPageWidth(500.0f); section.setPageSetup(pageSetup); </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/Revisions.html" title="application.workbooks.workbook.documents.document 中的类"><B>上一个类</B></A>
<A HREF="../../../../../application/workbooks/workbook/documents/document/Styles.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/Section.html" target="_top"><B>框架</B></A>
<A HREF="Section.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 + -