com.aspose.cells
Classes 
AboveAverage
AbstractCalculationEngine
AbstractCalculationMonitor
AbstractGlobalizationSettings
AbstractInterruptMonitor
AbstractTextLoadOptions
ActiveXControl
ActiveXControlBase
ArcShape
Area
AutoFilter
AutoFitterOptions
AutomaticFill
AutoNumberedBulletValue
Axis
AxisBins
BaseShapeGuide
Bevel
Border
BorderCollection
BuiltInDocumentPropertyCollection
Bullet
BulletValue
Button
CalculationCell
CalculationData
CalculationOptions
Cell
CellArea
Cells
CellsColor
CellsDataTableFactory
CellsDrawing
CellsException
CellsFactory
CellsHelper
CellWatch
CellWatchCollection
CharacterBulletValue
Chart
ChartArea
ChartCollection
ChartDataTable
ChartFrame
ChartGlobalizationSettings
ChartPoint
ChartPointCollection
ChartShape
ChartTextFrame
CheckBox
CheckBoxActiveXControl
CheckBoxCollection
CollectionBase
Color
ColorFilter
ColorHelper
ColorScale
Column
ColumnCollection
ComboBox
ComboBoxActiveXControl
CommandButtonActiveXControl
Comment
CommentCollection
CommentShape
ConditionalFormattingCollection
ConditionalFormattingIcon
ConditionalFormattingIconCollection
ConditionalFormattingResult
ConditionalFormattingValue
ConditionalFormattingValueCollection
ConnectionParameter
ConnectionParameterCollection
ContentTypeProperty
ContentTypePropertyCollection
CopyOptions
CustomDocumentPropertyCollection
CustomFilter
CustomFilterCollection
CustomGeometry
CustomImplementationFactory
CustomProperty
CustomPropertyCollection
CustomXmlPart
CustomXmlPartCollection
CustomXmlShape
DataBar
DataBarBorder
DataLabels
DataSorter
DataSorterKey
DataSorterKeyCollection
DateTime
DateTimeGroupItem
DBConnection
DefaultStyleSettings
DeleteOptions
DialogBox
DifSaveOptions
DigitalSignature
DigitalSignatureCollection
DisplayUnitLabel
DocumentProperty
DocumentPropertyCollection
DocxSaveOptions
DrawObject
DrawObjectEventHandler
DropBars
DxfCollection
DynamicFilter
Encoding
ErrorBar
ErrorCheckOption
ErrorCheckOptionCollection
ExportObjectEvent
ExportRangeToJsonOptions
ExportTableOptions
ExternalConnection
ExternalConnectionCollection
ExternalLink
ExternalLinkCollection
FileFontSource
FileFormatInfo
FileFormatUtil
Fill
FillFormat
FilterColumn
FilterColumnCollection
FindOptions
Floor
FolderFontSource
Font
FontConfigs
FontSetting
FontSettingCollection
FontSourceBase
Format3D
FormatCondition
FormatConditionCollection
FormulaParseOptions
FormulaSettings
Geometry
GlobalizationSettings
GlowEffect
GradientFill
GradientStop
GradientStopCollection
GroupBox
GroupFill
GroupShape
HeaderFooterCommand
HorizontalPageBreak
HorizontalPageBreakCollection
HtmlLoadOptions
HtmlSaveOptions
Hyperlink
HyperlinkCollection
IconFilter
IconSet
ImageActiveXControl
ImageFormat
ImageOrPrintOptions
ImageSaveOptions
ImportTableOptions
IndividualFontConfigs
InsertOptions
InterruptMonitor
JsonLayoutOptions
JsonLoadOptions
JsonSaveOptions
JsonUtility
Label
LabelActiveXControl
Legend
LegendEntry
LegendEntryCollection
License
Line
LineFormat
LineShape
ListBox
ListBoxActiveXControl
ListColumn
ListColumnCollection
ListObject
ListObjectCollection
LoadFilter
LoadOptions
MarkdownSaveOptions
Marker
MemoryFontSource
MetadataOptions
Metered
MsoFillFormat
MsoFillFormatHelper
MsoFormatPicture
MsoLineFormat
MsoLineFormatHelper
MsoTextFrame
MultipleFilterCollection
Name
NameCollection
NegativeBarFormat
NoneBulletValue
NoneFill
OdsCellField
OdsCellFieldCollection
OdsLoadOptions
OdsPageBackground
OdsSaveOptions
OleObject
OleObjectCollection
OoxmlSaveOptions
Outline
Oval
PageEndSavingArgs
PageSavingArgs
PageSetup
PageStartSavingArgs
PaginatedSaveOptions
PaneCollection
PasteOptions
PatternFill
PdfBookmarkEntry
PdfSaveOptions
PdfSecurityOptions
PicFormatOption
Picture
PictureBulletValue
PictureCollection
PivotField
PivotFieldCollection
PivotFilter
PivotFilterCollection
PivotFormatCondition
PivotFormatConditionCollection
PivotItem
PivotItemCollection
PivotOptions
PivotPageFields
PivotTable
PivotTableCollection
PlotArea
PptxSaveOptions
ProtectedRange
ProtectedRangeCollection
Protection
QueryTable
QueryTableCollection
RadioButton
RadioButtonActiveXControl
Range
RangeCollection
RectangleShape
ReferredArea
ReferredAreaCollection
ReflectionEffect
ReplaceOptions
Revision
RevisionAutoFormat
RevisionCellChange
RevisionCellComment
RevisionCellMove
RevisionCollection
RevisionCustomView
RevisionDefinedName
RevisionFormat
RevisionInsertDelete
RevisionInsertSheet
RevisionLog
RevisionLogCollection
RevisionMergeConflict
RevisionQueryTable
RevisionRenameSheet
Row
RowCollection
SaveOptions
Scenario
ScenarioCollection
ScenarioInputCell
ScenarioInputCellCollection
ScrollBar
ScrollBarActiveXControl
Series
SeriesCollection
SeriesLayoutProperties
ShadowEffect
Shape
ShapeCollection
ShapeFormat
ShapeGuide
ShapeGuideCollection
ShapePath
ShapePathCollection
ShapePathPoint
ShapePathPointCollection
ShapePropertyCollection
ShapeSegmentPath
ShapeSegmentPathCollection
ShapeTextAlignment
SheetPrintingPreview
SheetRender
SheetSet
SignatureLine
Slicer
SlicerCache
SlicerCacheItem
SlicerCacheItemCollection
SlicerCollection
SmartArtShape
SmartTag
SmartTagCollection
SmartTagOptions
SmartTagProperty
SmartTagPropertyCollection
SmartTagSetting
SolidFill
Sparkline
SparklineCollection
SparklineGroup
SparklineGroupCollection
SpinButtonActiveXControl
Spinner
SpreadsheetML2003SaveOptions
StreamProviderOptions
Style
StyleFlag
SubtotalSetting
SvgSaveOptions
SxRng
TableStyle
TableStyleCollection
TableStyleElement
TableStyleElementCollection
TableToRangeOptions
TextBox
TextBoxActiveXControl
TextBoxCollection
TextEffectFormat
TextOptions
TextParagraph
TextParagraphCollection
TextTabStop
TextTabStopCollection
TextureFill
ThemeColor
ThreadedComment
ThreadedCommentAuthor
ThreadedCommentAuthorCollection
ThreadedCommentCollection
ThreeDFormat
TickLabelItem
TickLabels
TilePicOption
Timeline
TimelineCollection
Title
ToggleButtonActiveXControl
Top10
Top10Filter
Trendline
TrendlineCollection
TxtLoadOptions
TxtSaveOptions
UnionRange
UnknownControl
Validation
ValidationCollection
VbaModule
VbaModuleCollection
VbaProject
VbaProjectReference
VbaProjectReferenceCollection
VerticalPageBreak
VerticalPageBreakCollection
VmlShapeGuide
Walls
WarningInfo
WebExtension
WebExtensionBinding
WebExtensionBindingCollection
WebExtensionCollection
WebExtensionProperty
WebExtensionPropertyCollection
WebExtensionReference
WebExtensionReferenceCollection
WebExtensionShape
WebExtensionTaskPane
WebExtensionTaskPaneCollection
WebQueryConnection
Workbook
WorkbookDesigner
WorkbookMetadata
WorkbookPrintingPreview
WorkbookRender
WorkbookSettings
Worksheet
WorksheetCollection
WriteProtection
XlsbSaveOptions
XlsSaveOptions
XmlColumnProperty
XmlDataBinding
XmlLoadOptions
XmlMap
XmlMapCollection
XmlSaveOptions
XpsSaveOptions
Interfaces 
ICellsDataTable
ICustomFunction
ICustomParser
IExportObjectListener
IFilePathProvider
IPageSavingCallback
ISmartMarkerCallBack
IStreamProvider
IWarningCallback
LightCellsDataHandler
LightCellsDataProvider
Constants 
AccessCacheOptions
ActiveXPersistenceType
AutoFillType
AutoFitMergedCellsType
AutoFitWrappedTextType
AutoShapeType
AxisType
BackgroundMode
BackgroundType
Bar3DShapeType
BevelPresetType
BevelType
BorderType
BubbleSizeRepresents
BuiltinStyleType
BulletType
CalcModeType
CalculationPrecisionStrategy
CategoryType
CellBorderType
CellValueFormatStrategy
CellValueType
ChartLineFormattingType
ChartMarkerType
ChartSplitType
ChartTextDirectionType
ChartType
CheckValueType
ColorDepth
ColorType
CommentTitleType
ConnectionDataSourceType
ConnectionParameterType
ConsolidationFunction
ControlBorderType
ControlCaptionAlignmentType
ControlListStyle
ControlMatchEntryType
ControlMousePointerType
ControlPictureAlignmentType
ControlPicturePositionType
ControlPictureSizeMode
ControlScrollBarType
ControlScrollOrientation
ControlSpecialEffectType
ControlType
CopyFormatType
CountryCode
CredentialsMethodType
CrossType
DataBarAxisPosition
DataBarBorderType
DataBarFillType
DataBarNegativeColorType
DataLabelShapeType
DataLabelsSeparatorType
DataLablesSeparatorType
DateTimeGroupingType
DefaultEditLanguage
DirectoryType
DisplayDrawingObjects
DisplayUnitType
DrawObjectEnum
DropButtonStyle
DynamicFilterType
EmfRenderSetting
EncryptionType
ErrorBarDisplayType
ErrorBarType
ErrorCheckType
ExceptionType
ExternalLinkType
FileFormatType
FillPattern
FillPictureType
FillType
FilterOperatorType
FilterType
FontSchemeType
FontSourceType
FontUnderlineType
FormatConditionType
FormatConditionValueType
FormatSetType
FormattingType
GradientColorType
GradientDirectionType
GradientFillType
GradientPresetType
GradientStyleType
GridlineType
HeaderFooterCommandType
HtmlCrossType
HtmlExportDataOptions
HtmlFormatHandlingType
HtmlHiddenColDisplayType
HtmlHiddenRowDisplayType
HtmlLinkTargetType
IconSetType
ImageType
InputMethodEditorMode
LabelPositionType
LegendPositionType
LightRigDirectionType
LightRigType
LineCapType
LineJoinType
LineSpaceSizeType
LineType
LoadDataFilterOptions
LoadFormat
LookAtType
LookInType
MapChartLabelLayout
MapChartProjectionType
MapChartRegionType
MemorySetting
MetadataType
MirrorType
MsoArrowheadLength
MsoArrowheadStyle
MsoArrowheadWidth
MsoDrawingType
MsoLineDashStyle
MsoLineStyle
MsoPresetTextEffect
MsoPresetTextEffectShape
NameScopeType
NumberCategoryType
OdsCellFieldType
OdsGeneratorType
OdsPageBackgroundGraphicPositionType
OdsPageBackgroundGraphicType
OdsPageBackgroundType
OLEDBCommandType
OoxmlCompliance
OoxmlCompressionType
OperatorType
PageLayoutAlignmentType
PageOrientationType
PaneStateType
PaperSizeType
ParameterType
PasteOperationType
PasteType
PdfCompliance
PdfCompressionCore
PdfCustomPropertiesExport
PdfFontEncoding
PdfOptimizationType
PivotConditionFormatRuleType
PivotConditionFormatScopeType
PivotFieldDataDisplayFormat
PivotFieldSubtotalType
PivotFieldType
PivotFilterType
PivotGroupByType
PivotItemPosition
PivotMissingItemLimitType
PivotTableAutoFormatType
PivotTableStyleType
PlacementType
PlotDataByType
PlotEmptyCellsType
PresetCameraType
PresetMaterialType
PresetShadowType
PresetWordArtStyle
PrintCommentsType
PrintErrorsType
PrintingPageType
PrintOrderType
PrintSizeType
PropertyType
ProtectionType
QuartileCalculationType
ReConnectionMethodType
RectangleAlignmentType
ReflectionEffectType
RenameStrategy
ResourceLoadingType
RevisionActionType
RevisionType
SaveFormat
SelectionType
ShapeAnchorType
ShapeLockType
ShapePathType
SheetType
ShiftType
ShowDropButtonType
SlicerCacheCrossFilterType
SlicerCacheItemSortType
SlicerStyleType
SmartTagShowType
SortOnType
SortOrder
SparklineAxisMinMaxType
SparklinePresetStyleType
SparklineType
SqlDataType
StyleModifyFlag
TableDataSourceType
TableStyleElementType
TableStyleType
TargetModeType
TextAlignmentType
TextAutonumberScheme
TextCapsType
TextCrossType
TextDirectionType
TextFontAlignType
TextNodeType
TextOrientationType
TextOverflowType
TextStrikeType
TextTabAlignmentType
TextureType
TextVerticalType
ThemeColorType
TickLabelPositionType
TickMarkType
TiffCompression
TimePeriodType
TimeUnit
TotalsCalculation
TrendlineType
TxtLoadStyleStrategy
TxtValueQuoteType
UpdateLinksType
ValidationAlertType
ValidationType
VbaModuleType
VbaProjectReferenceType
ViewType
VisibilityType
WarningType
WebExtensionStoreType
WeightType
XAdESType

com.aspose.cells
Class Shape

java.lang.Object
    extended by com.aspose.cells.Shape
Direct Known Subclasses:
ArcShape, Button, CellsDrawing, ChartShape, CheckBox, ComboBox, CommentShape, CustomXmlShape, DialogBox, GroupBox, GroupShape, Label, LineShape, ListBox, OleObject, Oval, Picture, RadioButton, RectangleShape, ScrollBar, SmartArtShape, Spinner, TextBox, WebExtensionShape

public class Shape 
extends java.lang.Object

Represents the msodrawing object.

Example:

//Initialize a new workbook.
Workbook book = new Workbook();

//Add a shape.(e.g rectangle)
Shape shape = book.getWorksheets().get(0).getShapes().addRectangle(2, 0, 2, 0, 130, 130);

//do your business

//Save the excel file.
book.save("exmaple.xlsx");


Property Getters/Setters Summary
ActiveXControlgetActiveXControl()
           Gets the ActiveX control.
intgetActualLowerRightRow()
           Get the actual bottom row.
java.lang.StringgetAlternativeText()
voidsetAlternativeText(java.lang.String)
           Returns or sets the descriptive (alternative) text string of the Shape object.
intgetAnchorType()
voidsetAnchorType(int)
           Gets and set the shape anchor placeholder. The value of the property is ShapeAnchorType integer constant.
intgetAutoShapeType()
voidsetAutoShapeType(int)
           Gets and sets the auto shape type. The value of the property is AutoShapeType integer constant.
intgetBottom()
voidsetBottom(int)
           Represents the width of the shape's vertical offset from its lower bottom corner row, in unit of pixels.
java.awt.geom.Point2D.Float[]getConnectionPoints()
           Get the connection points
byte[]getControlData()
           Gets the data of control.
java.util.UUIDgetCreateId()
           Gets and sets create id for this shape.
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()
voidsetFont(Font)
           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()
voidsetHasLine(boolean)
           Gets and sets the line border of the shape is visible.
intgetHeight()
voidsetHeight(int)
           Represents the height of shape, in unit of pixel.
doublegetHeightCM()
voidsetHeightCM(double)
           Represents the height of the shape, in unit of centimeters.
doublegetHeightInch()
voidsetHeightInch(double)
           Represents the height of the shape, in unit of inches.
intgetHeightInChart()
voidsetHeightInChart(int)
           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()
voidsetHeightInShape(int)
           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()
voidsetHeightPt(double)
           Represents the height of the shape, in unit of points.
intgetHeightScale()
voidsetHeightScale(int)
           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()
voidsetHtmlText(java.lang.String)
           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()
voidsetInputRange(java.lang.String)
           Gets or sets the worksheet range used to fill the specified combo box.
booleanisEquation()
           Indicates whether the shape only contains an equation.
booleanisFilled()
voidsetFilled(boolean)
           Indicates whether the fill format is visible.
booleanisFlippedHorizontally()
voidsetFlippedHorizontally(boolean)
           Gets and sets whether shape is horizontally flipped .
booleanisFlippedVertically()
voidsetFlippedVertically(boolean)
           Gets and sets whether shape is vertically flipped .
booleanisGroup()
           Indicates whether the shape is a group.
booleanisHidden()
voidsetHidden(boolean)
           Indicates whether the object is visible.
booleanisInGroup()
           Indicates whether the shape is grouped.
booleanisLockAspectRatio()
voidsetLockAspectRatio(boolean)
           True means that don't allow changes in aspect ratio.
booleanisLocked()
voidsetLocked(boolean)
           True if the object is locked, False if the object can be modified when the sheet is protected.
booleanisPrintable()
voidsetPrintable(boolean)
           True if the object is printable
booleanisRichText()
           Whether or not the text is rich text.
booleanisSmartArt()
           Indicates whether the shape is smart art.
booleanisTextWrapped()
voidsetTextWrapped(boolean)
           Gets and sets the text wrapped type of the shape which contains text.
booleanisWordArt()
           Indicates whether this shape is a word art.
intgetLeft()
voidsetLeft(int)
           Represents the horizontal offset of shape from its left column, in unit of pixels.
doublegetLeftCM()
voidsetLeftCM(double)
           Represents the horizontal offset of shape from its left column, in unit of centimeters.
doublegetLeftInch()
voidsetLeftInch(double)
           Represents the horizontal offset of shape from its left column, in unit of inches.
intgetLeftInChart()
voidsetLeftInChart(int)
           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()
voidsetLeftInShape(int)
           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()
voidsetLeftToCorner(int)
           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()
voidsetLinkedCell(java.lang.String)
           Gets or sets the worksheet range linked to the control's value.
intgetLowerDeltaX()
voidsetLowerDeltaX(int)
           Gets or sets the shape's horizontal offset from its lower right corner column.
intgetLowerDeltaY()
voidsetLowerDeltaY(int)
           Gets or sets the shape's vertical offset from its lower right corner row.
intgetLowerRightColumn()
voidsetLowerRightColumn(int)
           Represents lower right corner column index.
intgetLowerRightRow()
voidsetLowerRightRow(int)
           Represents lower right corner row index.
java.lang.StringgetMacroName()
voidsetMacroName(java.lang.String)
           Gets and sets the name of macro.
intgetMsoDrawingType()
           Gets mso drawing type. The value of the property is MsoDrawingType integer constant.
java.lang.StringgetName()
voidsetName(java.lang.String)
           Gets and sets the name of the shape.
ShapePathCollectiongetPaths()
           Gets the paths of a custom geometric shape.
intgetPlacement()
voidsetPlacement(int)
           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()
voidsetPositionX(int)
           Gets and sets the horizonal offset of shape from worksheet left border,in unit of pixels.
intgetPositionY()
voidsetPositionY(int)
           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()
voidsetRelativeToOriginalPictureSize(boolean)
           Indicates whether shape is relative to original picture size.
intgetRight()
voidsetRight(int)
           Represents the width of the shape's horizontal offset from its lower right corner column, in unit of pixels.
doublegetRotationAngle()
voidsetRotationAngle(double)
           Gets and sets the rotation of the shape.
ShadowEffectgetShadowEffect()
           Represents a object that specifies shadow effect for the chart element or shape.
doublegetSoftEdges()
voidsetSoftEdges(double)
           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()
voidsetText(java.lang.String)
           Represents the string in this TextBox object.
FontSettingCollectiongetTextBody()
           Gets and sets the setting of the shape's text.
intgetTextDirection()
voidsetTextDirection(int)
           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()
voidsetTextHorizontalAlignment(int)
           Gets and sets the text horizontal alignment type of the shape. The value of the property is TextAlignmentType integer constant.
intgetTextHorizontalOverflow()
voidsetTextHorizontalOverflow(int)
           Gets and sets the text horizontal overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.
TextOptionsgetTextOptions()
voidsetTextOptions(TextOptions)
           Represents the text options of the shape.
intgetTextOrientationType()
voidsetTextOrientationType(int)
           Gets and sets the text orientation type of the shape. The value of the property is TextOrientationType integer constant.
intgetTextShapeType()
voidsetTextShapeType(int)
           Gets and sets the preset text shape type. The value of the property is AutoShapeType integer constant.
intgetTextVerticalAlignment()
voidsetTextVerticalAlignment(int)
           Gets and sets the text vertical alignment type of the shape. The value of the property is TextAlignmentType integer constant.
intgetTextVerticalOverflow()
voidsetTextVerticalOverflow(int)
           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()
voidsetTitle(java.lang.String)
           Specifies the title (caption) of the current shape object.
intgetTop()
voidsetTop(int)
           Represents the vertical offset of shape from its top row, in unit of pixels.
doublegetTopCM()
voidsetTopCM(double)
           Represents the vertical offset of shape from its top row, in unit of centimeters.
doublegetTopInch()
voidsetTopInch(double)
           Represents the vertical offset of shape from its top row, in unit of inches.
intgetTopInChart()
voidsetTopInChart(int)
           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()
voidsetTopInShape(int)
           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()
voidsetTopToCorner(int)
           Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels.
intgetType()
           Gets the auto shape type. The value of the property is AutoShapeType integer constant.
intgetUpperDeltaX()
voidsetUpperDeltaX(int)
           Gets or sets the shape's horizontal offset from its upper left corner column.
intgetUpperDeltaY()
voidsetUpperDeltaY(int)
           Gets or sets the shape's vertical offset from its upper left corner row.
intgetUpperLeftColumn()
voidsetUpperLeftColumn(int)
           Represents upper left corner column index.
intgetUpperLeftRow()
voidsetUpperLeftRow(int)
           Represents upper left corner row index.
intgetWidth()
voidsetWidth(int)
           Represents the width of shape, in unit of pixels.
doublegetWidthCM()
voidsetWidthCM(double)
           Represents the width of the shape, in unit of centimeters.
doublegetWidthInch()
voidsetWidthInch(double)
           Represents the width of the shape, in unit of inch.
intgetWidthInChart()
voidsetWidthInChart(int)
           Represents the width of the shape, in unit of 1/4000 of the parent shape.
intgetWidthInShape()
voidsetWidthInShape(int)
           Represents the width of the shape, in unit of 1/4000 of the parent shape.
doublegetWidthPt()
voidsetWidthPt(double)
           Represents the width of the shape, in unit of point.
intgetWidthScale()
voidsetWidthScale(int)
           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;
WorksheetgetWorksheet()
           Gets the Worksheet object which contains this shape.
intgetX()
voidsetX(int)
           Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.
intgetY()
voidsetY(int)
           Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
intgetZOrderPosition()
voidsetZOrderPosition(int)
           Returns the position of a shape in the z-order.
 
Method Summary
HyperlinkaddHyperlink(java.lang.String address)
           Adds a hyperlink to the shape.
voidalignTopRightCorner(int topRow, int rightColumn)
           Moves the picture to the top-right corner.
int[]calculateTextSize()
           Recalculate the text area
FontSettingcharacters(int startIndex, int length)
           Returns a Characters object that represents a range of characters within the text.
voidformatCharacters(int startIndex, int length, Font font)
           Formats some characters with the font setting.
voidformatCharacters(int startIndex, int length, Font font, StyleFlag flag)
           Formats some characters with the font setting.
java.util.ArrayListgetCharacters()
           Returns all Characters objects that represents a range of characters within the text .
float[][]getConnectionPoints()
           Get the connection points
java.lang.StringgetInputRange(boolean isR1C1, boolean isLocal)
           Gets the range used to fill the control.
java.lang.StringgetLinkedCell(boolean isR1C1, boolean isLocal)
           Gets the range linked to the control's value.
booleangetLockedProperty(int type)
           Gets the value of locked property.
GroupShapegetResultOfSmartArt()
           Converting smart art to grouped shapes.
booleanisSameSetting(java.lang.Object obj)
           Returns whether the shape is same.
voidmoveToRange(int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn)
           Moves the shape to a specified range.
voidremoveActiveXControl()
           Remove activeX control.
voidremoveHyperlink()
           Remove the hyperlink of the shape.
voidsetInputRange(java.lang.String formula, boolean isR1C1, boolean isLocal)
           Sets the range used to fill the control.
voidsetLinkedCell(java.lang.String formula, boolean isR1C1, boolean isLocal)
           Sets the range linked to the control's value.
voidsetLockedProperty(int type, boolean value)
           Set the locked property.
voidtoFrontOrBack(int orders)
           Brings the shape to the front or sends the shape to back.
voidtoImage(java.io.OutputStream stream, ImageFormat imageFormat)
           Creates the shape image and saves it to a stream in the specified format.
voidtoImage(java.io.OutputStream stream, ImageOrPrintOptions options)
           Saves the shape to a stream.
voidtoImage(java.lang.String imageFile, 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.

Example:

//Sets the name of macro.
shape.setMacroName("DoWork()");

isEquation

public boolean isEquation()
Indicates whether the shape only contains an equation.

Example:

//If true,the shape only contains an equation.
if(shape.isEquation())
{
    //The shape contains only an equation
}

isSmartArt

public boolean isSmartArt()
Indicates whether the shape is smart art. Only for ooxml file.

Example:

//if true,the shape is smart art.
if(shape.isSmartArt())
{
    //The shape is SmartArt object.
}

getZOrderPosition/setZOrderPosition

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

Example:

shape.setZOrderPosition(3);

getName/setName

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

Example:

shape.setName("shape1");

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.

Example:

shape.setAlternativeText("a rectangle");

getTitle/setTitle

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

Example:

shape.setTitle("title1");

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

Example:

LineFormat lineFmt = shape.getLine();

getFill

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

Example:

FillFormat fillFmt = shape.getFill();

getShadowEffect

public ShadowEffect getShadowEffect()
Represents a object that specifies shadow effect for the chart element or shape.

Example:

ShadowEffect shadowEffect = shape.getShadowEffect();
See Also:
ShadowEffect

getReflection

public ReflectionEffect getReflection()
Represents a object that specifies reflection effect for the chart element or shape.

Example:

ReflectionEffect reflectionEffect = shape.getReflection();
See Also:
ReflectionEffect

getGlow

public GlowEffect getGlow()
Represents a object that specifies glow effect for the chart element or shape.

Example:

GlowEffect glowEffect = shape.getGlow();
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.

Example:

shape.setSoftEdges(0.5d);

getThreeDFormat

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

Example:

ThreeDFormat threeDFormat = shape.getThreeDFormat();

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.

Example:

MsoFormatPicture msoFormatPicture = shape.getFormatPicture();

isHidden/setHidden

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

Example:

shape.setHidden(false);

isLockAspectRatio/setLockAspectRatio

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

Example:

shape.setLockAspectRatio(false);

getRotationAngle/setRotationAngle

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

Example:

if(shape.getRotationAngle() == 45)
    shape.setRotationAngle(60);

getHyperlink

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

Example:

Hyperlink hyperlink = shape.getHyperlink();

getId

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

Example:

int id = shape.getId();

getSpid

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

Example:

String spid = shape.getSpid();

getSpt

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

Example:

int spt = shape.getSpt();

getWorksheet

public Worksheet getWorksheet()
Gets the Worksheet object which contains this shape.

Example:

Worksheet worksheet = shape.getWorksheet();

isGroup

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

Example:

if(shape.isGroup())
{
    //This shape is a group.
}

isInGroup

public boolean isInGroup()
Indicates whether the shape is grouped.

isWordArt

public boolean isWordArt()
Indicates whether this shape is a word art. Only for the Legacy Shape of xls file.

Example:

if(shape.isWordArt())
{
    //This shape is a WordArt object.
}

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.

Example:

TextEffectFormat textEffectFormat = shape.getTextEffect();

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.

Example:

if(shape.isLocked())
    shape.setLocked(false);

isPrintable/setPrintable

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

Example:

if(shape.isPrintable())
    shape.setPrintable(false);

getMsoDrawingType

public int getMsoDrawingType()
Gets mso drawing type. The value of the property is MsoDrawingType integer constant.

Example:

/*Aspose.Cells.Drawing.MsoDrawingType*/int msoDrawingType = shape.getMsoDrawingType();

getAutoShapeType/setAutoShapeType

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

Example:

if (shape.getAutoShapeType() == com.aspose.cells.AutoShapeType.UNKNOWN)
    shape.setAutoShapeType(com.aspose.cells.AutoShapeType.RECTANGLE);

getAnchorType/setAnchorType

public int getAnchorType() / public void setAnchorType(int value)
Gets and set the shape anchor placeholder. The value of the property is ShapeAnchorType integer constant.

Example:

if (shape.getAnchorType() == ShapeAnchorType.ONE_CELL_ANCHOR)
    shape.setAnchorType(ShapeAnchorType.TWO_CELL_ANCHOR);

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.

Example:

if (shape.getPlacement() == PlacementType.MOVE)
    shape.setPlacement(PlacementType.MOVE_AND_SIZE);

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.

Example:

if (shape.getUpperLeftRow() == 3)
    shape.setUpperLeftRow(1);

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.

Example:

if (shape.getUpperDeltaY() == 3)
    shape.setUpperDeltaY(1);

getUpperLeftColumn/setUpperLeftColumn

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

Example:

if (shape.getUpperLeftColumn() == 3)
    shape.setUpperLeftColumn(1);

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.

Example:

if (shape.getUpperDeltaX() == 3)
    shape.setUpperDeltaX(1);

getLowerRightRow/setLowerRightRow

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

Example:

if (shape.getLowerRightRow() == 3)
    shape.setLowerRightRow(1);

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.

Example:

if (shape.getLowerDeltaY() == 3)
    shape.setLowerDeltaY(1);

getLowerRightColumn/setLowerRightColumn

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

Example:

if (shape.getLowerRightColumn() == 3)
    shape.setLowerRightColumn(1);

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.

Example:

if (shape.getLowerDeltaX() == 3)
    shape.setLowerDeltaX(1);

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.

Example:

if (shape.getRight() == 3)
    shape.setRight(1);

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.

Example:

if (shape.getBottom() == 3)
    shape.setBottom(1);

getWidth/setWidth

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

Example:

if (shape.getWidth() == 3)
    shape.setWidth(1);

getWidthInch/setWidthInch

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

Example:

if (shape.getWidthInch() == 3)
    shape.setWidthInch(1);

getWidthPt/setWidthPt

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

Example:

if (shape.getWidthPt() == 3)
    shape.setWidthPt(1);

getWidthCM/setWidthCM

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

Example:

if (shape.getWidthCM() == 3)
    shape.setWidthCM(1);

getHeight/setHeight

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

Example:

if (shape.getHeight() == 3)
    shape.setHeight(1);

getHeightInch/setHeightInch

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

Example:

if (shape.getHeightInch() == 3)
    shape.setHeightInch(1);

getHeightPt/setHeightPt

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

Example:

if (shape.getHeightPt() == 3)
    shape.setHeightPt(1);

getHeightCM/setHeightCM

public double getHeightCM() / public void setHeightCM(double value)
Represents the height of the shape, in unit of centimeters.

Example:

if (shape.getHeightCM() == 3)
    shape.setHeightCM(1);

getLeft/setLeft

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

Example:

if (shape.getLeft() == 3)
    shape.setLeft(1);

getLeftInch/setLeftInch

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

Example:

if (shape.getLeftInch() == 3)
    shape.setLeftInch(1);

getLeftCM/setLeftCM

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

Example:

if (shape.getLeftCM() == 3)
    shape.setLeftCM(1);

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.

Example:

if (shape.getTop() == 3)
    shape.setTop(1);

getTopInch/setTopInch

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

Example:

if (shape.getTopInch() == 3)
    shape.setTopInch(1);

getTopCM/setTopCM

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

Example:

if (shape.getTopCM() == 3)
    shape.setTopCM(1);

getTopToCorner/setTopToCorner

public int getTopToCorner() / public void setTopToCorner(int value)
Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels.

Example:

if (shape.getTopToCorner() == 3)
    shape.setTopToCorner(1);

getLeftToCorner/setLeftToCorner

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

Example:

if (shape.getLeftToCorner() == 3)
    shape.setLeftToCorner(1);

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.

Example:

if (shape.getX() == 3)
    shape.setX(1);

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.

Example:

if (shape.getY() == 3)
    shape.setY(1);

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;

Example:

if (shape.getWidthScale() == 3)
    shape.setWidthScale(1);

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;

Example:

if (shape.getHeightScale() == 3)
    shape.setHeightScale(1);

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.

Example:

if (shape.getTopInShape() == 8000)
    shape.setTopInShape(4000);

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.

Example:

if (shape.getUpperDeltaY() == 2000)
    shape.setUpperDeltaY(4000);

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.

Example:

if (shape.getUpperDeltaY() == 2000)
    shape.setUpperDeltaY(4000);

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.

Example:

if (shape.getUpperDeltaY() == 4000)
    shape.setUpperDeltaY(2000);

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.

Example:

GroupShape groupShape = shape.getGroup();

getType

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

Example:

/*Aspose.Cells.Drawing.AutoShapeType*/int autoShapeType = shape.getType();

hasLine/setHasLine

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

Example:

if(shape.hasLine() == false)
    shape.setHasLine(true);

isFilled/setFilled

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

Example:

if(shape.isFilled() == false)
    shape.setFilled(true);

isFlippedHorizontally/setFlippedHorizontally

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

Example:

if(shape.isFlippedHorizontally() == false)
    shape.setFlippedHorizontally(true);

isFlippedVertically/setFlippedVertically

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

Example:

if(shape.isFlippedVertically() == false)
    shape.setFlippedVertically(true);

getActualLowerRightRow

public int getActualLowerRightRow()
Get the actual bottom row.

Example:

int rRow = shape.getActualLowerRightRow();

getConnectionPoints

public java.awt.geom.Point2D.Float[] getConnectionPoints()
Get the connection points NOTE: This member is now obsolete. Instead, please use GetConnectionPoints() method. This method will be removed 12 months later since April 2022. Aspose apologizes for any inconvenience you may have experienced.

getRelativeToOriginalPictureSize/setRelativeToOriginalPictureSize

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

Example:

if(shape.getRelativeToOriginalPictureSize())
    shape.setRelativeToOriginalPictureSize(false);

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.

Example:

if (shape.getLinkedCell().equals("$B$6"))
    shape.setLinkedCell("A1");

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.

Example:

if (shape.getInputRange().equals("$B$6:$B10"))
    shape.setInputRange("$A$1:$A$5");

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.

Example:

if (shape.getTextShapeType() == com.aspose.cells.AutoShapeType.UNKNOWN)
    shape.setTextShapeType(com.aspose.cells.AutoShapeType.RECTANGLE);

getTextBody

public FontSettingCollection getTextBody()
Gets and sets the setting of the shape's text.

Example:

FontSettingCollection fontSettingCollection = shape.getTextBody();
fontSettingCollection.setText("This is a test.");

getFont/setFont

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

Example:

Font font = shape.getFont();
font.setName("Arial");
font.setSize(12);
font.setColor(Color.getRed());

getTextOptions/setTextOptions

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

Example:

TextOptions opt = shape.getTextOptions();
opt.setColor(Color.getBlue());
opt.setSize(8);

getText/setText

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

Example:

if(shape.getText() == null)
    shape.setText("This is a test.");

isRichText

public boolean isRichText()
Whether or not the text is rich text.

Example:

if(shape.isRichText())
    System.out.println("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.

Example:

String html = shape.getHtmlText();
if(html == null || "".equals(html))
{
    shape.setHtmlText("<Font Style='FONT-FAMILY: Calibri;FONT-SIZE: 11pt;COLOR: #0000ff;TEXT-ALIGN: left;'>This is a <b>test</b>.</Font>");
}

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.

Example:

if (shape.getTextVerticalOverflow() == com.aspose.cells.TextOverflowType.CLIP)
    shape.setTextVerticalOverflow(com.aspose.cells.TextOverflowType.OVERFLOW);

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.

Example:

if (shape.getTextHorizontalOverflow() == com.aspose.cells.TextOverflowType.CLIP)
    shape.setTextHorizontalOverflow(com.aspose.cells.TextOverflowType.OVERFLOW);

isTextWrapped/setTextWrapped

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

Example:

if (shape.isTextWrapped())
    shape.setTextWrapped(!shape.isTextWrapped());

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.

Example:

if (shape.getTextOrientationType() == com.aspose.cells.TextOrientationType.NO_ROTATION)
    shape.setTextOrientationType(com.aspose.cells.TextOrientationType.TOP_TO_BOTTOM);

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.

Example:

if (shape.getTextHorizontalAlignment() == com.aspose.cells.TextAlignmentType.BOTTOM)
    shape.setTextHorizontalAlignment(com.aspose.cells.TextAlignmentType.CENTER);

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.

Example:

if (shape.getTextVerticalAlignment() == com.aspose.cells.TextAlignmentType.BOTTOM)
    shape.setTextVerticalAlignment(com.aspose.cells.TextAlignmentType.CENTER);

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.

Example:

if (shape.getTextDirection() == com.aspose.cells.TextDirectionType.CONTEXT)
    shape.setTextDirection(com.aspose.cells.TextDirectionType.LEFT_TO_RIGHT);

getControlData

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

Example:

if(shape.getControlData() == null)
    System.out.println("No data.");

getActiveXControl

public ActiveXControl getActiveXControl()
Gets the ActiveX control.

Example:

CheckBoxActiveXControl checkBox1 = (CheckBoxActiveXControl)shape.getActiveXControl();
//The font name of CheckBox
String fontName = checkBox1.getFont().getName();

getPaths

public ShapePathCollection getPaths()
Gets the paths of a custom geometric shape.

Example:

//Returns non-null if there is a path to the custom geometry
if(shape.getPaths() == null)
    System.out.println("No custom geometry path.");

getGeometry

public Geometry getGeometry()
Gets the geometry

Example:

if (shape.getGeometry().getShapeAdjustValues().getCount() == 0)
    System.out.println("No geometry path.");

getCreateId

public java.util.UUID getCreateId()
Gets and sets create id for this shape.

Method Detail

getLinkedCell

public java.lang.String getLinkedCell(boolean isR1C1, boolean isLocal)
Gets the range linked to the control's value.
Parameters:
isR1C1 - Whether the formula needs to be formatted as R1C1.
isLocal - Whether the formula needs to be formatted by locale.
Returns:
The range linked to the control's value.

Example:

//You may get results like '$A$1'
String link = shape.getLinkedCell(false, false);

setLinkedCell

public void setLinkedCell(java.lang.String formula, boolean isR1C1, boolean isLocal)
Sets the range linked to the control's value.
Parameters:
formula - The range linked to the control's value.
isR1C1 - Whether the formula needs to be formatted as R1C1.
isLocal - Whether the formula needs to be formatted by locale.

Example:

//After executing the code below, a ScrollBar object is created in the generated file. As you drag the slider, the value is displayed in cell A12.

//ActiveX Controls
//Aspose.Cells.Drawing.Shape scrollBar = book.Worksheets[0].Shapes.AddActiveXControl( Aspose.Cells.Drawing.ActiveXControls.ControlType.ScrollBar,2, 0, 2, 0, 30, 130);

//Form Controls
Shape scrollBar = book.getWorksheets().get(0).getShapes().addScrollBar(2, 0, 2, 0, 130, 30);

//Sets the range linked to the control's value.
scrollBar.setLinkedCell("$A$12", false, true);

getInputRange

public java.lang.String getInputRange(boolean isR1C1, boolean isLocal)
Gets the range used to fill the control.
Parameters:
isR1C1 - Whether the formula needs to be formatted as R1C1.
isLocal - Whether the formula needs to be formatted by locale.
Returns:
The range used to fill the control.

Example:

String range = shape.getInputRange(false, true);
//If successful, a value like "$A$1:$A$3" will be returned

setInputRange

public void setInputRange(java.lang.String formula, boolean isR1C1, boolean isLocal)
Sets the range used to fill the control.
Parameters:
formula - The range used to fill the control.
isR1C1 - Whether the formula needs to be formatted as R1C1.
isLocal - Whether the formula needs to be formatted by locale.

Example:

//After executing the code below, a ListBox object is created in the generated file. When the selected option is clicked, the selected value is displayed in cell A12.

//Initialize a new workbook.
//Workbook book = new Workbook();
        
for (int i = 0; i< 10; ++i)
{
    Cell cell = book.getWorksheets().get(0).getCells().get(i, 0);
    cell.setValue(i + 1);
}
   
//Create a ListBox object

//ActiveX Controls
//Aspose.Cells.Drawing.Shape listBox = book.Worksheets[0].Shapes.AddActiveXControl( Aspose.Cells.Drawing.ActiveXControls.ControlType.ListBox,2, 0, 2, 0, 130, 130);

//Form Controls
Shape listBox = book.getWorksheets().get(0).getShapes().addListBox(2, 0, 2, 0, 130, 130);

//Sets the range used to fill the control.
listBox.setInputRange("$A$1:$A$6", false, false);

//Sets the range linked to the control's value.
listBox.setLinkedCell("$A$12", false, true);

updateSelectedValue

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

Example:

//Initialize a new workbook.
//Workbook book = new Workbook();
        
Cell cell = null;
for (int i = 0; i< 10; ++i)
{
    cell = book.getWorksheets().get(0).getCells().get(i, 0);
    cell.setValue(i + 1);
}
   
//Create a ListBox object

//ActiveX Controls
//Aspose.Cells.Drawing.Shape listBox = book.Worksheets[0].Shapes.AddActiveXControl( Aspose.Cells.Drawing.ActiveXControls.ControlType.ListBox,2, 0, 2, 0, 130, 130);

//Form Controls
Shape listBox = book.getWorksheets().get(0).getShapes().addListBox(2, 0, 2, 0, 130, 130);

//Sets the range used to fill the control.
listBox.setInputRange("$A$1:$A$6", false, false);

//Sets the range linked to the control's value.
listBox.setLinkedCell("$A$12", false, true);

ListBox listbx = (ListBox)listBox;

//Set the value of cell A12
cell = book.getWorksheets().get(0).getCells().get(11, 0);
cell.setValue(3);

//Update the selected value by the value of the linked cell.
listBox.updateSelectedValue();

//-1 default, no option selected
if(listbx.isSelected(2))
{
    //Option 3 of the ListBox is selected
}

//Change the value of a linked cell
cell.setValue(4);

//Update the selected value by the value of the linked cell.
listBox.updateSelectedValue();
if(listbx.isSelected(3))
{
    //Option 4 of the ListBox is selected
}

calculateTextSize

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

Example:

//The size of the text area is:w=size[0],h=size[1]
int[] size = shape.calculateTextSize();

formatCharacters

public void formatCharacters(int startIndex, int length, Font font, StyleFlag flag)
                     throws java.lang.Exception
Formats some characters with the font setting.
Parameters:
startIndex - The start index.
length - The length.
font - The font setting.
flag - The flag of the font setting.

formatCharacters

public void formatCharacters(int startIndex, int length, Font font)
Formats some characters 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 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.

Example:

FontSetting fontSetting = shape.characters(0, 4);

getCharacters

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

Example:

ArrayList list = shape.getCharacters();

removeActiveXControl

public void removeActiveXControl()
Remove activeX control.

Example:

shape.removeActiveXControl();

isSameSetting

public boolean isSameSetting(java.lang.Object obj)
Returns whether the shape is same.
Parameters:
obj -
Returns:

Example:

if (shape.isSameSetting(shape))
    System.out.println("Two objects the same.");

getConnectionPoints

public float[][] getConnectionPoints()
Get the connection points
Returns:
[X,Y] pairs of the connection point. Every item is a float[2] array, [0] represents x and [1] represents y.

Example:

float[][] points = shape.getConnectionPoints();

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.

Example:

ImageOrPrintOptions op = new ImageOrPrintOptions();
shape.toImage("exmaple.png", op);

toImage

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

getResultOfSmartArt

public GroupShape getResultOfSmartArt()
                              throws java.lang.Exception
Converting smart art to grouped shapes.

Example:

GroupShape groupShape = shape.getResultOfSmartArt();

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, sets the shape to back. If it's greater than zero, brings the shape to front.

Example:

shape.toFrontOrBack(2);
//or shape.ToFrontOrBack(-1);

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.

Example:

int noAdjustHandles = 0;
if (shape.getLockedProperty(ShapeLockType.ADJUST_HANDLES))
    noAdjustHandles = 1;

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.

Example:

shape.setLockedProperty(ShapeLockType.ADJUST_HANDLES, true);

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.

Example:

Hyperlink hyperlink = shape.addHyperlink("https://www.aspose.com/");

removeHyperlink

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

Example:

shape.removeHyperlink();

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

Example:

shape.moveToRange(12, 3, 13, 5);

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.

Example:

shape.alignTopRightCorner(2, 5);

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