com.aspose.cells

Class GroupShape

  • java.lang.Object
    • Shape
      • com.aspose.cells.GroupShape
public class GroupShape 
extends Shape

Represents the individual shapes within a grouped shape.

Example:

//Instantiate a new Workbook.
Workbook excelbook = new Workbook();

//Add a group box to the first worksheet.
GroupBox box = excelbook.getWorksheets().get(0).getShapes().addGroupBox(1, 0, 1, 0, 300, 250);

//Set the caption of the group box.
box.setText("Age Groups");
box.setPlacement(PlacementType.FREE_FLOATING);

//Make it 2-D box.
box.setShadow(false);

//Add a radio button.
RadioButton radio1 = excelbook.getWorksheets().get(0).getShapes().addRadioButton(3, 0, 2, 0, 30, 110);

//Set its text string.
radio1.setText("20-29");

//Set A1 cell as a linked cell for the radio button.
radio1.setLinkedCell("A1");

//Make the radio button 3-D.
radio1.setShadow(true);

//Set the foreground color of the radio button.
radio1.getFillFormat().setForeColor(Color.getLightGreen());

//Set the line style of the radio button.
radio1.getLineFormat().setStyle(MsoLineStyle.THICK_THIN);

//Set the weight of the radio button.
radio1.getLineFormat().setWeight(4);

//Set the line color of the radio button.
radio1.getLineFormat().setForeColor(Color.getBlue());

//Set the dash style of the radio button.
radio1.getLineFormat().setDashStyle(MsoLineDashStyle.SOLID);

//Make the line format visible.
radio1.getLineFormat().setVisible(true);

//Make the fill format visible.
radio1.getFillFormat().setVisible(true);

//Add another radio button.
RadioButton radio2 = excelbook.getWorksheets().get(0).getShapes().addRadioButton(6, 0, 2, 0, 30, 110);

//Set its text string.
radio2.setText("30-39");

//Set A1 cell as a linked cell for the radio button.
radio2.setLinkedCell("A1");

//Make the radio button 3-D.
radio2.setShadow(true);

//Set the foreground color of the radio button.
radio2.getFillFormat().setForeColor(Color.getLightGreen());

//Set the line style of the radio button.
radio2.getLineFormat().setStyle(MsoLineStyle.THICK_THIN);

//Set the weight of the radio button.
radio2.getLineFormat().setWeight(4);

//Set the line color of the radio button.
radio2.getLineFormat().setForeColor(Color.getBlue());

//Set the dash style of the radio button.
radio2.getLineFormat().setDashStyle(MsoLineDashStyle.SOLID);

//Make the line format visible.
radio2.getLineFormat().setVisible(true);

//Make the fill format visible.
radio2.getFillFormat().setVisible(true);

//Add another radio button.
RadioButton radio3 = excelbook.getWorksheets().get(0).getShapes().addRadioButton(9, 0, 2, 0, 30, 110);

//Set its text string.
radio3.setText("40-49");

//Set A1 cell as a linked cell for the radio button.
radio3.setLinkedCell("A1");

//Make the radio button 3-D.
radio3.setShadow(true);

//Set the foreground color of the radio button.
radio3.getFillFormat().setForeColor(Color.getLightGreen());

//Set the line style of the radio button.
radio3.getLineFormat().setStyle(MsoLineStyle.THICK_THIN);

//Set the weight of the radio button.
radio3.getLineFormat().setWeight(4);

//Set the line color of the radio button.
radio3.getLineFormat().setForeColor(Color.getBlue());

//Set the dash style of the radio button.
radio3.getLineFormat().setDashStyle(MsoLineDashStyle.SOLID);

//Make the line format visible.
radio3.getLineFormat().setVisible(true);

//Make the fill format visible.
radio3.getFillFormat().setVisible(true);

//Get the shapes.
Shape[] shapeobjects = new Shape[] { box, radio1, radio2, radio3 };

//Group the shapes.
GroupShape group = excelbook.getWorksheets().get(0).getShapes().group(shapeobjects);

//Save the excel file.
excelbook.save("d:\\test\\groupshapes.xls");

Property Getters/Setters Summary
ActiveXControlgetActiveXControl()
Gets the ActiveX control.
intgetActualLowerRightRow()
Get the actual bottom row.
java.lang.StringgetAlternativeText()
void
setAlternativeText(java.lang.Stringvalue)
Returns or sets the descriptive (alternative) text string of the Shape object.
intgetAutoShapeType()
void
Gets the auto shape type. The value of the property is AutoShapeType integer constant.
intgetBottom()
void
setBottom(intvalue)
Represents the width of the shape's vertical offset from its lower bottom corner row, in unit of pixels.
byte[]getControlData()
Gets the data of control.
FillFormatgetFill()
Returns a FillFormat object that contains fill formatting properties for the specified shape.
MsoFillFormatgetFillFormat()
Returns a MsoFillFormat object that contains fill formatting properties for the specified shape.
FontgetFont()
void
setFont(Font value)
Represents the font of shape.
ShapeFormatgetFormat()
Represents the setting of the shape's formatting.
MsoFormatPicturegetFormatPicture()
Gets and sets the options of the picture format.
GeometrygetGeometry()
Gets the geometry
GlowEffectgetGlow()
Represents a object that specifies glow effect for the chart element or shape.
GroupShapegetGroup()
Gets the group shape which contains this shape.
booleanhasLine()
void
setHasLine(booleanvalue)
Gets and sets the line border of the shape is visible.
intgetHeight()
void
setHeight(intvalue)
Represents the height of shape, in unit of pixel.
doublegetHeightCM()
void
setHeightCM(doublevalue)
Represents the height of the shape, in unit of inches.
doublegetHeightInch()
void
setHeightInch(doublevalue)
Represents the height of the shape, in unit of inches.
intgetHeightInChart()
void
Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape..
intgetHeightInShape()
void
Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape..
doublegetHeightPt()
void
setHeightPt(doublevalue)
Represents the height of the shape, in unit of points.
intgetHeightScale()
void
setHeightScale(intvalue)
Gets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the HeightScale property only returns 100;
java.lang.StringgetHtmlText()
void
setHtmlText(java.lang.Stringvalue)
Gets and sets the html string which contains data and some formats in this textbox.
HyperlinkgetHyperlink()
Gets the hyperlink of the shape.
intgetId()
Gets the identifier of this shape.
java.lang.StringgetInputRange()
void
setInputRange(java.lang.Stringvalue)
Gets or sets the worksheet range used to fill the specified combo box.
booleanisFilled()
void
setFilled(booleanvalue)
Indicates whether the fill format is visible.
booleanisFlippedHorizontally()
void
Gets and sets whether shape is horizontally flipped .
booleanisFlippedVertically()
void
setFlippedVertically(booleanvalue)
Gets and sets whether shape is vertically flipped .
booleanisGroup()
Indicates whether the shape is a group.
booleanisHidden()
void
setHidden(booleanvalue)
Indicates whether the object is visible.
booleanisLockAspectRatio()
void
setLockAspectRatio(booleanvalue)
True means that don't allow changes in aspect ratio.
booleanisLocked()
void
setLocked(booleanvalue)
True if the object is locked, False if the object can be modified when the sheet is protected.
booleanisPrintable()
void
setPrintable(booleanvalue)
True if the object is printable
booleanisPrinted()
void
setPrinted(booleanvalue)
True if the object is printable
booleanisRichText()
Whether or not the text is rich text.
booleanisTextWrapped()
void
setTextWrapped(booleanvalue)
Gets and sets the text wrapped type of the shape which contains text.
booleanisWordArt()
Indicates whether this shape is a word art.
intgetLeft()
void
setLeft(intvalue)
Represents the horizontal offset of shape from its left column, in unit of pixels.
doublegetLeftCM()
void
setLeftCM(doublevalue)
Represents the horizontal offset of shape from its left column, in unit of centimeters.
doublegetLeftInch()
void
setLeftInch(doublevalue)
Represents the horizontal offset of shape from its left column, in unit of inches.
intgetLeftInChart()
void
setLeftInChart(intvalue)
Represents the vertical offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape.
intgetLeftInShape()
void
setLeftInShape(intvalue)
Represents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape.
intgetLeftToCorner()
void
setLeftToCorner(intvalue)
Gets and sets the horizonal offset of shape from worksheet left border.
LineFormatgetLine()
Gets line style
MsoLineFormatgetLineFormat()
Returns a MsoLineFormat object that contains line formatting properties for the specified shape.
java.lang.StringgetLinkedCell()
void
setLinkedCell(java.lang.Stringvalue)
Gets or sets the worksheet range linked to the control's value.
intgetLowerDeltaX()
void
setLowerDeltaX(intvalue)
Gets or sets the shape's horizontal offset from its lower right corner column. The range of value is 0 to 1024.
intgetLowerDeltaY()
void
setLowerDeltaY(intvalue)
Gets or sets the shape's vertical offset from its lower right corner row. The range of value is 0 to 256.
intgetLowerRightColumn()
void
Represents lower right corner column index.
intgetLowerRightRow()
void
Represents lower right corner row index.
java.lang.StringgetMacroName()
void
setMacroName(java.lang.Stringvalue)
Gets and sets the name of macro.
intgetMsoDrawingType()
Gets and sets mso drawing type. The value of the property is MsoDrawingType integer constant.
java.lang.StringgetName()
void
setName(java.lang.Stringvalue)
Gets and sets the name of the shape.
ShapePathCollectiongetPaths()
Gets the paths of a custom geometric shape.
intgetPlacement()
void
setPlacement(intvalue)
Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet. The value of the property is PlacementType integer constant.
intgetPositionX()
void
setPositionX(intvalue)
Gets and sets the horizonal offset of shape from worksheet left border,in unit of pixels.
intgetPositionY()
void
setPositionY(intvalue)
Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
ReflectionEffectgetReflection()
Represents a object that specifies reflection effect for the chart element or shape.
booleangetRelativeToOriginalPictureSize()
void
Indicates whether shape is relative to original picture size.
intgetRight()
void
setRight(intvalue)
Represents the width of the shape's horizontal offset from its lower right corner column, in unit of pixels.
intgetRotation()
void
setRotation(intvalue)
Gets and sets the rotation of the shape.
doublegetRotationAngle()
void
setRotationAngle(doublevalue)
Gets and sets the rotation of the shape.
ShadowEffectgetShadowEffect()
Represents a object that specifies shadow effect for the chart element or shape.
doublegetSoftEdges()
void
setSoftEdges(doublevalue)
Gets and sets the radius of blur to apply to the edges, in unit of points.
java.lang.StringgetSpid()
Specifies an optional string that an application can use to Identify the particular shape.
intgetSpt()
Specifies an optional number that an application can use to associate the particular shape with a defined shape type.
java.lang.StringgetText()
void
setText(java.lang.Stringvalue)
Represents the string in this TextBox object.
FontSettingCollectiongetTextBody()
Gets and ses the setting of the shape's text.
intgetTextDirection()
void
Gets/Sets the direction of the text flow for this object. The value of the property is TextDirectionType integer constant.
TextEffectFormatgetTextEffect()
Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to Shape objects that represent WordArt.
MsoTextFramegetTextFrame()
Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape.
intgetTextHorizontalAlignment()
void
Gets and sets the text horizontal alignment type of the shape. The value of the property is TextAlignmentType integer constant.
intgetTextHorizontalOverflow()
void
Gets and sets the text horizontal overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.
TextOptionsgetTextOptions()
void
Represents the text options of the shape.
intgetTextOrientationType()
void
Gets and sets the text orientation type of the shape. The value of the property is TextOrientationType integer constant.
intgetTextShapeType()
void
Gets and sets the preset text shape type. The value of the property is AutoShapeType integer constant.
intgetTextVerticalAlignment()
void
Gets and sets the text vertical alignment type of the shape. The value of the property is TextAlignmentType integer constant.
intgetTextVerticalOverflow()
void
Gets and sets the text vertical overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.
ThreeDFormatgetThreeDFormat()
Gets and sets 3d format of the shape.
java.lang.StringgetTitle()
void
setTitle(java.lang.Stringvalue)
Specifies the title (caption) of the current shape object.
intgetTop()
void
setTop(intvalue)
Represents the vertical offset of shape from its top row, in unit of pixels.
doublegetTopCM()
void
setTopCM(doublevalue)
Represents the vertical offset of shape from its top row, in unit of centimeters.
doublegetTopInch()
void
setTopInch(doublevalue)
Represents the vertical offset of shape from its top row, in unit of inches.
intgetTopInChart()
void
setTopInChart(intvalue)
Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.
intgetTopInShape()
void
setTopInShape(intvalue)
Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.
intgetTopToCorner()
void
setTopToCorner(intvalue)
Gets and sets the vertical offset of shape from worksheet top boder,in unit of pixel
intgetType()
Gets the auto shape type. The value of the property is AutoShapeType integer constant.
intgetUpperDeltaX()
void
setUpperDeltaX(intvalue)
Gets or sets the shape's horizontal offset from its upper left corner column. The range of value is 0 to 1024.
intgetUpperDeltaY()
void
setUpperDeltaY(intvalue)
Gets or sets the shape's vertical offset from its upper left corner row. The range of value is 0 to 256.
intgetUpperLeftColumn()
void
Represents upper left corner column index.
intgetUpperLeftRow()
void
setUpperLeftRow(intvalue)
Represents upper left corner row index.
intgetWidth()
void
setWidth(intvalue)
Represents the width of shape, in unit of pixels.
doublegetWidthCM()
void
setWidthCM(doublevalue)
Represents the width of the shape, in unit of centimeters.
doublegetWidthInch()
void
setWidthInch(doublevalue)
Represents the width of the shape, in unit of inch.
intgetWidthInChart()
void
setWidthInChart(intvalue)
Represents the width of the shape, in unit of 1/4000 of the parent shape.
intgetWidthInShape()
void
setWidthInShape(intvalue)
Represents the width of the shape, in unit of 1/4000 of the parent shape.
doublegetWidthPt()
void
setWidthPt(doublevalue)
Represents the width of the shape, in unit of point.
intgetWidthScale()
void
setWidthScale(intvalue)
Gets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthScale property only returns 100;
intgetX()
void
setX(intvalue)
Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.
intgetY()
void
setY(intvalue)
Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
intgetZOrderPosition()
void
Returns the position of a shape in the z-order.
Shapeget(intindex)
Gets the child shape by index.
 
Method Summary
HyperlinkaddHyperlink(java.lang.Stringaddress)
Adds a hyperlink to the shape.
voidalignTopRightCorner(inttopRow, intrightColumn)
Moves the picture to the top-right corner.
int[]calculateTextSize()
Recalculate the text area
FontSettingcharacters(intstartIndex, intlength)
Returns a Characters object that represents a range of characters within the text.
voidformatCharacters(intstartIndex, intlength, Font font)
Format some chararcters with the font setting.
voidformatCharacters(intstartIndex, intlength, Font font, StyleFlag flag)
Format some chararcters with the font setting.
java.util.ArrayListgetCharacters()
Returns all Characters objects that represents a range of characters within the text .
Shape[]getGroupedShapes()
Gets the shapes grouped by this shape.
booleangetLockedProperty(inttype)
Gets the value of locked property.
voidmoveToRange(intupperLeftRow, intupperLeftColumn, intlowerRightRow, intlowerRightColumn)
Moves the shape to a specified range.
voidremoveHyperlink()
Remove the hyperlink of the shape.
voidsetLockedProperty(inttype, booleanvalue)
Set the locked property.
voidtoFrontOrBack(intorders)
Brings the shape to the front or sends the shape to back.
voidtoImage(java.io.OutputStreamstream, ImageFormat imageFormat)
Creates the shape image and saves it to a stream in the specified format.
voidtoImage(java.io.OutputStreamstream, ImageOrPrintOptions options)
Saves the shape to a stream.
voidtoImage(java.lang.StringimageFile, ImageOrPrintOptions options)
Saves the shape to a file.
voidupdateSelectedValue()
Update the selected value by the value of the linked cell.
 

    • Property Getters/Setters Detail

      • getMacroName/setMacroName

        public java.lang.String getMacroName() / public void setMacroName(java.lang.String value)
        
        Gets and sets the name of macro.
      • getZOrderPosition/setZOrderPosition

        public int getZOrderPosition() / public void setZOrderPosition(int value)
        
        Returns the position of a shape in the z-order.
      • getName/setName

        public java.lang.String getName() / public void setName(java.lang.String value)
        
        Gets and sets the name of the shape.
      • getAlternativeText/setAlternativeText

        public java.lang.String getAlternativeText() / public void setAlternativeText(java.lang.String value)
        
        Returns or sets the descriptive (alternative) text string of the Shape object.
      • getTitle/setTitle

        public java.lang.String getTitle() / public void setTitle(java.lang.String value)
        
        Specifies the title (caption) of the current shape object.
      • getLineFormat

        public MsoLineFormat getLineFormat()
        
        Returns a MsoLineFormat object that contains line formatting properties for the specified shape. NOTE: This member is now obsolete. Instead, please use Shape.Line property. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.
      • getFillFormat

        public MsoFillFormat getFillFormat()
        
        Returns a MsoFillFormat object that contains fill formatting properties for the specified shape. NOTE: This member is now obsolete. Instead, please use Shape.Fill property. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.
      • getFormat

        public ShapeFormat getFormat()
        
        Represents the setting of the shape's formatting. NOTE: This member is now obsolete. Instead, please use Shape.Fill and Shape.Line properties. This property will be removed 6 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.
      • getLine

        public LineFormat getLine()
        
        Gets line style
      • getFill

        public FillFormat getFill()
        
        Returns a FillFormat object that contains fill formatting properties for the specified shape.
      • getShadowEffect

        public ShadowEffect getShadowEffect()
        
        Represents a object that specifies shadow effect for the chart element or shape.
        See Also:
        ShadowEffect
      • getReflection

        public ReflectionEffect getReflection()
        
        Represents a object that specifies reflection effect for the chart element or shape.
        See Also:
        ReflectionEffect
      • getGlow

        public GlowEffect getGlow()
        
        Represents a object that specifies glow effect for the chart element or shape.
        See Also:
        GlowEffect
      • getSoftEdges/setSoftEdges

        public double getSoftEdges() / public void setSoftEdges(double value)
        
        Gets and sets the radius of blur to apply to the edges, in unit of points.
      • getThreeDFormat

        public ThreeDFormat getThreeDFormat()
        
        Gets and sets 3d format of the shape.
      • getTextFrame

        public MsoTextFrame getTextFrame()
        
        Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape. NOTE: This member is now obsolete. Instead, please use Shape.TextBody.TextAlignment property. This property will be removed 12 months later since May 2016. Aspose apologizes for any inconvenience you may have experienced.
      • getFormatPicture

        public MsoFormatPicture getFormatPicture()
        
        Gets and sets the options of the picture format.
      • isHidden/setHidden

        public boolean isHidden() / public void setHidden(boolean value)
        
        Indicates whether the object is visible.
      • isLockAspectRatio/setLockAspectRatio

        public boolean isLockAspectRatio() / public void setLockAspectRatio(boolean value)
        
        True means that don't allow changes in aspect ratio.
      • getRotation/setRotation

        public int getRotation() / public void setRotation(int value)
        
        Gets and sets the rotation of the shape. NOTE: This member is now obsolete. Instead, please use Shape.RotationAngle property. This property will be removed 12 months later since June 2010. Aspose apologizes for any inconvenience you may have experienced.
      • getRotationAngle/setRotationAngle

        public double getRotationAngle() / public void setRotationAngle(double value)
        
        Gets and sets the rotation of the shape.
      • getHyperlink

        public Hyperlink getHyperlink()
        
        Gets the hyperlink of the shape.
      • getId

        public int getId()
        
        Gets the identifier of this shape.
      • getSpid

        public java.lang.String getSpid()
        
        Specifies an optional string that an application can use to Identify the particular shape.
      • getSpt

        public int getSpt()
        
        Specifies an optional number that an application can use to associate the particular shape with a defined shape type.
      • isGroup

        public boolean isGroup()
        
        Indicates whether the shape is a group.
      • isWordArt

        public boolean isWordArt()
        
        Indicates whether this shape is a word art.
      • getTextEffect

        public TextEffectFormat getTextEffect()
        
        Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to Shape objects that represent WordArt.
      • isLocked/setLocked

        public boolean isLocked() / public void setLocked(boolean value)
        
        True if the object is locked, False if the object can be modified when the sheet is protected.
      • isPrintable/setPrintable

        public boolean isPrintable() / public void setPrintable(boolean value)
        
        True if the object is printable
      • isPrinted/setPrinted

        public boolean isPrinted() / public void setPrinted(boolean value)
        
        True if the object is printable NOTE: This member is now obsolete. Instead, please use Shape.IsPrintable property. This property will be removed 12 months later since June 2010. Aspose apologizes for any inconvenience you may have experienced.
      • getMsoDrawingType

        public int getMsoDrawingType()
        
        Gets and sets mso drawing type. The value of the property is MsoDrawingType integer constant.
      • getAutoShapeType/setAutoShapeType

        public int getAutoShapeType() / public void setAutoShapeType(int value)
        
        Gets the auto shape type. The value of the property is AutoShapeType integer constant.
      • getPlacement/setPlacement

        public int getPlacement() / public void setPlacement(int value)
        
        Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet. The value of the property is PlacementType integer constant.
      • getUpperLeftRow/setUpperLeftRow

        public int getUpperLeftRow() / public void setUpperLeftRow(int value)
        
        Represents upper left corner row index. If the shape is in the shape or in the group , UpperLeftRow will be ignored.
      • getUpperDeltaY/setUpperDeltaY

        public int getUpperDeltaY() / public void setUpperDeltaY(int value)
        
        Gets or sets the shape's vertical offset from its upper left corner row. The range of value is 0 to 256.
      • getUpperLeftColumn/setUpperLeftColumn

        public int getUpperLeftColumn() / public void setUpperLeftColumn(int value)
        
        Represents upper left corner column index.
      • getUpperDeltaX/setUpperDeltaX

        public int getUpperDeltaX() / public void setUpperDeltaX(int value)
        
        Gets or sets the shape's horizontal offset from its upper left corner column. The range of value is 0 to 1024.
      • getLowerRightRow/setLowerRightRow

        public int getLowerRightRow() / public void setLowerRightRow(int value)
        
        Represents lower right corner row index.
      • getLowerDeltaY/setLowerDeltaY

        public int getLowerDeltaY() / public void setLowerDeltaY(int value)
        
        Gets or sets the shape's vertical offset from its lower right corner row. The range of value is 0 to 256.
      • getLowerRightColumn/setLowerRightColumn

        public int getLowerRightColumn() / public void setLowerRightColumn(int value)
        
        Represents lower right corner column index.
      • getLowerDeltaX/setLowerDeltaX

        public int getLowerDeltaX() / public void setLowerDeltaX(int value)
        
        Gets or sets the shape's horizontal offset from its lower right corner column. The range of value is 0 to 1024.
      • getRight/setRight

        public int getRight() / public void setRight(int value)
        
        Represents the width of the shape's horizontal offset from its lower right corner column, in unit of pixels.
      • getBottom/setBottom

        public int getBottom() / public void setBottom(int value)
        
        Represents the width of the shape's vertical offset from its lower bottom corner row, in unit of pixels.
      • getWidth/setWidth

        public int getWidth() / public void setWidth(int value)
        
        Represents the width of shape, in unit of pixels.
      • getWidthInch/setWidthInch

        public double getWidthInch() / public void setWidthInch(double value)
        
        Represents the width of the shape, in unit of inch.
      • getWidthPt/setWidthPt

        public double getWidthPt() / public void setWidthPt(double value)
        
        Represents the width of the shape, in unit of point.
      • getWidthCM/setWidthCM

        public double getWidthCM() / public void setWidthCM(double value)
        
        Represents the width of the shape, in unit of centimeters.
      • getHeight/setHeight

        public int getHeight() / public void setHeight(int value)
        
        Represents the height of shape, in unit of pixel.
      • getHeightInch/setHeightInch

        public double getHeightInch() / public void setHeightInch(double value)
        
        Represents the height of the shape, in unit of inches.
      • getHeightPt/setHeightPt

        public double getHeightPt() / public void setHeightPt(double value)
        
        Represents the height of the shape, in unit of points.
      • getHeightCM/setHeightCM

        public double getHeightCM() / public void setHeightCM(double value)
        
        Represents the height of the shape, in unit of inches.
      • getLeft/setLeft

        public int getLeft() / public void setLeft(int value)
        
        Represents the horizontal offset of shape from its left column, in unit of pixels.
      • getLeftInch/setLeftInch

        public double getLeftInch() / public void setLeftInch(double value)
        
        Represents the horizontal offset of shape from its left column, in unit of inches.
      • getLeftCM/setLeftCM

        public double getLeftCM() / public void setLeftCM(double value)
        
        Represents the horizontal offset of shape from its left column, in unit of centimeters.
      • getTop/setTop

        public int getTop() / public void setTop(int value)
        
        Represents the vertical offset of shape from its top row, in unit of pixels. If the shape is in the chart, represents the vertical offset of shape from its top border.
      • getTopInch/setTopInch

        public double getTopInch() / public void setTopInch(double value)
        
        Represents the vertical offset of shape from its top row, in unit of inches.
      • getTopCM/setTopCM

        public double getTopCM() / public void setTopCM(double value)
        
        Represents the vertical offset of shape from its top row, in unit of centimeters.
      • getTopToCorner/setTopToCorner

        public int getTopToCorner() / public void setTopToCorner(int value)
        
        Gets and sets the vertical offset of shape from worksheet top boder,in unit of pixel
      • getLeftToCorner/setLeftToCorner

        public int getLeftToCorner() / public void setLeftToCorner(int value)
        
        Gets and sets the horizonal offset of shape from worksheet left border.
      • getX/setX

        public int getX() / public void setX(int value)
        
        Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.
      • getY/setY

        public int getY() / public void setY(int value)
        
        Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
      • getWidthScale/setWidthScale

        public int getWidthScale() / public void setWidthScale(int value)
        
        Gets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthScale property only returns 100;
      • getHeightScale/setHeightScale

        public int getHeightScale() / public void setHeightScale(int value)
        
        Gets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the HeightScale property only returns 100;
      • getTopInShape/setTopInShape

        public int getTopInShape() / public void setTopInShape(int value)
        
        Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape. Only Applies when this shape in the group or chart.
      • getLeftInShape/setLeftInShape

        public int getLeftInShape() / public void setLeftInShape(int value)
        
        Represents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape. Only Applies when this shape in the group or chart.
      • getWidthInShape/setWidthInShape

        public int getWidthInShape() / public void setWidthInShape(int value)
        
        Represents the width of the shape, in unit of 1/4000 of the parent shape. Only Applies when this shape in the group or chart.
      • getHeightInShape/setHeightInShape

        public int getHeightInShape() / public void setHeightInShape(int value)
        
        Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.. Only Applies when this shape in the group or chart.
      • getHeightInChart/setHeightInChart

        public int getHeightInChart() / public void setHeightInChart(int value)
        
        Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.HeightInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.
      • getLeftInChart/setLeftInChart

        public int getLeftInChart() / public void setLeftInChart(int value)
        
        Represents the vertical offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.LeftInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.
      • getTopInChart/setTopInChart

        public int getTopInChart() / public void setTopInChart(int value)
        
        Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.TopInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.
      • getWidthInChart/setWidthInChart

        public int getWidthInChart() / public void setWidthInChart(int value)
        
        Represents the width of the shape, in unit of 1/4000 of the parent shape. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.WidthInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.
      • getPositionX/setPositionX

        public int getPositionX() / public void setPositionX(int value)
        
        Gets and sets the horizonal offset of shape from worksheet left border,in unit of pixels. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.X property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.
      • getPositionY/setPositionY

        public int getPositionY() / public void setPositionY(int value)
        
        Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.Y property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.
      • getGroup

        public GroupShape getGroup()
        
        Gets the group shape which contains this shape.
      • getType

        public int getType()
        
        Gets the auto shape type. The value of the property is AutoShapeType integer constant.
      • hasLine/setHasLine

        public boolean hasLine() / public void setHasLine(boolean value)
        
        Gets and sets the line border of the shape is visible.
      • isFilled/setFilled

        public boolean isFilled() / public void setFilled(boolean value)
        
        Indicates whether the fill format is visible.
      • isFlippedHorizontally/setFlippedHorizontally

        public boolean isFlippedHorizontally() / public void setFlippedHorizontally(boolean value)
        
        Gets and sets whether shape is horizontally flipped .
      • isFlippedVertically/setFlippedVertically

        public boolean isFlippedVertically() / public void setFlippedVertically(boolean value)
        
        Gets and sets whether shape is vertically flipped .
      • getRelativeToOriginalPictureSize/setRelativeToOriginalPictureSize

        public boolean getRelativeToOriginalPictureSize() / public void setRelativeToOriginalPictureSize(boolean value)
        
        Indicates whether shape is relative to original picture size.
      • getLinkedCell/setLinkedCell

        public java.lang.String getLinkedCell() / public void setLinkedCell(java.lang.String value)
        
        Gets or sets the worksheet range linked to the control's value.
      • getInputRange/setInputRange

        public java.lang.String getInputRange() / public void setInputRange(java.lang.String value)
        
        Gets or sets the worksheet range used to fill the specified combo box.
      • getTextShapeType/setTextShapeType

        public int getTextShapeType() / public void setTextShapeType(int value)
        
        Gets and sets the preset text shape type. The value of the property is AutoShapeType integer constant.
      • getFont/setFont

        public Font getFont() / public void setFont(Font value)
        
        Represents the font of shape.
      • getTextOptions/setTextOptions

        public TextOptions getTextOptions() / public void setTextOptions(TextOptions value)
        
        Represents the text options of the shape.
      • getText/setText

        public java.lang.String getText() / public void setText(java.lang.String value)
        
        Represents the string in this TextBox object.
      • isRichText

        public boolean isRichText()
        
        Whether or not the text is rich text.
      • getHtmlText/setHtmlText

        public java.lang.String getHtmlText() / public void setHtmlText(java.lang.String value)
        
        Gets and sets the html string which contains data and some formats in this textbox.
      • getTextVerticalOverflow/setTextVerticalOverflow

        public int getTextVerticalOverflow() / public void setTextVerticalOverflow(int value)
        
        Gets and sets the text vertical overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.
      • getTextHorizontalOverflow/setTextHorizontalOverflow

        public int getTextHorizontalOverflow() / public void setTextHorizontalOverflow(int value)
        
        Gets and sets the text horizontal overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.
      • isTextWrapped/setTextWrapped

        public boolean isTextWrapped() / public void setTextWrapped(boolean value)
        
        Gets and sets the text wrapped type of the shape which contains text.
      • getTextOrientationType/setTextOrientationType

        public int getTextOrientationType() / public void setTextOrientationType(int value)
        
        Gets and sets the text orientation type of the shape. The value of the property is TextOrientationType integer constant.
      • getTextHorizontalAlignment/setTextHorizontalAlignment

        public int getTextHorizontalAlignment() / public void setTextHorizontalAlignment(int value)
        
        Gets and sets the text horizontal alignment type of the shape. The value of the property is TextAlignmentType integer constant.
      • getTextVerticalAlignment/setTextVerticalAlignment

        public int getTextVerticalAlignment() / public void setTextVerticalAlignment(int value)
        
        Gets and sets the text vertical alignment type of the shape. The value of the property is TextAlignmentType integer constant.
      • getTextDirection/setTextDirection

        public int getTextDirection() / public void setTextDirection(int value)
        
        Gets/Sets the direction of the text flow for this object. The value of the property is TextDirectionType integer constant.
      • getControlData

        public byte[] getControlData()
        
        Gets the data of control.
      • getActiveXControl

        public ActiveXControl getActiveXControl()
        
        Gets the ActiveX control.
      • getGeometry

        public Geometry getGeometry()
        
        Gets the geometry
      • getActualLowerRightRow

        public int getActualLowerRightRow()
        
        Get the actual bottom row.
      • get

        public Shape get(int index)
        
        Gets the child shape by index.
        Parameters:
        index - the child shape index.
        Returns:
        return the child shape.
    • Method Detail

      • getGroupedShapes

        public Shape[] getGroupedShapes()
        Gets the shapes grouped by this shape.
      • formatCharacters

        public void formatCharacters(int startIndex, int length, Font font, StyleFlag flag)
        Format some chararcters with the font setting.
        Parameters:
        startIndex - The start index.
        length - The the length.
        font - The font setting.
        flag - The flag of the font setting.
      • formatCharacters

        public void formatCharacters(int startIndex, int length, Font font)
        Format some chararcters with the font setting. NOTE: This member is now obsolete. Instead, please use Shape.FormatCharacters(int startIndex, int length, Font font,StyleFlag flag) method. This property will be removed 12 months later since March 2016. Aspose apologizes for any inconvenience you may have experienced.
        Parameters:
        startIndex - The start index.
        length - The the length.
        font - The font setting.
      • characters

        public FontSetting characters(int startIndex, int length)
        Returns a Characters object that represents a range of characters within the text. This method only works on shape with title.
        Parameters:
        startIndex - The index of the start of the character.
        length - The number of characters.
        Returns:
        Characters object.
      • getCharacters

        public java.util.ArrayList getCharacters()
        Returns all Characters objects that represents a range of characters within the text .
        Returns:
        All Characters objects
      • calculateTextSize

        public int[] calculateTextSize()
                               throws java.lang.Exception
        Recalculate the text area
        Returns:
        Text's Size in an array(width and height).
      • toImage

        public void toImage(java.io.OutputStream stream, ImageFormat imageFormat)
                    throws java.lang.Exception
        Creates the shape image and saves it to a stream in the specified format.

        The following formats are supported: .bmp, .gif, .jpg, .jpeg, .tiff, .emf.

        Parameters:
        stream - The output stream.
        imageFormat - The format in which to save the image.
      • toImage

        public void toImage(java.lang.String imageFile, ImageOrPrintOptions options)
                    throws java.lang.Exception
        Saves the shape to a file.
      • toImage

        public void toImage(java.io.OutputStream stream, ImageOrPrintOptions options)
                    throws java.lang.Exception
        Saves the shape to a stream.
      • updateSelectedValue

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

        public void toFrontOrBack(int orders)
        Brings the shape to the front or sends the shape to back.
        Parameters:
        orders - If it's less than zero, sens the shape to back. If it's greater than zero, brings the shape to front.
      • getLockedProperty

        public boolean getLockedProperty(int type)
        Gets the value of locked property.
        Parameters:
        type - A ShapeLockType value. The type of the shape locked property.
        Returns:
        Returns the value of locked property.
      • setLockedProperty

        public void setLockedProperty(int type, boolean value)
        Set the locked property.
        Parameters:
        type - A ShapeLockType value. The locked type.
        value - The value of the property.
      • addHyperlink

        public Hyperlink addHyperlink(java.lang.String address)
        Adds a hyperlink to the shape.
        Parameters:
        address - Address of the hyperlink.
        Returns:
        Return the new hyperlink object.
      • removeHyperlink

        public void removeHyperlink()
        Remove the hyperlink of the shape.
      • moveToRange

        public void moveToRange(int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn)
        Moves the shape to a specified range.
        Parameters:
        upperLeftRow - Upper left row index.
        upperLeftColumn - Upper left column index.
        lowerRightRow - Lower right row index
        lowerRightColumn - Lower right column index
      • alignTopRightCorner

        public void alignTopRightCorner(int topRow, int rightColumn)
        Moves the picture to the top-right corner.
        Parameters:
        topRow - the row index.
        rightColumn - the column index.