lineformat.html

来自「永中OFFICE二次开发帮助文档」· HTML 代码 · 共 756 行 · 第 1/2 页

HTML
756
字号
public int <B>getDash</B>()</PRE>
<DL>
<DD>获取当前图形对象线条的虚实线类型。
<P>
<DD><DL>

<DT><B>返回:</B><DD>当前图形对象线条的虚实线类型,为整型数值 0 实线 1 圆点线 2 方点线 3 虚线 4 点虚线 5 长虚线 6 长点虚线 7 长双点虚线<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("直线 1") ; LineFormat line = shape.getLineFormat() ; javax.swing.JOptionPane.showMessageDialog(null,"此对象为第"+line.getDash()+"种虚实类型") ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="getEndArrowStyle()"><!-- --></A><H3>
getEndArrowStyle</H3>
<PRE>
public int <B>getEndArrowStyle</B>()</PRE>
<DL>
<DD>获取当前图形对象(直线,连接线)的末端箭头的样式。
<P>
<DD><DL>

<DT><B>返回:</B><DD>当前图形对象(直线,连接线)的末端箭头的样式,为整型数值 0-无箭头 1-箭头 2-开箭头 3-燕尾箭头 4-菱形箭头 5-椭圆箭头<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("直线 1") ; LineFormat line = shape.getLineFormat() ; javax.swing.JOptionPane.showMessageDialog(null,"当前图形对象未端箭头样式是第"+line.getEndArrowStyle()+"种索引") ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="getEndArrowWidth()"><!-- --></A><H3>
getEndArrowWidth</H3>
<PRE>
public int <B>getEndArrowWidth</B>()</PRE>
<DL>
<DD>获取当前图形对象(直线,连接线)末端箭头的宽度索引。
<P>
<DD><DL>

<DT><B>返回:</B><DD>当前图形对象(直线,连接线)末端箭头的宽度,为整型数值<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("直线 1") ; LineFormat line = shape.getLineFormat() ; javax.swing.JOptionPane.showMessageDialog(null,"当前图形对象未端箭头的宽度是第"+line.getEndArrowWidth()+"种索引") ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="getPatternFormat()"><!-- --></A><H3>
getPatternFormat</H3>
<PRE>
public <A HREF="../../../../application/workbooks/workbook/shapes/PatternFormat.html" title="application.workbooks.workbook.shapes 中的类">PatternFormat</A> <B>getPatternFormat</B>()</PRE>
<DL>
<DD>获取当前图形对象的线条的图案。
<P>
<DD><DL>

<DT><B>返回:</B><DD>当前图形对象的线条的图案<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("新月形 3") ; LineFormat line = shape.getLineFormat() ; PatternFormat pf = line.getPatternFormat() ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="getWidth()"><!-- --></A><H3>
getWidth</H3>
<PRE>
public float <B>getWidth</B>()</PRE>
<DL>
<DD>获取图形对象线条的宽度。
<P>
<DD><DL>

<DT><B>返回:</B><DD>图形对象线条的宽度<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("曲线连接线 5") ; LineFormat line = shape.getLineFormat() ; javax.swing.JOptionPane.showMessageDialog(null,"此对象线的宽度"+line.getWidth()+"磅") ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="isMakeArrow()"><!-- --></A><H3>
isMakeArrow</H3>
<PRE>
public boolean <B>isMakeArrow</B>()</PRE>
<DL>
<DD>判断线条是否有箭头。
<P>
<DD><DL>

<DT><B>返回:</B><DD>如果线条带有箭头,返回true;否则,返回false<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("直线 1") ; LineFormat line = shape.getLineFormat() ; javax.swing.JOptionPane.showMessageDialog(null,"此对象是否有箭头"+line.isMakeArrow()) ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="setArrowStyle(int)"><!-- --></A><H3>
setArrowStyle</H3>
<PRE>
public void <B>setArrowStyle</B>(int&nbsp;index)</PRE>
<DL>
<DD>为图形对象(直线,连接线)设置箭头的风格。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>index</CODE> - 箭头的风格,为整型值,有效取值范围为0-10<p>               0        两端无箭头                1        始端无箭头 末端开箭头               2        始端开箭头 末端无箭头               3        两端开箭头               4        始端无箭头 末端实心箭头               5        始端实心箭头 末端无箭头               6        两端实心箭头               7        始端菱形箭头 末端实心箭头               8        始端实心箭头 末端菱形箭头               9        两端菱形箭头               10       两端椭圆箭头               其它      箭头无变化<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("直线 1") ; LineFormat line = shape.getLineFormat() ; line.setArrowStyle(7) ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="setBeginArrowStyle(int)"><!-- --></A><H3>
setBeginArrowStyle</H3>
<PRE>
public void <B>setBeginArrowStyle</B>(int&nbsp;beginArrowStyle)</PRE>
<DL>
<DD>设置当前图形对象(线条,连接线等)始端箭头样式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>beginArrowStyle</CODE> - 箭头的类型,为整型数值 0-无箭头 1-箭头 2-开箭头 3-燕尾箭头 4-菱形箭头 5-椭圆箭头<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("直线 1") ; LineFormat line = shape.getLineFormat() ; line.setBeginArrowStyle(3) ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="setBeginArrowWidth(int)"><!-- --></A><H3>
setBeginArrowWidth</H3>
<PRE>
public void <B>setBeginArrowWidth</B>(int&nbsp;beginArrowWidth)</PRE>
<DL>
<DD>设置当前图形对象(直线,连接线)的始端箭头的宽度索引。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>beginArrowWidth</CODE> - 图形对象(直线,连接线)的始端箭头的宽度,为整型数值<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("直线 1") ; LineFormat line = shape.getLineFormat() ; line.setBeginArrowWidth(5) ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="setConnectType(int)"><!-- --></A><H3>
setConnectType</H3>
<PRE>
public void <B>setConnectType</B>(int&nbsp;type)</PRE>
<DL>
<DD>设置连接线的类型。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 连接线的类型,为整型数值。 <pre>  type为0,表示直连接线;  type为1,表示肘形连接线;  type为2,表示曲线连接线 </pre><p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("曲线连接线 5") ; LineFormat line = shape.getLineFormat() ; line.setConnectType(1) ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="setDash(int)"><!-- --></A><H3>
setDash</H3>
<PRE>
public void <B>setDash</B>(int&nbsp;newLineDash)</PRE>
<DL>
<DD>设置当前图形对象线条的虚实线类型。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>newLineDash</CODE> - 虚线类型,为整型数值,当取值范围为1-7时,表示虚线 否则设置无效 0 实线 1 圆点线 2 方点线 3 虚线 4 点虚线 5 长虚线 6 长点虚线 7 长双点虚线<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("新月形 3") ; LineFormat line = shape.getLineFormat() ; line.setDash(2) ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="setEndArrowStyle(int)"><!-- --></A><H3>
setEndArrowStyle</H3>
<PRE>
public void <B>setEndArrowStyle</B>(int&nbsp;endArrowStyle)</PRE>
<DL>
<DD>设置当前图形对象(直线,连接线)的末端箭头的样式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>endArrowStyle</CODE> - 图形对象(直线,连接线)的末端箭头的样式,为整型数值<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("直线 1") ; LineFormat line = shape.getLineFormat() ; line.setEndArrowStyle(4) ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="setEndArrowWidth(int)"><!-- --></A><H3>
setEndArrowWidth</H3>
<PRE>
public void <B>setEndArrowWidth</B>(int&nbsp;endArrowWidth)</PRE>
<DL>
<DD>设置当前图形对象(直线,连接线)末端箭头的宽度索引。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>endArrowWidth</CODE> - 图形对象(直线,连接线)末端箭头的宽度,为整型数值<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("直线 1") ; LineFormat line = shape.getLineFormat() ;          line.setEndArrowWidth(6) ;</pre></DL>
</DD>
</DL>
<HR>

<A NAME="setWidth(double)"><!-- --></A><H3>
setWidth</H3>
<PRE>
public void <B>setWidth</B>(double&nbsp;newLineWidth)</PRE>
<DL>
<DD>设置当前图形对象的线条的宽度。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>newLineWidth</CODE> - 线条的宽度,为双精度值<p><b>例子:</b><pre> Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes() ; Shape shape = shapes.getShape("椭圆 4") ; LineFormat line = shape.getLineFormat() ; line.setWidth(2.0) ;</pre></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;<A HREF="../../../../application/workbooks/workbook/shapes/DocField.html" title="application.workbooks.workbook.shapes 中的类"><B>上一个类</B></A>&nbsp;
&nbsp;<A HREF="../../../../application/workbooks/workbook/shapes/Nodes.html" title="application.workbooks.workbook.shapes 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?application/workbooks/workbook/shapes/LineFormat.html" target="_top"><B>框架</B></A>  &nbsp;
&nbsp;<A HREF="LineFormat.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 + =
减小字号Ctrl + -
显示快捷键?