Interface IShape
- All Superinterfaces:
IContainer
- All Known Subinterfaces:
IBackgroundPicture
Represents an object in the drawing layer, such as an AutoShape, chart, or picture. The Shape object is a member of the
IShapes collection. TheShapes collection contains all the shapes on a slide.-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Deletes the object.Duplicates the shape and returns a reference to the new copy.voidGenerate a new shape from the json string.Gets a collection of adjustment values for the specified AutoShape or connector.Returns the shape type for the specifiedIShapeobject, which mustrepresent an AutoShape other than a line, freeform drawing, or connector.Returns theIRangeobject that represents the cell that lies underthe lower-right corner of the object.getChart()Returns an object that represents theIChartcontained in this shape.booleanGets whether the specified shape is a connector.Returns theIConnectorFormatobject that contains connectorformatting properties.Gets the associated control.getFill()Returns theIFillFormatobject that contains fill formattingproperties for the specified chart or shape.Gets the formula of the current shape.Returns theIGroupShapesobject that represents the individual shapesin the specified group.booleanReturns information if theIShapecontains a chart.Returns a Hyperlink object that represents the hyperlink for the shape.booleanGets whether the object should be printed.getLine()Returns theILineFormatobject that contains line formattingproperties for the specified shape.booleanGets whether the object is locked (True if the object is locked, False if the object can be modified when the sheet is protected, read or write Boolean).getName()Returns the name of the object.Gets the shape's parent sheet.Returns theIShapeobject that represents the common parent shape ofa child shape or a range of child shapes.Returns theIPictureFormatobject that contains picture formattingproperties for the specified shape.Returns the way the object is attached to the cells below it.doubleReturns the rotation of the shape in degrees.Returns theITextFrameobject that contains the text and font styleproperties for the specified shape.Returns theIThreeDFormatobject that contains 3-D – effectformatting properties for the specified shape.getTitle()Gets the title of the alternative text associated with the specified shape.Returns theIRangeobject that represents the cell that lies underthe upper-left corner of the specified object.getType()Returns the shape type.booleanGets whether the object is visible.intGets the position of the specified shape in the z-order.voidsetAutoShapeType(AutoShapeType value) Sets the shape type for the specifiedIShapeobject, which mustrepresent an AutoShape other than a line, freeform drawing, or connector.voidsetFormula(String formula) Sets the formula of the current shape.voidsetIsPrintable(boolean value) Sets whether the object should be printed.voidsetLocked(boolean value) Sets whether the object is locked (True if the object is locked, False if the object can be modified when the sheet is protected, read or write Boolean).voidSets the name of the object.voidsetPlacement(Placement value) Sets the way the object is attached to the cells below it.voidsetRotation(double value) Sets the rotation of the shape in degrees.voidSets the title of the alternative text associated with the specified shape.voidsetVisible(boolean value) Sets whether the object is visible.voidtoImage(OutputStream stream, ImageType imageType) Saves the shape to the specified image stream.voidtoImage(OutputStream stream, ImageType imageType, ImageSaveOptions options) Saves the shape to the specified image stream.voidSaves the shape to the specified image file.voidtoImage(String fileName, ImageSaveOptions options) Saves the shape to the specified image file using options.toJson()Generates a json string from the shape.ungroup()Ungroups any grouped shapes in the specified shape or range of shapes.voidzOrder(ZOrderType zOrderType) Moves the specified shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order).Methods inherited from interface com.grapecity.documents.excel.drawing.IContainer
getHeight, getHeightInPixel, getLeft, getLeftInPixel, getTop, getTopInPixel, getWidth, getWidthInPixel, setHeight, setHeightInPixel, setLeft, setLeftInPixel, setTop, setTopInPixel, setWidth, setWidthInPixel
-
Method Details
-
getControl
IControl getControl()Gets the associated control.value: The associated control.
nullif the shape is not a control. -
ungroup
IShapeRange ungroup()Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape or range of shapes.- Returns:
- A ShapeRange object that represents the ungrouped shapes.
-
getParent
IWorksheet getParent()Gets the shape's parent sheet. -
getName
String getName()Returns the name of the object. -
setName
Sets the name of the object. -
getTopLeftCell
IRange getTopLeftCell()Returns theIRangeobject that represents the cell that lies underthe upper-left corner of the specified object. -
getBottomRightCell
IRange getBottomRightCell()Returns theIRangeobject that represents the cell that lies underthe lower-right corner of the object. -
getTitle
String getTitle()Gets the title of the alternative text associated with the specified shape. -
setTitle
Sets the title of the alternative text associated with the specified shape. -
getRotation
double getRotation()Returns the rotation of the shape in degrees. -
setRotation
void setRotation(double value) Sets the rotation of the shape in degrees. -
getChart
IChart getChart()Returns an object that represents theIChartcontained in this shape. -
getAutoShapeType
AutoShapeType getAutoShapeType()Returns the shape type for the specifiedIShapeobject, which mustrepresent an AutoShape other than a line, freeform drawing, or connector. -
setAutoShapeType
Sets the shape type for the specifiedIShapeobject, which mustrepresent an AutoShape other than a line, freeform drawing, or connector. -
getConnector
boolean getConnector()Gets whether the specified shape is a connector. -
getConnectorFormat
IConnectorFormat getConnectorFormat()Returns theIConnectorFormatobject that contains connectorformatting properties. Applies toIShapeobjects that representconnectors. -
getFill
IFillFormat getFill()Returns theIFillFormatobject that contains fill formattingproperties for the specified chart or shape. -
getHasChart
boolean getHasChart()Returns information if theIShapecontains a chart. -
getLine
ILineFormat getLine()Returns theILineFormatobject that contains line formattingproperties for the specified shape. -
getParentGroup
IShape getParentGroup()Returns theIShapeobject that represents the common parent shape ofa child shape or a range of child shapes. -
getGroupItems
IGroupShapes getGroupItems()Returns theIGroupShapesobject that represents the individual shapesin the specified group. Use the indexer ofIGroupShapesto return asingle shape from the group. -
getPictureFormat
IPictureFormat getPictureFormat()Returns theIPictureFormatobject that contains picture formattingproperties for the specified shape. -
getTextFrame
ITextFrame getTextFrame()Returns theITextFrameobject that contains the text and font styleproperties for the specified shape. -
getPlacement
Placement getPlacement()Returns the way the object is attached to the cells below it. -
setPlacement
Sets the way the object is attached to the cells below it. -
getThreeD
IThreeDFormat getThreeD()Returns theIThreeDFormatobject that contains 3-D – effectformatting properties for the specified shape. -
getType
ShapeType getType()Returns the shape type. -
getVisible
boolean getVisible()Gets whether the object is visible. -
setVisible
void setVisible(boolean value) Sets whether the object is visible. -
getIsPrintable
boolean getIsPrintable()Gets whether the object should be printed. -
setIsPrintable
void setIsPrintable(boolean value) Sets whether the object should be printed. -
getLocked
boolean getLocked()Gets whether the object is locked (True if the object is locked, False if the object can be modified when the sheet is protected, read or write Boolean). -
setLocked
void setLocked(boolean value) Sets whether the object is locked (True if the object is locked, False if the object can be modified when the sheet is protected, read or write Boolean). -
getZOrderPosition
int getZOrderPosition()Gets the position of the specified shape in the z-order. -
getFormula
String getFormula()Gets the formula of the current shape.- Returns:
- The formula.
-
setFormula
Sets the formula of the current shape.- Parameters:
formula- The formula to set.
-
delete
void delete()Deletes the object. -
duplicate
IShape duplicate()Duplicates the shape and returns a reference to the new copy. -
zOrder
Moves the specified shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order).- Parameters:
zOrderType- Required com.grapecity.documents.excel.drawing.ZOrderType. Specifies where to move the specifiedshape relative to the other shapes.
-
getAdjustments
IAdjustments getAdjustments()Gets a collection of adjustment values for the specified AutoShape or connector. -
getHyperlink
IHyperlink getHyperlink()Returns a Hyperlink object that represents the hyperlink for the shape. -
toImage
Saves the shape to the specified image file.- Parameters:
fileName- The output image file.
-
toImage
Saves the shape to the specified image file using options.- Parameters:
fileName- The output image file.options- The options for output image.
-
toImage
Saves the shape to the specified image stream.- Parameters:
stream- The output image stream.imageType- Specifies the type of image to create.
-
toImage
Saves the shape to the specified image stream.- Parameters:
stream- The output image stream.imageType- Specifies the type of image to create.options- The options for output image.
-
fromJson
Generate a new shape from the json string.- Parameters:
json- the json string represents a shape.
-
toJson
String toJson()Generates a json string from the shape.- Returns:
- the json string
-