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

📄 style.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<HR>

<A NAME="removeAllTabStops()"><!-- --></A><H3>
removeAllTabStops</H3>
<PRE>
public void <B>removeAllTabStops</B>()</PRE>
<DL>
<DD>删除样式中的所有制表位。 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); TabStop tabStop = new TabStop(1.5f,UnitConstants.CENTIMETER,TabStopConstants.RIGHT,TabStopConstants.DOTS); style.addTabStop(tabStop); style.removeAllTabStops(); </pre>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="removeTabStop(int)"><!-- --></A><H3>
removeTabStop</H3>
<PRE>
public void <B>removeTabStop</B>(int&nbsp;index)</PRE>
<DL>
<DD>删除样式中的指定制表位。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>index</CODE> - 制表位的索引号 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); TabStop tabStop = new TabStop(1.5f,UnitConstants.CENTIMETER,TabStopConstants.RIGHT,TabStopConstants.DOTS); TabStop tabStop2 = new TabStop(2.5f,UnitConstants.CENTIMETER,TabStopConstants.RIGHT,TabStopConstants.DOTS); style.addTabStop(tabStop); style.addTabStop(tabStop2); style.removeTabStop(0); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数index越界时</DL>
</DD>
</DL>
<HR>

<A NAME="setAutoUpdate(boolean)"><!-- --></A><H3>
setAutoUpdate</H3>
<PRE>
public void <B>setAutoUpdate</B>(boolean&nbsp;auto)</PRE>
<DL>
<DD>设置样式自动更新。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>auto</CODE> - 布尔型值,是否自动更新样式。如果为true,则自动更新;否则,不自动更新 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); style.setAutoUpdate(true); System.out.println(style.isAutoUpdate()); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="setBaseStyle(java.lang.String)"><!-- --></A><H3>
setBaseStyle</H3>
<PRE>
public void <B>setBaseStyle</B>(java.lang.String&nbsp;baseStyleName)</PRE>
<DL>
<DD>设置基准样式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>baseStyleName</CODE> - 基准样式名字 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); style.setBaseStyle("标题 2");  System.out.println(style.getBaseStyleName()); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数baseStyleName为null或者空字符串时</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>&nbsp;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(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); BorderAttribute borderAttr = new BorderAttribute(); borderAttr.setBordersApplyType(BorderAndShadingConstants.APPLY_PARAGRAPH); borderAttr.setBorderType(BorderAndShadingConstants.BORDERTYPE_SHADOW); borderAttr.setBorderLineType(BorderAndShadingConstants.LEFT,0); borderAttr.setBorderLineWidth(BorderAndShadingConstants.LEFT,0.5f); borderAttr.setBorderLineType(BorderAndShadingConstants.TOP,0); borderAttr.setBorderLineWidth(BorderAndShadingConstants.TOP,1.5f); borderAttr.setBorderLineType(BorderAndShadingConstants.RIGHT,0); borderAttr.setBorderLineWidth(BorderAndShadingConstants.RIGHT,2.5f); borderAttr.setBorderLineType(BorderAndShadingConstants.BOTTOM,0); borderAttr.setBorderLineWidth(BorderAndShadingConstants.BOTTOM,3.5f); style.setBorderAttribute(borderAttr); System.out.println(styles.getStyle("new style").getBorderAttribute().getBorderType()); </pre><DT><B>另请参见:</B><DD><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="setFontAttribute(application.workbooks.workbook.style.font.FontAttribute)"><!-- --></A><H3>
setFontAttribute</H3>
<PRE>
public void <B>setFontAttribute</B>(<A HREF="../../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类">FontAttribute</A>&nbsp;fontAttribute)</PRE>
<DL>
<DD>设置文本字体属性。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>fontAttribute</CODE> - 文本字体属性 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); FontAttribute fontAttribute = new  FontAttribute(); fontAttribute.setForeground(100,100,100); fontAttribute.setFontSize(14); fontAttribute.setUnderlineType(3); style.setFontAttribute(fontAttribute); System.out.println(styles.getStyle("new style").getFontAttribute().getForeground()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类"><CODE>FontAttribute</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setName(java.lang.String)"><!-- --></A><H3>
setName</H3>
<PRE>
public void <B>setName</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>设置样式名字。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>name</CODE> - 样式名字 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); style.setName("test"); System.out.println(style.getName()); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数name为null时</DL>
</DD>
</DL>
<HR>

<A NAME="setNextParagraphStyle(java.lang.String)"><!-- --></A><H3>
setNextParagraphStyle</H3>
<PRE>
public void <B>setNextParagraphStyle</B>(java.lang.String&nbsp;styleName)</PRE>
<DL>
<DD>设置后续段落样式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>styleName</CODE> - 段落样式名称 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); style.setNextParagraphStyle("标题 2"); System.out.println(style.getNextParagraphStyle()); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数styleName为null时</DL>
</DD>
</DL>
<HR>

<A NAME="setParagraphAttribute(application.workbooks.workbook.style.paragraph.ParagraphAttribute)"><!-- --></A><H3>
setParagraphAttribute</H3>
<PRE>
public void <B>setParagraphAttribute</B>(<A HREF="../../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类">ParagraphAttribute</A>&nbsp;paragraphAttribute)</PRE>
<DL>
<DD>设置段落属性。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>paragraphAttribute</CODE> - 段落属性 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); ParagraphAttribute paragraphAttribute = new ParagraphAttribute(); paragraphAttribute.setAlignment(ParagraphConstants.ALIGNMENT_CENTER); paragraphAttribute.setFirstLineIndent(3.8f,UnitConstants.CENTIMETER); style.setParagraphAttribute(paragraphAttribute); System.out.println(styles.getStyle("new style").getParagraphAttribute().getFirstLineIndent()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类"><CODE>ParagraphAttribute</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setShadingAttribute(application.workbooks.workbook.style.border.ShadingAttribute)"><!-- --></A><H3>
setShadingAttribute</H3>
<PRE>
public void <B>setShadingAttribute</B>(<A HREF="../../../../../../application/workbooks/workbook/style/border/ShadingAttribute.html" title="application.workbooks.workbook.style.border 中的类">ShadingAttribute</A>&nbsp;shadingAttribute)</PRE>
<DL>
<DD>设置底纹属性。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>shadingAttribute</CODE> - 底纹属性 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); ShadingAttribute shadingAttribute = style.getShadingAttribute(); shadingAttribute.setTextureIndex(2); shadingAttribute.setBackground(150,50,150); style.setShadingAttribute(shadingAttribute); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/style/border/ShadingAttribute.html" title="application.workbooks.workbook.style.border 中的类"><CODE>ShadingAttribute</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setStyleType(int)"><!-- --></A><H3>
setStyleType</H3>
<PRE>
public void <B>setStyleType</B>(int&nbsp;styleType)</PRE>
<DL>
<DD>设置样式类型。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>styleType</CODE> - 样式类型。 <pre> 常量如下; StyleConstants.STYLE_PARAGRAPH   表示段落样式 StyleConstants.STYLE_CHARACTER   表示字符样式 </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Styles styles = doc.getStyles(); styles.addStyle("new style"); Style style = styles.getStyle("new style"); style.setStyleType(StyleConstants.STYLE_CHARACTER); </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/StyleConstants.html" title="application.constants 中的接口"><CODE>StyleConstants</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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>类</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;上一个类&nbsp;
&nbsp;下一个类</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?application/workbooks/workbook/documents/document/styles/Style.html" target="_top"><B>框架</B></A>  &nbsp;
&nbsp;<A HREF="Style.html" target="_top"><B>无框架</B></A>  &nbsp;
&nbsp;<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">
  摘要:&nbsp;嵌套&nbsp;|&nbsp;字段&nbsp;|&nbsp;构造方法&nbsp;|&nbsp;<A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息:&nbsp;字段&nbsp;|&nbsp;构造方法&nbsp;|&nbsp;<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 + -