All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aspose.cells.ShapeCollection.html Maven / Gradle / Ivy

There is a newer version: 23.1
Show newest version





ShapeCollection




com.aspose.cells
Class ShapeCollection

java.lang.Object
  extended by CollectionBase
      extended by com.aspose.cells.ShapeCollection
All Implemented Interfaces:
java.lang.Iterable

public class ShapeCollection 
extends CollectionBase

Represents all the shape in a worksheet/chart.


Property Getters/Setters Summary
intgetCount()→ inherited from com.aspose.cells.CollectionBase
          
Shapeget(int)
           Gets the shape object at the specific index.
Shapeget(java.lang.String)
           Gets the shape object by the shape image
 
Method Summary
intadd(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
ShapeaddActiveXControl(int type, int topRow, int top, int leftColumn, int left, int width, int height)
           Creates an Activex Control.
ArcShapeaddArc(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a ArcShape to the worksheet.
ShapeaddAutoShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a AutoShape to the worksheet.
ShapeaddAutoShapeInChart(int type, int top, int left, int height, int width)
           Adds a AutoShape to the chart.
ButtonaddButton(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a Button to the worksheet.
CheckBoxaddCheckBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a checkbox to the worksheet.
ComboBoxaddComboBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a ComboBox to the worksheet.
ShapeaddCopy(Shape sourceShape, int upperLeftRow, int top, int upperLeftColumn, int left)
           Adds and copy a shape to the worksheet.
ShapeaddFreeFloatingShape(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.
GroupBoxaddGroupBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a GroupBox to the worksheet.
PictureaddIcons(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] imageByteData, byte[] compatibleImageData)
           Adds svg image.
LabeladdLabel(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a Label to the worksheet.
LabeladdLabelInChart(int top, int left, int height, int width)
           Adds a label to the chart.
LineShapeaddLine(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a LineShape to the worksheet.
PictureaddLinkedPicture(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName)
           Add a linked picture.
ListBoxaddListBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a ListBox to the worksheet.
OleObjectaddOleObject(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] imageData)
          
OleObjectaddOleObjectWithLinkedImage(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName)
           Add a linked picture.
OvaladdOval(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a Oval to the worksheet.
PictureaddPicture(int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn, java.io.InputStream stream)
           Adds a picture to the collection.
PictureaddPicture(int upperLeftRow, int upperLeftColumn, java.io.InputStream stream, int widthScale, int heightScale)
           Adds a picture to the collection.
PictureaddPictureInChart(int top, int left, java.io.InputStream stream, int widthScale, int heightScale)
           Adds a picture to the chart.
RadioButtonaddRadioButton(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a RadioButton to the worksheet.
RectangleShapeaddRectangle(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a RectangleShape to the worksheet.
ScrollBaraddScrollBar(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a ScrollBar to the worksheet.
ShapeaddShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a Shape to the worksheet.
ShapeaddShapeInChart(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.
ShapeaddShapeInChart(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.
ShapeaddShapeInChartByScale(int type, int placement, double left, double top, double right, double bottom)
           Add a shape to chart. All unit is percent scale of chart area.
ShapeaddShapeInChartByScale(int type, int placement, double left, double top, double right, double bottom, byte[] imageData)
           Add a shape to chart .All unit is 1/4000 of chart area.
SpinneraddSpinner(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a Spinner to the worksheet.
PictureaddSvg(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] svgData, byte[] compatibleImageData)
           Adds svg image.
TextBoxaddTextBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a text box to the worksheet.
TextBoxaddTextBoxInChart(int top, int left, int height, int width)
           Adds a textbox to the chart.
ShapeaddTextEffect(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.
ShapeaddTextEffectInChart(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
ShapeaddWordArt(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
voidclear()
           Clear all shapes.
booleancontains(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
voidcopyCommentsInRange(ShapeCollection shapes, CellArea ca, int destRow, int destColumn)
           Copy all comments in the range.
voidcopyInRange(ShapeCollection sourceShapes, CellArea ca, int destRow, int destColumn, boolean isContained)
           Copy shapes in the range to destination range.
voiddeleteInRange(CellArea ca)
           Delete shapes in the range.Comment shapes will not be deleted.
voiddeleteShape(Shape shape)
           Delete a shape. If the shape is in the group or is a comment shape, it will not be deleted.
GroupShapegroup(com.aspose.cells.Shape[] groupItems)
           Group the shapes.
intindexOf(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
java.util.Iteratoriterator()→ inherited from com.aspose.cells.CollectionBase
          
voidremove(Shape shape)
           Remove the shape.
voidremoveAt(int index)
           Remove the shape.
voidungroup(GroupShape group)
           Ungroups the shape items.
voidupdateSelectedValue()
           Update the selected value by the value of the linked cell of the shapes.
 

Property Getters/Setters Detail

getCount

→ inherited from com.aspose.cells.CollectionBase
public int getCount()

get

public Shape get(int index)
Gets the shape object at the specific index.
Parameters:
index -
Returns:

get

public Shape get(java.lang.String name)
Gets the shape object by the shape image
Parameters:
name -
Returns:

Method Detail

addCopy

public Shape addCopy(Shape sourceShape, int upperLeftRow, int top, int upperLeftColumn, int left)
             throws java.lang.Exception
Adds and copy a shape to the worksheet.
Parameters:
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.
Returns:
The new shape object index.

addCheckBox

public CheckBox addCheckBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a checkbox to the worksheet.
Parameters:
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.
height - Height of textbox, in unit of pixel.
width - Width of textbox, in unit of pixel.
Returns:
The new CheckBox object index.

addTextBox

public TextBox addTextBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a text box to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of textbox 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.
height - Represents the height of textbox, in unit of pixel.
width - Represents the width of textbox, in unit of pixel.
Returns:
A TextBox object.

addSpinner

public Spinner addSpinner(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a Spinner to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of Spinner from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of Spinner from its left column, in unit of pixel.
height - Represents the height of Spinner, in unit of pixel.
width - Represents the width of Spinner, in unit of pixel.
Returns:
A Spinner object.

addScrollBar

public ScrollBar addScrollBar(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a ScrollBar to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of ScrollBar from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of ScrollBar from its left column, in unit of pixel.
height - Represents the height of ScrollBar, in unit of pixel.
width - Represents the width of ScrollBar, in unit of pixel.
Returns:
A ScrollBar object.

addRadioButton

public RadioButton addRadioButton(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a RadioButton to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of RadioButton from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of RadioButton from its left column, in unit of pixel.
height - Represents the height of RadioButton, in unit of pixel.
width - Represents the width of RadioButton, in unit of pixel.
Returns:
A RadioButton object.

addListBox

public ListBox addListBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a ListBox to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of ListBox from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of ListBox from its left column, in unit of pixel.
height - Represents the height of ListBox, in unit of pixel.
width - Represents the width of ListBox, in unit of pixel.
Returns:
A ListBox object.

addComboBox

public ComboBox addComboBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a ComboBox to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of ComboBox from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of ComboBox from its left column, in unit of pixel.
height - Represents the height of ComboBox, in unit of pixel.
width - Represents the width of ComboBox, in unit of pixel.
Returns:
A ComboBox object.

addGroupBox

public GroupBox addGroupBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a GroupBox to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of GroupBox from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of GroupBox from its left column, in unit of pixel.
height - Represents the height of GroupBox, in unit of pixel.
width - Represents the width of GroupBox, in unit of pixel.
Returns:
A GroupBox object.

addButton

public Button addButton(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a Button to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of Button from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of Button from its left column, in unit of pixel.
height - Represents the height of Button, in unit of pixel.
width - Represents the width of Button, in unit of pixel.
Returns:
A Button object.

addLabel

public Label addLabel(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a Label to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of Label from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of Label from its left column, in unit of pixel.
height - Represents the height of Label, in unit of pixel.
width - Represents the width of Label, in unit of pixel.
Returns:
A Label object.

addLabelInChart

public Label addLabelInChart(int top, int left, int height, int width)
Adds a label to the chart.
Parameters:
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.
Returns:
A new Label object.

addTextBoxInChart

public TextBox addTextBoxInChart(int top, int left, int height, int width)
Adds a textbox to the chart.
Parameters:
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.
Returns:
A TextBox object.

addTextEffectInChart

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)
Inserts a WordArt object to the chart
Parameters:
effect - A MsoPresetTextEffect value. The mso preset text effect type.
text - The WordArt text.
fontName - The font name.
size - The font size
fontBold - 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.
Returns:
Returns a Shape object that represents the new WordArt object.

addTextEffect

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)
Inserts a WordArt object.
Parameters:
effect - A MsoPresetTextEffect value. The mso preset text effect type.
text - The WordArt text.
fontName - The font name.
size - The font size
fontBold - 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.
Returns:
Returns a Shape object that represents the new WordArt object.

addWordArt

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
Adds preset WordArt since Excel 2007.s
Parameters:
style - A PresetWordArtStyle value. The preset WordArt Style.
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.
Returns:

addRectangle

public RectangleShape addRectangle(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a RectangleShape to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of RectangleShape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of RectangleShape from its left column, in unit of pixel.
height - Represents the height of RectangleShape, in unit of pixel.
width - Represents the width of RectangleShape, in unit of pixel.
Returns:
A RectangleShape object.

addOval

public Oval addOval(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a Oval to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of Oval from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of Oval from its left column, in unit of pixel.
height - Represents the height of Oval, in unit of pixel.
width - Represents the width of Oval, in unit of pixel.
Returns:
A Oval object.

addLine

public LineShape addLine(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a LineShape to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of LineShape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of LineShape from its 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.
Returns:
A LineShape object.

addFreeFloatingShape

public 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.
Parameters:
type - A MsoDrawingType value. The shape type.
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.
Returns:

addShapeInChart

public 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.
Parameters:
type - A MsoDrawingType value. The drawing type.
placement - A PlacementType value. the placement type.
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.

addShapeInChart

public 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.
Parameters:
type - A MsoDrawingType value. The drawing type.
placement - A PlacementType value. the placement type.
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.

addShapeInChartByScale

public Shape addShapeInChartByScale(int type, int placement, double left, double top, double right, double bottom)
Add a shape to chart. All unit is percent scale of chart area.
Parameters:
type - A MsoDrawingType value. The drawing type.
placement - A PlacementType value. the placement type.
left - Unit is percent scale of chart area width.
top - Unit is percent scale of chart area height.
right - Unit is percent scale of chart area width.
bottom - Unit is percent scale of chart area height.

addShapeInChartByScale

public Shape addShapeInChartByScale(int type, int placement, double left, double top, double right, double bottom, byte[] imageData)
Add a shape to chart .All unit is 1/4000 of chart area.
Parameters:
type - A MsoDrawingType value. The drawing type.
placement - A PlacementType value. the placement type.
left - Unit is percent scale of chart area width.
top - Unit is percent scale of chart area height.
right - Unit is percent scale of chart area width.
bottom - Unit is percent scale of chart area height.
imageData - If the shape is not a picture or ole object,imageData should be null.

addArc

public ArcShape addArc(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a ArcShape to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of ArcShape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of ArcShape from its left column, in unit of pixel.
height - Represents the height of ArcShape, in unit of pixel.
width - Represents the width of ArcShape, in unit of pixel.
Returns:
A ArcShape object.

addShape

public Shape addShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a Shape to the worksheet. The type could not be Chart/Comment/Picture/OleObject/Polygon/DialogBox
Parameters:
type - A MsoDrawingType value. Mso drawing type.
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.
Returns:
A Shape object.

addAutoShape

public Shape addAutoShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a AutoShape to the worksheet. The type could not be Chart/Comment/Picture/OleObject/Polygon/DialogBox
Parameters:
type - A AutoShapeType value. Auto shape type.
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.
Returns:
A Shape object.

addAutoShapeInChart

public Shape addAutoShapeInChart(int type, int top, int left, int height, int width)
Adds a AutoShape to the chart. The type could not be Chart/Comment/Picture/OleObject/Polygon/DialogBox
Parameters:
type - A AutoShapeType value. Auto shape type.
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.
Returns:
Returns a shape object.

addActiveXControl

public Shape addActiveXControl(int type, int topRow, int top, int leftColumn, int left, int width, int height)
                       throws java.lang.Exception
Creates an Activex Control.
Parameters:
type - A ControlType value. The type of the control.
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.
Returns:

addPicture

public Picture addPicture(int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn, java.io.InputStream stream)
Adds a picture to the collection.
Parameters:
upperLeftRow - Upper left row index.
upperLeftColumn - Upper left column index.
lowerRightRow - Lower right row index
lowerRightColumn - Lower right column index
stream - Stream object which contains the image data.
Returns:
Picture Picture object.

addPicture

public Picture addPicture(int upperLeftRow, int upperLeftColumn, java.io.InputStream stream, int widthScale, int heightScale)
                  throws java.lang.Exception
Adds a picture to the collection.
Parameters:
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.
Returns:
Picture Picture object.

addSvg

public Picture addSvg(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] svgData, byte[] compatibleImageData)
              throws java.lang.Exception
Adds svg image.
Parameters:
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.
Returns:

addIcons

public Picture addIcons(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] imageByteData, byte[] compatibleImageData)
                throws java.lang.Exception
Adds svg image.
Parameters:
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.
imageByteData - The image byte data.
compatibleImageData - Converted image data from svg in order to be compatible with Excel 2016 or lower versions.
Returns:

addLinkedPicture

public Picture addLinkedPicture(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName)
Add a linked picture.
Parameters:
upperLeftRow - Upper left row index.
upperLeftColumn - Upper left column index.
height - The height of the shape. In unit of pixels
width - The width of the shape. In unit of pixels
sourceFullName - The path and name of the source file for the linked image
Returns:
Picture Picture object.

addOleObjectWithLinkedImage

public OleObject addOleObjectWithLinkedImage(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName)
Add a linked picture.
Parameters:
upperLeftRow - Upper left row index.
upperLeftColumn - Upper left column index.
height - The height of the shape. In unit of pixels
width - The width of the shape. In unit of pixels
sourceFullName - The path and name of the source file for the linked image
Returns:
Picture Picture object.

addPictureInChart

public Picture addPictureInChart(int top, int left, java.io.InputStream stream, int widthScale, int heightScale)
Adds a picture to the chart.
Parameters:
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.
Returns:
Returns a Picture object.

addOleObject

public OleObject addOleObject(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] imageData)
Parameters:
upperLeftRow -
top -
upperLeftColumn -
left -
height -
width -
imageData -
Returns:

copyCommentsInRange

public void copyCommentsInRange(ShapeCollection shapes, CellArea ca, int destRow, int destColumn)
                        throws java.lang.Exception
Copy all comments in the range.
Parameters:
shapes - The source shapes.
ca - The source range.
destRow - The dest range start row.
destColumn - The dest range start column.

copyInRange

public void copyInRange(ShapeCollection sourceShapes, CellArea ca, int destRow, int destColumn, boolean isContained)
                throws java.lang.Exception
Copy shapes in the range to destination range.
Parameters:
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.

deleteInRange

public void deleteInRange(CellArea ca)
Delete shapes in the range.Comment shapes will not be deleted.
Parameters:
ca - The range.If the shapes are contained in the range, they will be removed.

deleteShape

public void deleteShape(Shape shape)
Delete a shape. If the shape is in the group or is a comment shape, it will not be deleted.
Parameters:
shape -

group

public GroupShape group(com.aspose.cells.Shape[] groupItems)
Group the shapes. The shape in the groupItems should not be grouped. The shape must be in this Shapes collection.
Parameters:
groupItems - the group items.
Returns:
Return the group shape.

ungroup

public void ungroup(GroupShape group)
            throws java.lang.Exception
Ungroups the shape items. If the group shape is grouped by another group shape,nothing will be done.
Parameters:
group - The group shape.

removeAt

public void removeAt(int index)
Remove the shape.
Parameters:
index - The index of the shape.

remove

public void remove(Shape shape)
Remove the shape.
Parameters:
shape -

clear

public void clear()
Clear all shapes.

updateSelectedValue

public void updateSelectedValue()
                        throws java.lang.Exception
Update the selected value by the value of the linked cell of the shapes.

iterator

→ inherited from com.aspose.cells.CollectionBase
public java.util.Iterator iterator()

contains

→ inherited from com.aspose.cells.CollectionBase
public boolean contains(java.lang.Object value)
Reserved for internal use.

add

→ inherited from com.aspose.cells.CollectionBase
public int add(java.lang.Object value)
Reserved for internal use.

indexOf

→ inherited from com.aspose.cells.CollectionBase
public int indexOf(java.lang.Object value)
Reserved for internal use.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy