ig.excel.WorksheetShape

Abstract base class for all shapes (atomic or compound) in a worksheet.

Remarks

Atomic shapes are singular shape entities, such as an image, a polygon, or text. Compound shapes are groupings of shapes, and are represented by WorksheetShapeGroup instances.

Currently, not all shape information is customizable (such as shape rotation). However, for round-tripping purposes, when a shape is loaded from an Excel file, this information in maintained with the shape. See WorksheetShape.clearUnknownData for more information about unsupported data.

Dependencies

jquery-1.4.4.js
infragistics.util.js
infragistics.ext_collections.js
infragistics.ext_collectionsExtended.js
infragistics.ext_io.js
infragistics.ext_text.js
infragistics.ext_core.js
infragistics.documents.core_core.js
infragistics.ext_ui.js
The current widget has no options.
The current widget has no events.
  • bottomRightCornerCell

    .bottomRightCornerCell( );
    Return Type:
    ig.excel.WorksheetCell
    Return Type Description:
    The cell where the bottom-right corner of the shape resides.

    Gets the cell where the bottom-right corner of the shape resides.

    Exceptions

    Exception Description
    ig.ArgumentException The value assigned is a cell whose worksheet is not the same as this shape's worksheet.
    ig.ArgumentNullException The value assigned is null and this shape already exists on a worksheet or group.

    Remarks

    This anchor cell, along with the WorksheetShape.topLeftCornerCell, determines where the shape will be positioned on the worksheet. In addition, the WorksheetShape.bottomRightCornerPosition and WorksheetShape.topLeftCornerPosition properties allow for finer control of the shape's position.

  • bottomRightCornerCell

    .bottomRightCornerCell( value:ig.excel.WorksheetCell );
    Return Type:
    ig.excel.WorksheetCell
    Return Type Description:
    The cell where the bottom-right corner of the shape resides.

    Sets the cell where the bottom-right corner of the shape resides.

    • value
    • Type:ig.excel.WorksheetCell

    Exceptions

    Exception Description
    ig.ArgumentException The value assigned is a cell whose worksheet is not the same as this shape's worksheet.
    ig.ArgumentNullException The value assigned is null and this shape already exists on a worksheet or group.

    Remarks

    This anchor cell, along with the WorksheetShape.topLeftCornerCell, determines where the shape will be positioned on the worksheet. In addition, the WorksheetShape.bottomRightCornerPosition and WorksheetShape.topLeftCornerPosition properties allow for finer control of the shape's position.

  • bottomRightCornerPosition

    .bottomRightCornerPosition( );
    Return Type:
    object
    Return Type Description:
    The position in the bottom-right corner cell of the shape's bottom-right corner. This will be an object with numeric values for properties 'x' and 'y'.

    Gets the position in the WorksheetShape.bottomRightCornerCell of the shape's bottom-right corner, expressed in percentages.

    Exceptions

    Exception Description
    ig.ArgumentOutOfRangeException Either coordinate of the value assigned is outside the range of 0.0 to 100.0.

    Remarks

    These percentages are expressed as distance across the associated dimension of the cell, starting at the top-left corner of the cell. For example, (0.0, 0.0) represents the top-left corner of the cell, whereas (100.0, 100.0) represents the bottom-right corner of the cell. (50.0, 10.0) would represent the location in the cell which is centered horizontally, and a tenth of the way down from the top.

  • bottomRightCornerPosition

    .bottomRightCornerPosition( value:object );
    Return Type:
    object
    Return Type Description:
    The position in the bottom-right corner cell of the shape's bottom-right corner. This will be an object with numeric values for properties 'x' and 'y'.

    Sets the position in the WorksheetShape.bottomRightCornerCell of the shape's bottom-right corner, expressed in percentages.

    • value
    • Type:object
    • This can be an object with numeric values for properties 'x' and 'y', such as { x: 1, y: 2 }.

    Exceptions

    Exception Description
    ig.ArgumentOutOfRangeException Either coordinate of the value assigned is outside the range of 0.0 to 100.0.

    Remarks

    These percentages are expressed as distance across the associated dimension of the cell, starting at the top-left corner of the cell. For example, (0.0, 0.0) represents the top-left corner of the cell, whereas (100.0, 100.0) represents the bottom-right corner of the cell. (50.0, 10.0) would represent the location in the cell which is centered horizontally, and a tenth of the way down from the top.

  • clearUnknownData

    .clearUnknownData( );

    Clears the cached unknown shape data which was read in from a parsed excel file.

    Exceptions

    Exception Description
    ig.InvalidOperationException This method is called on an UnknownShape instance.

    Remarks

    This method will only be needed until all shape information is supported and customizable. After all shape data can be controlled, this method will become obsolete. Currently, all unsupported data will be stored with the shape for round-tripping purposes. For example, if an Excel file with complex and unsupported shapes is loaded into a Workbook instance, some cell values are changed, and it is saved to the same file, the complex shapes will still exist in the workbook. However, if a loaded shape needs to be modified before it is saved back, this method allows for that unsupported data to be removed while all supported data is maintained.

    Note: This method only clears unsupported data. In future versions of the product, as more shape data is supported, this method will have different effects on the shape, until eventually all data is supported and this method will have no effect on the shape.

  • createPredefinedShape

    .createPredefinedShape( shapeType:ig.excel.PredefinedShapeType );
    Return Type:
    ig.excel.WorksheetShape
    Return Type Description:
    A WorksheetShape-derived instance representing the predefined shape.

    Creates a shape which is predefined in Microsoft Excel.

    • shapeType
    • Type:ig.excel.PredefinedShapeType
    • The type of shape to create.

    Exceptions

    Exception Description
    ig.excel.InvalidEnumArgumentException shapeType is not defined in the PredefinedShapeType enumeration.
  • fill

    .fill( );
    Return Type:
    ig.excel.ShapeFill
    Return Type Description:
    A ShapeFill-derived instance describing the fill of the shape, or null for no fill.

    Gets the fill to use in the background of the shape.

    Remarks

    Note: some shapes, such as connectors or groups, cannot have a fill set. For these shapes, the value on this property will be ignored and lost when the workbook is saved.

  • fill

    .fill( value:ig.excel.ShapeFill );
    Return Type:
    ig.excel.ShapeFill
    Return Type Description:
    A ShapeFill-derived instance describing the fill of the shape, or null for no fill.

    Sets the fill to use in the background of the shape.

    • value
    • Type:ig.excel.ShapeFill

    Remarks

    Note: some shapes, such as connectors or groups, cannot have a fill set. For these shapes, the value on this property will be ignored and lost when the workbook is saved.

  • flippedHorizontally

    .flippedHorizontally( );

    Gets the value which indicates whether the shape is flipped horizontally along the vertical center line.

    Exceptions

    Exception Description
    ig.InvalidOperationException The value is set to True and this shape doesn't allow flipping or rotating, such as a WorksheetChart.
  • flippedHorizontally

    .flippedHorizontally( value:boolean );

    Sets the value which indicates whether the shape is flipped horizontally along the vertical center line.

    • value
    • Type:boolean

    Exceptions

    Exception Description
    ig.InvalidOperationException The value is set to True and this shape doesn't allow flipping or rotating, such as a WorksheetChart.
  • flippedVertically

    .flippedVertically( );

    Gets the value which indicates whether the shape is flipped vertically along the horizontal center line.

    Exceptions

    Exception Description
    ig.InvalidOperationException The value is set to True and this shape doesn't allow flipping or rotating, such as a WorksheetChart.
  • flippedVertically

    .flippedVertically( value:boolean );

    Sets the value which indicates whether the shape is flipped vertically along the horizontal center line.

    • value
    • Type:boolean

    Exceptions

    Exception Description
    ig.InvalidOperationException The value is set to True and this shape doesn't allow flipping or rotating, such as a WorksheetChart.
  • getBoundsInTwips

    .getBoundsInTwips( );
    Return Type:
    object
    Return Type Description:
    The bounds of the shape on its worksheet. This will be an object with numeric values for properties 'x', 'y', 'width', 'height', 'left', 'top', 'right', and 'bottom'.

    Gets the bounds of the shape in twips (1/20th of a point).

    Exceptions

    Exception Description
    ig.InvalidOperationException The WorksheetShape.topLeftCornerCell or WorksheetShape.bottomRightCornerCell are null, in which case the shape has no bounds.

    Remarks

    The bounds returned by this method are only valid with the current configuration of the worksheet. If any rows or columns before or within the shape are resized, these bounds will no longer reflect the position of the shape.

  • getBoundsInTwips

    .getBoundsInTwips( options:ig.excel.PositioningOptions );
    Return Type:
    object
    Return Type Description:
    The bounds of the shape on its worksheet. This will be an object with numeric values for properties 'x', 'y', 'width', 'height', 'left', 'top', 'right', and 'bottom'.

    Gets the bounds of the shape in twips (1/20th of a point).

    • options
    • Type:ig.excel.PositioningOptions
    • The options to use when getting the bounds of the shape.

    Exceptions

    Exception Description
    ig.InvalidOperationException The WorksheetShape.topLeftCornerCell or WorksheetShape.bottomRightCornerCell are null, in which case the shape has no bounds.

    Remarks

    The bounds returned by this method are only valid with the current configuration of the worksheet. If any rows or columns before or within the shape are resized, these bounds will no longer reflect the position of the shape.

  • outline

    .outline( );
    Return Type:
    ig.excel.ShapeOutline
    Return Type Description:
    A ShapeOutline-derived instance describing the outline of the shape, or null for no outline.

    Gets the outline to use for the shape.

    Remarks

    Note: some shapes, such as comments or groups, cannot have a outline set. For these shapes, the value on this property will be ignored and lost when the workbook is saved.

  • outline

    .outline( value:ig.excel.ShapeOutline );
    Return Type:
    ig.excel.ShapeOutline
    Return Type Description:
    A ShapeOutline-derived instance describing the outline of the shape, or null for no outline.

    Sets the outline to use for the shape.

    • value
    • Type:ig.excel.ShapeOutline

    Remarks

    Note: some shapes, such as comments or groups, cannot have a outline set. For these shapes, the value on this property will be ignored and lost when the workbook is saved.

  • positioningMode

    .positioningMode( );
    Return Type:
    ig.excel.ShapePositioningMode
    Return Type Description:
    The way shapes will be repositioned in excel when cells before or within the shape are resized.

    Gets the way shapes will be repositioned in excel when cells before or within the shape are resized.

    Exceptions

    Exception Description
    ig.excel.InvalidEnumArgumentException The value assigned is not defined in the ShapePositioningMode enumeration.

    Remarks

    This value will not be saved for shapes contained in a WorksheetShapeGroup, which inherit their positioning mode from their parent group.

  • positioningMode

    .positioningMode( value:ig.excel.ShapePositioningMode );
    Return Type:
    ig.excel.ShapePositioningMode
    Return Type Description:
    The way shapes will be repositioned in excel when cells before or within the shape are resized.

    Sets the way shapes will be repositioned in excel when cells before or within the shape are resized.

    • value
    • Type:ig.excel.ShapePositioningMode

    Exceptions

    Exception Description
    ig.excel.InvalidEnumArgumentException The value assigned is not defined in the ShapePositioningMode enumeration.

    Remarks

    This value will not be saved for shapes contained in a WorksheetShapeGroup, which inherit their positioning mode from their parent group.

  • setBoundsInTwips

    .setBoundsInTwips( worksheet:ig.excel.Worksheet, bounds:object );

    Sets the bounds of the shape in twips (1/20th of a point).

    • worksheet
    • Type:ig.excel.Worksheet
    • The worksheet on which the shape should be placed.
    • bounds
    • Type:object
    • The new bounds where the shape should be placed. This can be an object with numeric values for properties 'x', 'y', 'width', and 'height' or 'left', 'top', 'right', and 'bottom' such as { x: 1, y: 2, width: 100, height: 200 }.

    Exceptions

    Exception Description
    ig.ArgumentNullException worksheet is null.

    Remarks

    The shape will only be positioned at the specified bounds while the worksheet remains in the current configuration. Depending on the WorksheetShape.positioningMode of the shape, it may change bounds if any rows or columns before or within the shape are resized.

  • setBoundsInTwips

    .setBoundsInTwips( worksheet:ig.excel.Worksheet, bounds:object, options:ig.excel.PositioningOptions );

    Sets the bounds of the shape in twips (1/20th of a point).

    • worksheet
    • Type:ig.excel.Worksheet
    • The worksheet on which the shape should be placed.
    • bounds
    • Type:object
    • The new bounds where the shape should be placed. This can be an object with numeric values for properties 'x', 'y', 'width', and 'height' or 'left', 'top', 'right', and 'bottom' such as { x: 1, y: 2, width: 100, height: 200 }.
    • options
    • Type:ig.excel.PositioningOptions
    • The options to use when setting the bounds of the shape.

    Exceptions

    Exception Description
    ig.ArgumentNullException worksheet is null.

    Remarks

    The shape will only be positioned at the specified bounds while the worksheet remains in the current configuration. Depending on the WorksheetShape.positioningMode of the shape, it may change bounds if any rows or columns before or within the shape are resized.

  • topLeftCornerCell

    .topLeftCornerCell( );
    Return Type:
    ig.excel.WorksheetCell
    Return Type Description:
    The cell where the top-left corner of the shape resides.

    Gets the cell where the top-left corner of the shape resides.

    Exceptions

    Exception Description
    ig.ArgumentException The value assigned is a cell whose worksheet is not the same as this shape's worksheet.
    ig.ArgumentNullException The value assigned is null and this shape already exists on a worksheet or group.

    Remarks

    This anchor cell, along with the WorksheetShape.bottomRightCornerCell, determines where the shape will be positioned on the worksheet. In addition, the WorksheetShape.bottomRightCornerPosition and WorksheetShape.topLeftCornerPosition properties allow for finer control of the shape's position.

  • topLeftCornerCell

    .topLeftCornerCell( value:ig.excel.WorksheetCell );
    Return Type:
    ig.excel.WorksheetCell
    Return Type Description:
    The cell where the top-left corner of the shape resides.

    Sets the cell where the top-left corner of the shape resides.

    • value
    • Type:ig.excel.WorksheetCell

    Exceptions

    Exception Description
    ig.ArgumentException The value assigned is a cell whose worksheet is not the same as this shape's worksheet.
    ig.ArgumentNullException The value assigned is null and this shape already exists on a worksheet or group.

    Remarks

    This anchor cell, along with the WorksheetShape.bottomRightCornerCell, determines where the shape will be positioned on the worksheet. In addition, the WorksheetShape.bottomRightCornerPosition and WorksheetShape.topLeftCornerPosition properties allow for finer control of the shape's position.

  • topLeftCornerPosition

    .topLeftCornerPosition( );
    Return Type:
    object
    Return Type Description:
    The position in the top-left corner cell of the shape's top-left corner. This will be an object with numeric values for properties 'x' and 'y'.

    Gets the position in the WorksheetShape.topLeftCornerCell of the shape's top-left corner, expressed in percentages.

    Exceptions

    Exception Description
    ig.ArgumentOutOfRangeException Either coordinate of the value assigned is outside the range of 0.0 to 100.0.

    Remarks

    These percentages are expressed as distance across the associated dimension of the cell, starting at the top-left corner of the cell. For example, (0.0, 0.0) represents the top-left corner of the cell, whereas (100.0, 100.0) represents the bottom-right corner of the cell. (50.0, 10.0) would represent the location in the cell which is centered horizontally, and a tenth of the way down from the top.

  • topLeftCornerPosition

    .topLeftCornerPosition( value:object );
    Return Type:
    object
    Return Type Description:
    The position in the top-left corner cell of the shape's top-left corner. This will be an object with numeric values for properties 'x' and 'y'.

    Sets the position in the WorksheetShape.topLeftCornerCell of the shape's top-left corner, expressed in percentages.

    • value
    • Type:object
    • This can be an object with numeric values for properties 'x' and 'y', such as { x: 1, y: 2 }.

    Exceptions

    Exception Description
    ig.ArgumentOutOfRangeException Either coordinate of the value assigned is outside the range of 0.0 to 100.0.

    Remarks

    These percentages are expressed as distance across the associated dimension of the cell, starting at the top-left corner of the cell. For example, (0.0, 0.0) represents the top-left corner of the cell, whereas (100.0, 100.0) represents the bottom-right corner of the cell. (50.0, 10.0) would represent the location in the cell which is centered horizontally, and a tenth of the way down from the top.

  • visible

    .visible( );
    Return Type:
    boolean
    Return Type Description:
    The value indicating whether the shape is visible on the worksheet.

    Gets the value indicating whether the shape is visible on the worksheet.

  • visible

    .visible( value:boolean );
    Return Type:
    boolean
    Return Type Description:
    The value indicating whether the shape is visible on the worksheet.

    Sets the value indicating whether the shape is visible on the worksheet.

    • value
    • Type:boolean
  • worksheet

    .worksheet( );
    Return Type:
    ig.excel.Worksheet
    Return Type Description:
    The worksheet on which the shape resides.

    Gets the worksheet on which the shape resides.

Copyright © 1996 - 2024 Infragistics, Inc. All rights reserved.