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
| Name | Type | Access | Description |
|---|---|---|---|
fill | Fill | Read | Gets fill formatting for the shape. |
shadowFormat | ShadowFormat | Read | Gets shadow formatting for the shape. |
glow | GlowFormat | Read | Gets glow formatting for the shape. |
reflection | ReflectionFormat | Read | Gets reflection formatting for the shape. |
softEdge | SoftEdgeFormat | Read | Gets soft edge formatting for the shape. |
screenTip | String | Read/Write | Defines the text displayed when the mouse pointer moves over the shape. |
hRef | String | Read/Write | Gets or sets the full hyperlink address for a shape. |
target | String | Read/Write | Gets or sets the target frame for the shape hyperlink. |
alternativeText | String | Read/Write | Defines alternative text to be displayed instead of a graphic. |
decorative | boolean | Read/Write | Gets or sets the flag that specifies whether the shape is decorative in the document. |
title | String | Read/Write | Gets or sets the title (caption) of the current shape object. |
name | String | Read/Write | Gets or sets the optional shape name. |
insertRevision | boolean | Read | Gets the insert revision. |
deleteRevision | boolean | Read | Gets the delete revision. |
moveFromRevision | boolean | Read | Gets the move from revision. |
moveToRevision | boolean | Read | Gets the move to revision. |
topLevel | boolean | Read | Returns true if this shape is not a child of a group shape. |
group | boolean | Read | Returns true if this is a group shape. |
image | boolean | Read | Returns true if this shape is an image shape. |
horizontalRule | boolean | Read | Returns true if this shape is a horizontal rule. |
wordArt | boolean | Read | Returns true if this shape is a WordArt object. |
anchorLocked | boolean | Read/Write | Specifies whether the shape’s anchor is locked. |
aspectRatioLocked | boolean | Read/Write | Specifies whether the shape’s aspect ratio is locked. |
allowOverlap | boolean | Read/Write | Gets or sets a value that specifies whether this shape can overlap other shapes. |
behindText | boolean | Read/Write | Specifies whether the shape is below or above text. |
inline | boolean | Read | A quick way to determine if this shape is positioned inline with text. |
left | double | Read/Write | Gets or sets the position of the left edge of the containing block of the shape. |
top | double | Read/Write | Gets or sets the position of the top edge of the containing block of the shape. |
right | double | Read | Gets the position of the right edge of the containing block of the shape. |
bottom | double | Read | Gets the position of the bottom edge of the containing block of the shape. |
width | double | Read/Write | Gets or sets the width of the containing block of the shape. |
height | double | Read/Write | Gets or sets the height of the containing block of the shape. |
distanceTop | double | Read/Write | Returns or sets the distance (in points) between the document text and the top edge of the shape. |
distanceBottom | double | Read/Write | Returns or sets the distance (in points) between the document text and the bottom edge of the shape. |
distanceLeft | double | Read/Write | Returns or sets the distance (in points) between the document text and the left edge of the shape. |
distanceRight | double | Read/Write | Returns or sets the distance (in points) between the document text and the right edge of the shape. |
rotation | double | Read/Write | Defines the angle (in degrees) that a shape is rotated. |
zOrder | int | Read/Write | Determines the display order of overlapping shapes. |
parentParagraph | Paragraph | Read | Returns the immediate parent paragraph. |
bounds | java.awt.geom.Rectangle2D.Float | Read/Write | Gets or sets the bounds. |
boundsInPoints | java.awt.geom.Rectangle2D.Float | Read | Gets the bounds in points. |
boundsWithEffects | java.awt.geom.Rectangle2D.Float | Read | Gets the bounds with effects. |
shapeType | int | Read | Gets the shape type. |
markupLanguage | byte | Read | Gets MarkupLanguage used for this graphic object. |
sizeInPoints | java.awt.geom.Point2D.Float | Read | Gets the size in points. |
flipOrientation | int | Read/Write | Switches the orientation of a shape. |
relativeHorizontalPosition | int | Read/Write | Specifies relative to what the shape is positioned horizontally. |
relativeVerticalPosition | int | Read/Write | Specifies relative to what the shape is positioned vertically. |
relativeHorizontalSize | int | Read/Write | Gets or sets the value of shape’s relative size in horizontal direction. |
relativeVerticalSize | int | Read/Write | Gets or sets the value of shape’s relative size in vertical direction. |
leftRelative | float | Read/Write | Gets or sets the value that represents shape’s relative left position in percent. |
topRelative | float | Read/Write | Gets or sets the value that represents shape’s relative top position in percent. |
heightRelative | float | Read/Write | Gets or sets the value that represents the percentage of shape’s relative height. |
widthRelative | float | Read/Write | Gets or sets the value that represents the percentage of shape’s relative width. |
horizontalAlignment | int | Read/Write | Specifies how the shape is positioned horizontally. |
verticalAlignment | int | Read/Write | Specifies how the shape is positioned vertically. |
wrapType | int | Read/Write | Defines whether the shape is inline or floating. |
wrapSide | int | Read/Write | Specifies how the text is wrapped around the shape. |
coordOrigin | java.awt.Point | Read/Write | Gets or sets the coord origin. |
coordSize | java.awt.Dimension | Read/Write | Gets or sets the coord size. |
font | Font | Read | Provides access to the font formatting of this object. |
signatureLine | boolean | Read | Indicates that shape is a SignatureLine. |
layoutInCell | boolean | Read/Write | Gets or sets a flag indicating whether the shape is displayed inside a table or outside of it. |
hidden | boolean | Read/Write | Gets or sets a boolean value indicating whether the shape is visible. |
Methods
| Signature | Description |
|---|---|
localToParent(value: java.awt.geom.Point2D.Float) → java.awt.geom.Point2D.Float | Calls localToParent(value) on this ShapeBase instance. |
getFill() → Fill | Gets fill formatting for the shape. |
getShadowFormat() → ShadowFormat | Gets shadow formatting for the shape. |
getGlow() → GlowFormat | Gets glow formatting for the shape. |
getReflection() → ReflectionFormat | Gets reflection formatting for the shape. |
getSoftEdge() → SoftEdgeFormat | Gets soft edge formatting for the shape. |
getScreenTip() → String | Defines the text displayed when the mouse pointer moves over the shape. |
setScreenTip(value: String) | Sets the screen tip value. |
getHRef() → String | Gets or sets the full hyperlink address for a shape. |
setHRef(value: String) | Sets the h ref value. |
getTarget() → String | Gets or sets the target frame for the shape hyperlink. |
setTarget(value: String) | Sets the target value. |
getAlternativeText() → String | Defines alternative text to be displayed instead of a graphic. |
setAlternativeText(value: String) | Sets the alternative text value. |
isDecorative() → boolean | Gets 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() → String | Gets or sets the title (caption) of the current shape object. |
setTitle(value: String) | Sets the title value. |
getName() → String | Gets or sets the optional shape name. |
setName(value: String) | Sets the name value. |
isInsertRevision() → boolean | Returns true if insert revision is set. |
isDeleteRevision() → boolean | Returns true if delete revision is set. |
isMoveFromRevision() → boolean | Returns true if move from revision is set. |
isMoveToRevision() → boolean | Returns true if move to revision is set. |
isTopLevel() → boolean | Returns true if this shape is not a child of a group shape. |
isGroup() → boolean | Returns true if this is a group shape. |
isImage() → boolean | Returns true if this shape is an image shape. |
isHorizontalRule() → boolean | Returns true if this shape is a horizontal rule. |
isWordArt() → boolean | Returns true if this shape is a WordArt object. |
canHaveImage() → boolean | Returns true if the shape type allows the shape to have an image. |
getAnchorLocked() → boolean | Specifies whether the shape’s anchor is locked. |
setAnchorLocked(value: boolean) | Sets the anchor locked value. |
getAspectRatioLocked() → boolean | Specifies whether the shape’s aspect ratio is locked. |
setAspectRatioLocked(value: boolean) | Sets the aspect ratio locked value. |
getAllowOverlap() → boolean | Gets or sets a value that specifies whether this shape can overlap other shapes. |
setAllowOverlap(value: boolean) | Sets the allow overlap value. |
getBehindText() → boolean | Specifies whether the shape is below or above text. |
setBehindText(value: boolean) | Sets the behind text value. |
isInline() → boolean | A quick way to determine if this shape is positioned inline with text. |
getLeft() → double | Gets or sets the position of the left edge of the containing block of the shape. |
setLeft(value: double) | Sets the left value. |
getTop() → double | Gets or sets the position of the top edge of the containing block of the shape. |
setTop(value: double) | Sets the top value. |
getRight() → double | Gets the position of the right edge of the containing block of the shape. |
getBottom() → double | Gets the position of the bottom edge of the containing block of the shape. |
getWidth() → double | Gets or sets the width of the containing block of the shape. |
setWidth(value: double) | Sets the width value. |
getHeight() → double | Gets or sets the height of the containing block of the shape. |
setHeight(value: double) | Sets the height value. |
getDistanceTop() → double | Returns 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() → double | Returns 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() → double | Returns 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() → double | Returns 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() → double | Defines the angle (in degrees) that a shape is rotated. |
setRotation(value: double) | Sets the rotation value. |
getZOrder() → int | Determines the display order of overlapping shapes. |
setZOrder(value: int) | Sets the z order value. |
getParentParagraph() → Paragraph | Returns the immediate parent paragraph. |
getBounds() → java.awt.geom.Rectangle2D.Float | Returns the bounds. |
setBounds(value: java.awt.geom.Rectangle2D.Float) | Sets the bounds value. |
getBoundsInPoints() → java.awt.geom.Rectangle2D.Float | Returns the bounds in points. |
getBoundsWithEffects() → java.awt.geom.Rectangle2D.Float | Returns the bounds with effects. |
adjustWithEffects(source: java.awt.geom.Rectangle2D.Float) → java.awt.geom.Rectangle2D.Float | Calls adjustWithEffects(source) on this ShapeBase instance. |
getShapeType() → int | Gets the shape type. |
getMarkupLanguage() → byte | Gets MarkupLanguage used for this graphic object. |
getSizeInPoints() → java.awt.geom.Point2D.Float | Returns the size in points. |
getFlipOrientation() → int | Switches the orientation of a shape. |
setFlipOrientation(value: int) | Sets the flip orientation value. |
getRelativeHorizontalPosition() → int | Specifies relative to what the shape is positioned horizontally. |
setRelativeHorizontalPosition(value: int) | Sets the relative horizontal position value. |
getRelativeVerticalPosition() → int | Specifies relative to what the shape is positioned vertically. |
setRelativeVerticalPosition(value: int) | Sets the relative vertical position value. |
getRelativeHorizontalSize() → int | Gets or sets the value of shape’s relative size in horizontal direction. |
setRelativeHorizontalSize(value: int) | Sets the relative horizontal size value. |
getRelativeVerticalSize() → int | Gets or sets the value of shape’s relative size in vertical direction. |
setRelativeVerticalSize(value: int) | Sets the relative vertical size value. |
getLeftRelative() → float | Gets or sets the value that represents shape’s relative left position in percent. |
setLeftRelative(value: float) | Sets the left relative value. |
getTopRelative() → float | Gets or sets the value that represents shape’s relative top position in percent. |
setTopRelative(value: float) | Sets the top relative value. |
getHeightRelative() → float | Gets or sets the value that represents the percentage of shape’s relative height. |
setHeightRelative(value: float) | Sets the height relative value. |
getWidthRelative() → float | Gets or sets the value that represents the percentage of shape’s relative width. |
setWidthRelative(value: float) | Sets the width relative value. |
getHorizontalAlignment() → int | Specifies how the shape is positioned horizontally. |
setHorizontalAlignment(value: int) | Sets the horizontal alignment value. |
getVerticalAlignment() → int | Specifies how the shape is positioned vertically. |
setVerticalAlignment(value: int) | Sets the vertical alignment value. |
getWrapType() → int | Defines whether the shape is inline or floating. |
setWrapType(value: int) | Sets the wrap type value. |
getWrapSide() → int | Specifies how the text is wrapped around the shape. |
setWrapSide(value: int) | Sets the wrap side value. |
getCoordOrigin() → java.awt.Point | Returns the coord origin. |
setCoordOrigin(value: java.awt.Point) | Sets the coord origin value. |
getCoordSize() → java.awt.Dimension | Returns the coord size. |
setCoordSize(value: java.awt.Dimension) | Sets the coord size value. |
getFont() → Font | Provides access to the font formatting of this object. |
isSignatureLine() → boolean | Indicates that shape is a SignatureLine. |
isLayoutInCell() → boolean | Gets 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() → boolean | Gets or sets a boolean value indicating whether the shape is visible. |
setHidden(value: boolean) | Sets the hidden value. |