public class ShapeCollection
Property Getters/Setters Summary | ||
---|---|---|
int | getCount() | |
Shape | get(int index) | |
Gets the shape object at the specific index.
|
||
Shape | get(java.lang.String name) | |
Gets the shape object by the shape image
|
Method Summary | ||
---|---|---|
int | add(java.lang.Object value) | |
Reserved for internal use. |
||
Shape | addActiveXControl(int type, int topRow, int top, int leftColumn, int left, int width, int height) | |
Creates an Activex Control.
|
||
Shape | addAutoShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width) | |
Adds a AutoShape to the worksheet.
|
||
Shape | addAutoShapeInChart(int type, int top, int left, int height, int width) | |
Adds a AutoShape to the chart.
|
||
Shape | addCopy(Shape sourceShape, int upperLeftRow, int top, int upperLeftColumn, int left) | |
Adds and copy a shape to the worksheet..
|
||
Shape | addFreeFloatingShape(int type, int top, int left, int height, int width, byte[] imageData, boolean isOriginalSize) | |
Adds a free floating shape to the worksheet.Only applies for line/image shape.
|
||
Label | addLabelInChart(int top, int left, int height, int width) | |
Adds a label to the chart.
|
||
Picture | addLinkedPicture(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName) | |
Add a linked picture.
|
||
OleObject | addOleObject(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] imageData) | |
OleObject | addOleObjectWithLinkedImage(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName) | |
Add a linked picture.
|
||
Picture | addPicture(int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn, java.io.InputStream stream) | |
Adds a picture to the collection.
|
||
Picture | addPicture(int upperLeftRow, int upperLeftColumn, java.io.InputStream stream, int widthScale, int heightScale) | |
Adds a picture to the collection.
|
||
Picture | addPictureInChart(int top, int left, java.io.InputStream stream, int widthScale, int heightScale) | |
Adds a picture to the chart.
|
||
Shape | addShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width) | |
Adds a Shape to the worksheet.
|
||
Shape | addShapeInChart(int type, int placement, int left, int top, int right, int bottom) | |
Add a shape to chart .All unit is 1/4000 of chart area.
|
||
Shape | addShapeInChart(int type, int placement, int left, int top, int right, int bottom, byte[] imageData) | |
Add a shape to chart .All unit is 1/4000 of chart area.
|
||
Picture | addSvg(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] svgData, byte[] compatibleImageData) | |
Adds svg image.
|
||
TextBox | addTextBoxInChart(int top, int left, int height, int width) | |
Adds a textbox to the chart.
|
||
Shape | addTextEffect(int effect, java.lang.String text, java.lang.String fontName, int size, boolean fontBold, boolean fontItalic, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width) | |
Inserts a WordArt object.
|
||
Shape | addTextEffectInChart(int effect, java.lang.String text, java.lang.String fontName, int size, boolean fontBold, boolean fontItalic, int top, int left, int height, int width) | |
Inserts a WordArt object to the chart
|
||
Shape | addWordArt(int style, java.lang.String text, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width) | |
Adds preset WordArt since Excel 2007.s
|
||
void | clear() | |
Clear all shapes.
|
||
boolean | contains(java.lang.Object value) | |
Reserved for internal use. |
||
void | copyCommentsInRange(ShapeCollection shapes, CellArea ca, int destRow, int destColumn) | |
Copy all comments in the range.
|
||
void | copyInRange(ShapeCollection sourceShapes, CellArea ca, int destRow, int destColumn, boolean isContained) | |
Copy shapes in the range to destination range.
|
||
void | deleteInRange(CellArea ca) | |
Delete shapes in the range.Comment shapes will not be deleted.
|
||
void | deleteShape(Shape shape) | |
Delete a shape. If the shape is in the group or is a comment shape, it will not be deleted.
|
||
GroupShape | group(com.aspose.cells.Shape[] groupItems) | |
Group the shapes.
|
||
int | indexOf(java.lang.Object value) | |
Reserved for internal use. |
||
java.util.Iterator | iterator() | |
void | remove(Shape shape) | |
Remove the shape.
|
||
void | removeAt(int index) | |
Remove the shape.
|
||
void | ungroup(GroupShape group) | |
Ungroups the shape items.
|
||
void | updateSelectedValue() | |
Update the selected value by the value of the linked cell of the shapes.
|
public int getCount()
public Shape get(int index)
index
- public Shape get(java.lang.String name)
name
- public Shape addCopy(Shape sourceShape, int upperLeftRow, int top, int upperLeftColumn, int left) throws java.lang.Exception
sourceShape
- Source shape.upperLeftRow
- Upper left row index.top
- Represents the vertical offset of checkbox from its left row, in unit of pixel. upperLeftColumn
- Upper left column index.left
- Represents the horizontal offset of textbox from its left column, in unit of pixel. public Label addLabelInChart(int top, int left, int height, int width)
top
- Represents the vertical offset of label from the upper left corner in units of 1/4000 of the chart area. left
- Represents the vertical offset of label from the upper left corner in units of 1/4000 of the chart area.height
- Represents the height of label, in units of 1/4000 of the chart area.width
- Represents the width of label, in units of 1/4000 of the chart area.public TextBox addTextBoxInChart(int top, int left, int height, int width)
top
- Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area. left
- Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area.height
- Represents the height of textbox, in units of 1/4000 of the chart area.width
- Represents the width of textbox, in units of 1/4000 of the chart area.public Shape addTextEffectInChart(int effect, java.lang.String text, java.lang.String fontName, int size, boolean fontBold, boolean fontItalic, int top, int left, int height, int width)
effect
- A text
- The WordArt text.fontName
- The font name.size
- The font sizefontBold
- Indicates whether font is bold.fontItalic
- Indicates whether font is italic.top
- Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area. left
- Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area.height
- Represents the height of shape, in units of 1/4000 of the chart area.width
- Represents the width of shape, in units of 1/4000 of the chart area.public Shape addTextEffect(int effect, java.lang.String text, java.lang.String fontName, int size, boolean fontBold, boolean fontItalic, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
effect
- A text
- The WordArt text.fontName
- The font name.size
- The font sizefontBold
- Indicates whether font is bold.fontItalic
- Indicates whether font is italic.upperLeftRow
- Upper left row index.top
- Represents the vertical offset of shape from its left row, in unit of pixel. upperLeftColumn
- Upper left column index.left
- Represents the horizontal offset of shape from its left column, in unit of pixel. height
- Represents the height of shape, in unit of pixel. width
- Represents the width of shape, in unit of pixel. public Shape addWordArt(int style, java.lang.String text, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width) throws java.lang.Exception
style
- A text
- The text.upperLeftRow
- Upper left row index.top
- Represents the vertical offset of shape from its left row, in unit of pixel. upperLeftColumn
- Upper left column index.left
- Represents the horizontal offset of shape from its left column, in unit of pixel. height
- Represents the height of shape, in unit of pixel. width
- Represents the width of shape, in unit of pixel. public Shape addFreeFloatingShape(int type, int top, int left, int height, int width, byte[] imageData, boolean isOriginalSize)
type
- A top
- Represents the vertical offset of shape from the worksheet's top row, in unit of pixel.left
- Represents the horizontal offset of shape from the worksheet's left column, in unit of pixel.height
- Represents the height of LineShape, in unit of pixel. width
- Represents the width of LineShape, in unit of pixel. imageData
- The image data,only applies for the picture.isOriginalSize
- Whether the shape use original size if the shape is image.public Shape addShapeInChart(int type, int placement, int left, int top, int right, int bottom, byte[] imageData)
type
- A placement
- A left
- In unit of 1/4000 chart area width.top
- In unit of 1/4000 chart area height.right
- In unit of 1/4000 chart area width.bottom
- In unit of 1/4000 chart area height.imageData
- If the shape is not a picture or ole object,imageData should be null.public Shape addShapeInChart(int type, int placement, int left, int top, int right, int bottom)
type
- A placement
- A left
- In unit of 1/4000 chart area width.top
- In unit of 1/4000 chart area height.right
- In unit of 1/4000 chart area width.bottom
- In unit of 1/4000 chart area height.public Shape addShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width) throws java.lang.Exception
type
- A upperLeftRow
- Upper left row index.top
- Represents the vertical offset of Shape from its left row, in unit of pixel. upperLeftColumn
- Upper left column index.left
- Represents the horizontal offset of Shape from its left column, in unit of pixel. height
- Represents the height of Shape, in unit of pixel. width
- Represents the width of Shape, in unit of pixel. public Shape addAutoShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
type
- A upperLeftRow
- Upper left row index.top
- Represents the vertical offset of Shape from its left row, in unit of pixel. upperLeftColumn
- Upper left column index.left
- Represents the horizontal offset of Shape from its left column, in unit of pixel. height
- Represents the height of Shape, in unit of pixel. width
- Represents the width of Shape, in unit of pixel. public Shape addAutoShapeInChart(int type, int top, int left, int height, int width)
type
- A top
- Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area. left
- Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area.height
- Represents the height of textbox, in units of 1/4000 of the chart area.width
- Represents the width of textbox, in units of 1/4000 of the chart area.public Shape addActiveXControl(int type, int topRow, int top, int leftColumn, int left, int width, int height) throws java.lang.Exception
type
- A topRow
- Upper left row index.top
- Represents the vertical offset of Shape from its left row, in unit of pixel. leftColumn
- Upper left column index.left
- Represents the horizontal offset of Shape from its left column, in unit of pixel. height
- Represents the height of Shape, in unit of pixel. width
- Represents the width of Shape, in unit of pixel. public Picture addPicture(int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn, java.io.InputStream stream)
upperLeftRow
- Upper left row index.upperLeftColumn
- Upper left column index.lowerRightRow
- Lower right row indexlowerRightColumn
- Lower right column indexstream
- Stream object which contains the image data.public Picture addPicture(int upperLeftRow, int upperLeftColumn, java.io.InputStream stream, int widthScale, int heightScale)
upperLeftRow
- Upper left row index.upperLeftColumn
- Upper left column index.stream
- Stream object which contains the image data.widthScale
- Scale of image width, a percentage.heightScale
- Scale of image height, a percentage.public Picture addSvg(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] svgData, byte[] compatibleImageData)
upperLeftRow
- Upper left row index.top
- Represents the vertical offset of shape from its left row, in unit of pixel. upperLeftColumn
- Upper left column index.left
- The horizontal offset of shape from its left column, in unit of pixel. height
- The height of shape, in unit of pixel. width
- The width of shape, in unit of pixel. svgData
- The svg image data.compatibleImageData
- Converted image data from svg in order to be compatible with Excel 2016 or lower versions.public Picture addLinkedPicture(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName)
upperLeftRow
- Upper left row index.upperLeftColumn
- Upper left column index.height
- The height of the shape. In unit of pixelswidth
- The width of the shape. In unit of pixelssourceFullName
-
The path and name of the source file for the linked imagepublic OleObject addOleObjectWithLinkedImage(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName)
upperLeftRow
- Upper left row index.upperLeftColumn
- Upper left column index.height
- The height of the shape. In unit of pixelswidth
- The width of the shape. In unit of pixelssourceFullName
-
The path and name of the source file for the linked imagepublic Picture addPictureInChart(int top, int left, java.io.InputStream stream, int widthScale, int heightScale)
top
- Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area. left
- Represents the horizontal offset of shape from the upper left corner in units of 1/4000 of the chart area.stream
- Stream object which contains the image data.widthScale
- Scale of image width, a percentage.heightScale
- Scale of image height, a percentage.public OleObject addOleObject(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] imageData)
upperLeftRow
- top
- upperLeftColumn
- left
- height
- width
- imageData
- public void copyCommentsInRange(ShapeCollection shapes, CellArea ca, int destRow, int destColumn) throws java.lang.Exception
shapes
- The source shapes.ca
- The source range.destRow
- The dest range start row.destColumn
- The dest range start column.public void copyInRange(ShapeCollection sourceShapes, CellArea ca, int destRow, int destColumn, boolean isContained) throws java.lang.Exception
sourceShapes
- Source shapes.ca
- The source range.destRow
- The dest row index of the dest range.destColumn
- The dest column of the dest range.isContained
- Whether only copy the shapes which are contained in the range.
If true,only copies the shapes in the range.
Otherwise,it works as MS Office.public void deleteInRange(CellArea ca)
ca
- The range.If the shapes are contained in the range, they will be removed.public void deleteShape(Shape shape)
shape
- public GroupShape group(com.aspose.cells.Shape[] groupItems)
groupItems
- the group items.public void ungroup(GroupShape group) throws java.lang.Exception
group
- The group shape.public void removeAt(int index)
index
- The index of the shape.public void remove(Shape shape)
shape
- public void clear()
public void updateSelectedValue() throws java.lang.Exception
public java.util.Iterator iterator()
public boolean contains(java.lang.Object value)
public int add(java.lang.Object value)
public int indexOf(java.lang.Object value)