ShapeBase

Overview

ShapeBase is a class in Aspose.Words FOSS for Java. Inherits from: CompositeNode<Node>, IInline, IShape, and 7 more.

Base class for objects in the drawing layer, such as an AutoShape, freeform, OLE object, ActiveX control, or picture.

Edition status of its 168 listed members (a property and its accessor methods are listed separately, overloads once): 168 not yet exercised by a verified example.

This class declares 106 methods for ShapeBase objects in Java programs. Available methods include: adjustWithEffects, canHaveImage, getAllowOverlap, getAlternativeText, getAnchorLocked, getAspectRatioLocked, getBehindText, getBottom, getBounds, getBoundsInPoints, getBoundsWithEffects, getCoordOrigin, and 92 additional methods. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package. Properties: allowOverlap, alternativeText, anchorLocked, aspectRatioLocked, behindText, bottom, and 58 more.

Properties

NameTypeAccessDescription
fillFillReadGets fill formatting for the shape.
shadowFormatShadowFormatReadGets shadow formatting for the shape.
glowGlowFormatReadGets glow formatting for the shape.
reflectionReflectionFormatReadGets reflection formatting for the shape.
softEdgeSoftEdgeFormatReadGets soft edge formatting for the shape.
screenTipStringRead/WriteDefines the text displayed when the mouse pointer moves over the shape.
hRefStringRead/WriteGets or sets the full hyperlink address for a shape.
targetStringRead/WriteGets or sets the target frame for the shape hyperlink.
alternativeTextStringRead/WriteDefines alternative text to be displayed instead of a graphic.
decorativebooleanRead/WriteGets or sets the flag that specifies whether the shape is decorative in the document.
titleStringRead/WriteGets or sets the title (caption) of the current shape object.
nameStringRead/WriteGets or sets the optional shape name.
insertRevisionbooleanReadGets the insert revision.
deleteRevisionbooleanReadGets the delete revision.
moveFromRevisionbooleanReadGets the move from revision.
moveToRevisionbooleanReadGets the move to revision.
topLevelbooleanReadReturns true if this shape is not a child of a group shape.
groupbooleanReadReturns true if this is a group shape.
imagebooleanReadReturns true if this shape is an image shape.
horizontalRulebooleanReadReturns true if this shape is a horizontal rule.
wordArtbooleanReadReturns true if this shape is a WordArt object.
anchorLockedbooleanRead/WriteSpecifies whether the shape’s anchor is locked.
aspectRatioLockedbooleanRead/WriteSpecifies whether the shape’s aspect ratio is locked.
allowOverlapbooleanRead/WriteGets or sets a value that specifies whether this shape can overlap other shapes.
behindTextbooleanRead/WriteSpecifies whether the shape is below or above text.
inlinebooleanReadA quick way to determine if this shape is positioned inline with text.
leftdoubleRead/WriteGets or sets the position of the left edge of the containing block of the shape.
topdoubleRead/WriteGets or sets the position of the top edge of the containing block of the shape.
rightdoubleReadGets the position of the right edge of the containing block of the shape.
bottomdoubleReadGets the position of the bottom edge of the containing block of the shape.
widthdoubleRead/WriteGets or sets the width of the containing block of the shape.
heightdoubleRead/WriteGets or sets the height of the containing block of the shape.
distanceTopdoubleRead/WriteReturns or sets the distance (in points) between the document text and the top edge of the shape.
distanceBottomdoubleRead/WriteReturns or sets the distance (in points) between the document text and the bottom edge of the shape.
distanceLeftdoubleRead/WriteReturns or sets the distance (in points) between the document text and the left edge of the shape.
distanceRightdoubleRead/WriteReturns or sets the distance (in points) between the document text and the right edge of the shape.
rotationdoubleRead/WriteDefines the angle (in degrees) that a shape is rotated.
zOrderintRead/WriteDetermines the display order of overlapping shapes.
parentParagraphParagraphReadReturns the immediate parent paragraph.
boundsjava.awt.geom.Rectangle2D.FloatRead/WriteGets or sets the bounds.
boundsInPointsjava.awt.geom.Rectangle2D.FloatReadGets the bounds in points.
boundsWithEffectsjava.awt.geom.Rectangle2D.FloatReadGets the bounds with effects.
shapeTypeintReadGets the shape type.
markupLanguagebyteReadGets MarkupLanguage used for this graphic object.
sizeInPointsjava.awt.geom.Point2D.FloatReadGets the size in points.
flipOrientationintRead/WriteSwitches the orientation of a shape.
relativeHorizontalPositionintRead/WriteSpecifies relative to what the shape is positioned horizontally.
relativeVerticalPositionintRead/WriteSpecifies relative to what the shape is positioned vertically.
relativeHorizontalSizeintRead/WriteGets or sets the value of shape’s relative size in horizontal direction.
relativeVerticalSizeintRead/WriteGets or sets the value of shape’s relative size in vertical direction.
leftRelativefloatRead/WriteGets or sets the value that represents shape’s relative left position in percent.
topRelativefloatRead/WriteGets or sets the value that represents shape’s relative top position in percent.
heightRelativefloatRead/WriteGets or sets the value that represents the percentage of shape’s relative height.
widthRelativefloatRead/WriteGets or sets the value that represents the percentage of shape’s relative width.
horizontalAlignmentintRead/WriteSpecifies how the shape is positioned horizontally.
verticalAlignmentintRead/WriteSpecifies how the shape is positioned vertically.
wrapTypeintRead/WriteDefines whether the shape is inline or floating.
wrapSideintRead/WriteSpecifies how the text is wrapped around the shape.
coordOriginjava.awt.PointRead/WriteGets or sets the coord origin.
coordSizejava.awt.DimensionRead/WriteGets or sets the coord size.
fontFontReadProvides access to the font formatting of this object.
signatureLinebooleanReadIndicates that shape is a SignatureLine.
layoutInCellbooleanRead/WriteGets or sets a flag indicating whether the shape is displayed inside a table or outside of it.
hiddenbooleanRead/WriteGets or sets a boolean value indicating whether the shape is visible.

Methods

SignatureDescription
localToParent(value: java.awt.geom.Point2D.Float) → java.awt.geom.Point2D.FloatCalls localToParent(value) on this ShapeBase instance.
getFill() → FillGets fill formatting for the shape.
getShadowFormat() → ShadowFormatGets shadow formatting for the shape.
getGlow() → GlowFormatGets glow formatting for the shape.
getReflection() → ReflectionFormatGets reflection formatting for the shape.
getSoftEdge() → SoftEdgeFormatGets soft edge formatting for the shape.
getScreenTip() → StringDefines the text displayed when the mouse pointer moves over the shape.
setScreenTip(value: String)Sets the screen tip value.
getHRef() → StringGets or sets the full hyperlink address for a shape.
setHRef(value: String)Sets the h ref value.
getTarget() → StringGets or sets the target frame for the shape hyperlink.
setTarget(value: String)Sets the target value.
getAlternativeText() → StringDefines alternative text to be displayed instead of a graphic.
setAlternativeText(value: String)Sets the alternative text value.
isDecorative() → booleanGets or sets the flag that specifies whether the shape is decorative in the document.
isDecorative(value: boolean)Calls isDecorative(value) on this ShapeBase instance.
getTitle() → StringGets or sets the title (caption) of the current shape object.
setTitle(value: String)Sets the title value.
getName() → StringGets or sets the optional shape name.
setName(value: String)Sets the name value.
isInsertRevision() → booleanReturns true if insert revision is set.
isDeleteRevision() → booleanReturns true if delete revision is set.
isMoveFromRevision() → booleanReturns true if move from revision is set.
isMoveToRevision() → booleanReturns true if move to revision is set.
isTopLevel() → booleanReturns true if this shape is not a child of a group shape.
isGroup() → booleanReturns true if this is a group shape.
isImage() → booleanReturns true if this shape is an image shape.
isHorizontalRule() → booleanReturns true if this shape is a horizontal rule.
isWordArt() → booleanReturns true if this shape is a WordArt object.
canHaveImage() → booleanReturns true if the shape type allows the shape to have an image.
getAnchorLocked() → booleanSpecifies whether the shape’s anchor is locked.
setAnchorLocked(value: boolean)Sets the anchor locked value.
getAspectRatioLocked() → booleanSpecifies whether the shape’s aspect ratio is locked.
setAspectRatioLocked(value: boolean)Sets the aspect ratio locked value.
getAllowOverlap() → booleanGets or sets a value that specifies whether this shape can overlap other shapes.
setAllowOverlap(value: boolean)Sets the allow overlap value.
getBehindText() → booleanSpecifies whether the shape is below or above text.
setBehindText(value: boolean)Sets the behind text value.
isInline() → booleanA quick way to determine if this shape is positioned inline with text.
getLeft() → doubleGets or sets the position of the left edge of the containing block of the shape.
setLeft(value: double)Sets the left value.
getTop() → doubleGets or sets the position of the top edge of the containing block of the shape.
setTop(value: double)Sets the top value.
getRight() → doubleGets the position of the right edge of the containing block of the shape.
getBottom() → doubleGets the position of the bottom edge of the containing block of the shape.
getWidth() → doubleGets or sets the width of the containing block of the shape.
setWidth(value: double)Sets the width value.
getHeight() → doubleGets or sets the height of the containing block of the shape.
setHeight(value: double)Sets the height value.
getDistanceTop() → doubleReturns or sets the distance (in points) between the document text and the top edge of the shape.
setDistanceTop(value: double)Sets the distance top value.
getDistanceBottom() → doubleReturns or sets the distance (in points) between the document text and the bottom edge of the shape.
setDistanceBottom(value: double)Sets the distance bottom value.
getDistanceLeft() → doubleReturns or sets the distance (in points) between the document text and the left edge of the shape.
setDistanceLeft(value: double)Sets the distance left value.
getDistanceRight() → doubleReturns or sets the distance (in points) between the document text and the right edge of the shape.
setDistanceRight(value: double)Sets the distance right value.
getRotation() → doubleDefines the angle (in degrees) that a shape is rotated.
setRotation(value: double)Sets the rotation value.
getZOrder() → intDetermines the display order of overlapping shapes.
setZOrder(value: int)Sets the z order value.
getParentParagraph() → ParagraphReturns the immediate parent paragraph.
getBounds() → java.awt.geom.Rectangle2D.FloatReturns the bounds.
setBounds(value: java.awt.geom.Rectangle2D.Float)Sets the bounds value.
getBoundsInPoints() → java.awt.geom.Rectangle2D.FloatReturns the bounds in points.
getBoundsWithEffects() → java.awt.geom.Rectangle2D.FloatReturns the bounds with effects.
adjustWithEffects(source: java.awt.geom.Rectangle2D.Float) → java.awt.geom.Rectangle2D.FloatCalls adjustWithEffects(source) on this ShapeBase instance.
getShapeType() → intGets the shape type.
getMarkupLanguage() → byteGets MarkupLanguage used for this graphic object.
getSizeInPoints() → java.awt.geom.Point2D.FloatReturns the size in points.
getFlipOrientation() → intSwitches the orientation of a shape.
setFlipOrientation(value: int)Sets the flip orientation value.
getRelativeHorizontalPosition() → intSpecifies relative to what the shape is positioned horizontally.
setRelativeHorizontalPosition(value: int)Sets the relative horizontal position value.
getRelativeVerticalPosition() → intSpecifies relative to what the shape is positioned vertically.
setRelativeVerticalPosition(value: int)Sets the relative vertical position value.
getRelativeHorizontalSize() → intGets or sets the value of shape’s relative size in horizontal direction.
setRelativeHorizontalSize(value: int)Sets the relative horizontal size value.
getRelativeVerticalSize() → intGets or sets the value of shape’s relative size in vertical direction.
setRelativeVerticalSize(value: int)Sets the relative vertical size value.
getLeftRelative() → floatGets or sets the value that represents shape’s relative left position in percent.
setLeftRelative(value: float)Sets the left relative value.
getTopRelative() → floatGets or sets the value that represents shape’s relative top position in percent.
setTopRelative(value: float)Sets the top relative value.
getHeightRelative() → floatGets or sets the value that represents the percentage of shape’s relative height.
setHeightRelative(value: float)Sets the height relative value.
getWidthRelative() → floatGets or sets the value that represents the percentage of shape’s relative width.
setWidthRelative(value: float)Sets the width relative value.
getHorizontalAlignment() → intSpecifies how the shape is positioned horizontally.
setHorizontalAlignment(value: int)Sets the horizontal alignment value.
getVerticalAlignment() → intSpecifies how the shape is positioned vertically.
setVerticalAlignment(value: int)Sets the vertical alignment value.
getWrapType() → intDefines whether the shape is inline or floating.
setWrapType(value: int)Sets the wrap type value.
getWrapSide() → intSpecifies how the text is wrapped around the shape.
setWrapSide(value: int)Sets the wrap side value.
getCoordOrigin() → java.awt.PointReturns the coord origin.
setCoordOrigin(value: java.awt.Point)Sets the coord origin value.
getCoordSize() → java.awt.DimensionReturns the coord size.
setCoordSize(value: java.awt.Dimension)Sets the coord size value.
getFont() → FontProvides access to the font formatting of this object.
isSignatureLine() → booleanIndicates that shape is a SignatureLine.
isLayoutInCell() → booleanGets or sets a flag indicating whether the shape is displayed inside a table or outside of it.
isLayoutInCell(value: boolean)Calls isLayoutInCell(value) on this ShapeBase instance.
getHidden() → booleanGets or sets a boolean value indicating whether the shape is visible.
setHidden(value: boolean)Sets the hidden value.

See Also