📄 paragraphattribute.html
字号:
</DD>
</DL>
<HR>
<A NAME="getAdjustSpaceBetweenALText()"><!-- --></A><H3>
getAdjustSpaceBetweenALText</H3>
<PRE>
public int <B>getAdjustSpaceBetweenALText</B>()</PRE>
<DL>
<DD>是否允许中文版式中自动调整中文和西文间的间距,该方法只能在中文版本中使用。
<P>
<DD><DL>
<DT><B>返回:</B><DD>如果允许中文版式中自动调整中文和西文间的间距,返回1,否则,返回0。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("是否允许中文版式中自动调整中文和西文间的间距:"+paragraphAttr.getAdjustSpaceBetweenALText()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setAdjustSpaceBetweenALText(boolean)"><CODE>setAdjustSpaceBetweenALText(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getAdjustSpaceBetweenANumber()"><!-- --></A><H3>
getAdjustSpaceBetweenANumber</H3>
<PRE>
public int <B>getAdjustSpaceBetweenANumber</B>()</PRE>
<DL>
<DD>是否允许在中文版式中自动调整中文与数字的间距,该方法只能在中文版本中使用。
<P>
<DD><DL>
<DT><B>返回:</B><DD>如果允许在中文版式中自动调整中文与数字的间距,返回1,否则,返回0。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("是否在中文版式中自动调整中文与数字的间距:"+paragraphAttr.getAdjustSpaceBetweenANumber()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setAdjustSpaceBetweenANumber(boolean)"><CODE>setAdjustSpaceBetweenANumber(boolean)</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> ParagraphConstants.ALIGNMENT_LEFT = 0 左对齐 ParagraphConstants.ALIGNMENT_CENTER = 1 居中 ParagraphConstants.ALIGNMENT_RIGHT = 2 右对齐 ParagraphConstants.ALIGNMENT_JUSTIFIED =3 两端对齐 ParagraphConstants.ALIGNMENT_DISTRIBUTED =4 分散对齐 GlobalConstants.UNDEFINED_VALUE = 9999999 表示当前段落属性为三态 </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("获得指定段落的对齐方式是:"+paragraphAttr.getAlignment()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/constants/ParagraphConstants.html" title="application.constants 中的接口"><CODE>ParagraphConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getFirstLineBreakControl()"><!-- --></A><H3>
getFirstLineBreakControl</H3>
<PRE>
public int <B>getFirstLineBreakControl</B>()</PRE>
<DL>
<DD>是否按中文习惯控制首尾字符状态。
<P>
<DD><DL>
<DT><B>返回:</B><DD>如果按中文习惯控制首尾字符状态,返回1,否则,返回0。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("是否按中文习惯控制首尾字符状态:"+paragraphAttr.getFirstLineBreakControl()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setFirstLineBreakControl(boolean)"><CODE>setFirstLineBreakControl(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getFirstLineIndent()"><!-- --></A><H3>
getFirstLineIndent</H3>
<PRE>
public float <B>getFirstLineIndent</B>()</PRE>
<DL>
<DD>获得首行缩进距离(默认单位为磅)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>首行缩进距离,取值范围在0到1584之间。如果返回值为9999999表示当前段落属性为三态 说明: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(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落的首行缩进距离为:"+paragraphAttr.getFirstLineIndent()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getFirstLineIndentOfChar()"><!-- --></A><H3>
getFirstLineIndentOfChar</H3>
<PRE>
public float <B>getFirstLineIndentOfChar</B>()</PRE>
<DL>
<DD>获得首行缩进距离(度量单位为字符)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>首行缩进距离,取值范围在0到316.8字符之间。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落的首行缩进字符数:"+paragraphAttr.getFirstLineIndentOfChar()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getFirstPunctuationCompressed()"><!-- --></A><H3>
getFirstPunctuationCompressed</H3>
<PRE>
public int <B>getFirstPunctuationCompressed</B>()</PRE>
<DL>
<DD>是否允许中文版式中行首标点压缩,该方法只能在中文版本中使用。
<P>
<DD><DL>
<DT><B>返回:</B><DD>如果允许中文版式中行首标点压缩,返回1,否则,返回0。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("是否允许中文版式中行首标点压缩:"+paragraphAttr.getFirstPunctuationCompressed()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setFirstPunctuationCompressed(boolean)"><CODE>setFirstPunctuationCompressed(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getHangingLinesIndent()"><!-- --></A><H3>
getHangingLinesIndent</H3>
<PRE>
public float <B>getHangingLinesIndent</B>()</PRE>
<DL>
<DD>获得悬挂缩进距离(默认单位为磅)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>悬挂缩进距离,取值范围在0到1584之间。如果返回值为9999999表示当前段落属性为三态 说明: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(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落的悬挂缩进距离为:"+paragraphAttr.getHangingLinesIndent()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getHangingLinesIndentOfChar()"><!-- --></A><H3>
getHangingLinesIndentOfChar</H3>
<PRE>
public float <B>getHangingLinesIndentOfChar</B>()</PRE>
<DL>
<DD>获得悬挂缩进距离(度量单位为字符)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>悬挂缩进距离,取值范围在0到316.8字符之间。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落的悬挂缩进字符数:"+paragraphAttr.getHangingLinesIndentOfChar()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getHyphenation()"><!-- --></A><H3>
getHyphenation</H3>
<PRE>
public int <B>getHyphenation</B>()</PRE>
<DL>
<DD>是否取消断字。
<P>
<DD><DL>
<DT><B>返回:</B><DD>如果取消断字,返回1,否则返回0。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落是否取消断字:"+paragraphAttr.getHyphenation()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setHyphenation(boolean)"><CODE>setHyphenation(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getKeepLinesTogether()"><!-- --></A><H3>
getKeepLinesTogether</H3>
<PRE>
public int <B>getKeepLinesTogether</B>()</PRE>
<DL>
<DD>判断段中是否不分页。
<P>
<DD><DL>
<DT><B>返回:</B><DD>如果段中不分页,返回1;否则,返回0。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落是否段中不分页:"+paragraphAttr.getKeepLinesTogether()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setKeepLinesTogether(boolean)"><CODE>setKeepLinesTogether(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getKeepWithNext()"><!-- --></A><H3>
getKeepWithNext</H3>
<PRE>
public int <B>getKeepWithNext</B>()</PRE>
<DL>
<DD>返回是否与下段同页。
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -