Overview | Package | Class | Tree | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## application.workbooks.workbook.documents.document
Class WpShapes

    java.lang.Object
      application.workbooks.workbook.Shapes
          application.workbooks.workbook.documents.document.WpShapes

All Implemented Interfaces:
  application.resource.com.ComExceptionConstants

public class WpShapes
extends Shapes

该类定义了获取文字处理文档中图形对象的方法。

Field Summary

Fields inherited from interface application.resource.com.ComExceptionConstants
`CANNOT_EDIT, CANNOT_MAKE_ARROW, DELETE_DOCFIELD, DELETE_SHAPE, DIRECTRY_NOT_FIND, ERROR_DOCFIELD, ERROR_MACRO_NAME, FILE_NOT_FIND, LOCKED_DOCFIELD, LOCKED_POSITION_DOCFIELD, NO_ARROW_STYLE, NO_BOOK_NAME, NO_BUILDER, NO_CONNECTOR_TYPE, NO_DOCFIELDNAME, NO_MACRO_FOUND, NO_OBJECT, NO_PATH_NAME, NO_PRINT_PREVIEW, NO_PRODUCT, NO_Seal, NO_Seal_File, NO_SELECTED_OBJECT, NO_SHAPE, NO_TOOLBAR, NO_UNDO_TIMES, NO_WINDOW, NO_WORKBOOK, NO_WORKBOOK_TYPE, NOT_CONNECT, NOT_IMAGE, NOT_PRESENTATION, NOT_SUPPORT_DIALOG_SHOW, NOT_SUPPORT_DIALOG_TYPE, NOT_TEXT_EFFECT, Repeat_Name, Seal_Sign, SHAPE_TYPE_ERROR, WRONG_FREEFORM_TYPE`

Method Summary
`WpShape[]` | `getAllWpShapes()` 获取当前文字处理文档所有的图形对象。
`WpShape` | `getWpShape(java.lang.String name)` 获取当前文字处理文档索引指定的图形对象。
`application.workbooks.workbook.documents.document.wpshapes.WpShapeRange` | `getWpShapeRange()` 获得被选中的图形对象。

Methods inherited from class application.workbooks.workbook.Shapes
`addArrow, addConnector, addDocField, addLine, addSeal, addSeal, addShape, addTextBox, addWordArt, appendSeal, getAllSelectedShapes, getAllShapes, getDocField, getDocFieldRange, getRange, getShape, insertSeal, insertSeal, insertSeal, insertSeal, isSelectAll, removeSeal, renameSeal, selectAll, selectRange, unSelect`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getAllWpShapes

    public WpShape[] getAllWpShapes()

  获取当前文字处理文档所有的图形对象。

  Returns:
    当前文字处理文档所有的图形对象

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         WpShapes shapes = doc.getShapes();
         shapes.addShape(1,180,120,290,280);
         shapes.addShape(2,100,130,300,340);
         WpShape[] shapes = shapes.getAllWpShapes();
         shape[0].setLayoutIndex(1);
         shape[1].setLayoutIndex(2);

  See Also:
    `WpShape`, `WpShapeRange`, `Shape`, `Shapes`

### getWpShape

    public WpShape getWpShape(java.lang.String name)

  获取当前文字处理文档索引指定的图形对象。

  Parameters:
    `name` - 图形对象的名字
  Returns:
    当前文字处理文档的图形对象

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         WpShapes shapes = doc.getShapes();
         shapes.addShape(1,180,120,290,280);
         WpShape shape = shapes.getWpShape(1);
         shape.setLayoutIndex(2);

  See Also:
    `WpShape`, `WpShapeRange`, `Shape`, `Shapes`

### getWpShapeRange

    public application.workbooks.workbook.documents.document.wpshapes.WpShapeRange getWpShapeRange()

  获得被选中的图形对象。

  Returns:
    WpShapeRange 被选中的图形对象

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         WpShapes shapes = doc.getShapes();
         shapes.addShape(1,180,120,290,280);
         shapes.addShape(2,100,130,300,340);
         shapes.selectRange(new String[]{"矩形1","平行四边形1"});
         WpShapeRange shapeRange = shapes.getWpShapeRange() ;
         shapeRange.setSurroundType(1);

Overview | Package | Class | Tree | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

版权所有 2001-2004 无锡永中科技有限公司