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.worksheets.worksheet.ssshapes
Class SsShape

    java.lang.Object
      application.workbooks.workbook.shapes.Shape
          application.workbooks.workbook.worksheets.worksheet.ssshapes.SsShape

All Implemented Interfaces:
  application.resource.com.ComExceptionConstants

public class SsShape
extends Shape

该类封装了电子表格文档中图形对象的特性。

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
`void` | `copyShapeText()` 复制自选图形中选中的文本。
`void` | `cutShapeText()` 剪切自选图形中选中的文本。
`void` | `insertPictureToCell(int row, int column)` 将选中的图片插入指定的单元格中
`void` | `insertPictureToCell(java.lang.String sheetName, int row, int column)` 将选中的图片插入指定的单元格中
`void` | `insertPictureToCell(java.lang.String sheetName, java.lang.String cellAddress)` 将选中的图片插入指定的单元格中
`void` | `pasteShapeText(boolean hasFormat)` 在自选图形中粘贴文本。
`void` | `setObjectPosition(int position)` 设置图形对象相对于相邻单元格的移动和改变大小的方式。

Methods inherited from class application.workbooks.workbook.shapes.Shape
`changeConnector, changeOrder, changeType, copyFormatInfo, delete, duplicate, flipHorizontal, flipVertical, getCanDelete, getConnectFormat, getEndPoint, getFillFormat, getHalfDrag, getHeight, getHeightDoubleValue, getIndex, getLineFormat, getName, getOrientationIndex, getPictureFormat, getRotateAngle, getShadowFormat, getStartPoint, getText, getTextBoxAnchorPoint, getTextEffectFormat, getThreeDFormat, getType, getWidth, getWidthDoubleValue, isConnectable, isDocField, isEditable, isPicture, isPrintShape, isRatio, isSeal, isSelected, isTextEffect, move, moveByValue, pasteFormatInfo, reShape, reShape, select, selectToEdit, setCanDelete, setHalfDrag, setHeight, setHorizonAlignment, setLayoutIndex, setLevelDown, setLevelLeft, setLevelRight, setLevelUp, setOrientationIndex, setPosition, setPrintShape, setRatio, setRotateAngle, setRotateAngleByDegree, setSign, setSurroundType, setTextBoxAnchorPoint, setTextBoxMarginBottom, setTextBoxMarginLeft, setTextBoxMarginRight, setTextBoxMarginTop, setVerifySeal, setWidth, unSelect`

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

Method Detail

### copyShapeText

    public void copyShapeText()

  复制自选图形中选中的文本。

  例子：

       Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes();
       shapes.addTextBox(TextDirectionConstants.HORIZONTAL,179.0,317.0,415.0,399.0);
       shapes.getShape("文本框 1").selectToEdit();
       shapes.getRange ().getActiveText ().insertText(0,"asfsdfsdfsdf");
       shapes.getSsShape("文本框 1").copyShapeText ();

  See Also:
    `#copyValueTo`, `#copyFormatTo`, `#copyTo`

### cutShapeText

    public void cutShapeText()

  剪切自选图形中选中的文本。

  例子：

       Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes();
       shapes.addTextBox(TextDirectionConstants.HORIZONTAL,179.0,317.0,415.0,399.0);
       shapes.getShape("文本框 1").selectToEdit();
       shapes.getRange ().getActiveText ().insertText(0,"asfsdfsdfsdf");
       shapes.getSsShape("文本框 1").cutShapeText ();

### insertPictureToCell

    public void insertPictureToCell(int row,
                                    int column)

  将选中的图片插入指定的单元格中

  Parameters:
    `row` - 插入的单元格行位置
    `column` - 插入的单元格列位置

    例子：

         ActiveCell.insertPicture("c:\\program files\\evermore\\eio\\clipart\\picture\\activities\\swimmer.jpg");
         Worksheet sheet = Application.getWorkbooks().getActiveWorkbook().getWorksheets().getActiveWorksheet();
         Application.getWorkbooks().getActiveWorkbook().getWorksheets().getActiveWorksheet().getShapes().getSsShape("图片 1").insertPictureToCell(1,1);

### insertPictureToCell

    public void insertPictureToCell(java.lang.String sheetName,
                                    int row,
                                    int column)

  将选中的图片插入指定的单元格中

  Parameters:
    `sheetName` - 工作表名称
    `row` - 插入的单元格行位置
    `column` - 插入的单元格列位置

    例子：

         ActiveCell.insertPicture("c:\\program files\\evermore\\eio\\clipart\\picture\\activities\\swimmer.jpg");
         Worksheet sheet = Application.getWorkbooks().getActiveWorkbook().getWorksheets().getActiveWorksheet();
         Application.getWorkbooks().getActiveWorkbook().getWorksheets().getActiveWorksheet().getShapes().getSsShape("图片 1").insertPictureToCell(sheet.getName(),1,1);

### insertPictureToCell

    public void insertPictureToCell(java.lang.String sheetName,
                                    java.lang.String cellAddress)

  将选中的图片插入指定的单元格中

  Parameters:
    `sheetName` - 工作表名称
    `cellAddress` - 插入的单元格位置

    例子：

         ActiveCell.insertPicture("c:\\program files\\evermore\\eio\\clipart\\picture\\activities\\swimmer.jpg");
         Worksheet sheet = Application.getWorkbooks().getActiveWorkbook().getWorksheets().getActiveWorksheet();
         Application.getWorkbooks().getActiveWorkbook().getWorksheets().getActiveWorksheet().getShapes().getSsShape("图片 1").insertPictureToCell(sheet.getName(),"a1");

### pasteShapeText

    public void pasteShapeText(boolean hasFormat)

  在自选图形中粘贴文本。

  Parameters:
    `hasFormat` - 是否带格式粘贴

    例子：

         Shapes shapes = Application.getWorkbooks().getActiveWorkbook().getActiveShapes();
         shapes.addTextBox(TextDirectionConstants.HORIZONTAL,179.0,317.0,415.0,399.0);
         shapes.getShape("文本框 1").selectToEdit();
         shapes.getRange ().getActiveText ().insertText(0,"asfsdfsdfsdf");
         shapes.getSsShape("文本框 1").pasteShapeText (true);

### setObjectPosition

    public void setObjectPosition(int position)

  设置图形对象相对于相邻单元格的移动和改变大小的方式。

  Overrides:
    `setObjectPosition` in class `Shape`
  Parameters:
    `position` - 对象相对于相邻单元格的移动和改变大小的方式索引

Overview | Package | Class | Tree | Index | Help

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

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