com.aspose.slides
Class Shape

java.lang.Object
  extended by com.aspose.slides.Shape
Direct Known Subclasses:
AutoShape, Ellipse, GroupShape, Line, PictureFrame, Polyline, Rectangle, TextFrame

public class Shape
extends java.lang.Object

Represents a shape on a slide.


Method Summary
 Link addLink()
           Adds new link to a shape.
 TextFrame addTextFrame(java.lang.String text)
           Adds a new TextFrame to a shape.
 void clearLink()
           Clears Link.
 ShapeElement[] createShapeElements()
           Creates and returns array of shape's elements.
 ShapeElement[] createShapeElements(ShapeDrawingOptions shapeDrawingOptions)
           Creates array of shape's elements.
 java.lang.String getAlternativeText()
           Returns or sets the alternative text associated with a shape in a Web presentation.
 AnimationSettings getAnimationSettings()
           Returns the AnimationSettings object that contains animation properties for a shape.
 java.awt.Point[] getConnectionSites()
           Returns array of points, to which connector can be attached.
 java.awt.Point[] getConnectionSitesRaw()
           Returns array of points, to which connector can be attached.
 FillFormat getFillFormat()
           Returns the FillFormat object that contains fill formatting properties for a shape.
 boolean getFlipH()
          Deprecated. 
 boolean getFlipHorizontal()
           <b>True</b> if a shape was flipped horizontally.
 boolean getFlipV()
          Deprecated. 
 boolean getFlipVertical()
           <b>True</b> if a shape was flipped vertically.
 int getHeight()
           Returns or sets the height of the shape.
 boolean getHidden()
           Determines whether the shape is hidden.
 LineFormat getLineFormat()
           Returns the LineFormat object that contains line formatting properties for a shape.
 Link getLink()
           Return the Link object for a shape.
 int getMasterShapeId()
           Returns the unique Id of a master shape or 0 in case shape is not inherited from any master shapes.
 java.lang.String getName()
           Returns or sets the name of a shape.
 Slide getParent()
           Returns the parent slide.
 BaseSlide getParentSlide()
           Returns the parent slide.
 Placeholder getPlaceholder()
           Returns the Placeholder object for a shape in case of shape is a placeholder.
 long getProtection()
           Returns or sets the bit flags which determine how the shape is protected.
 int getRotation()
           Returns or sets the number of degrees the specified shape is rotated around the z-axis.
 ShadowFormat getShadowFormat()
           Returns the ShadowFormat object that contains shadow decoration properties for a shape.
 int getShapeId()
           Returns the unique Id of a shape.
 java.awt.Rectangle getShapeRectangle()
           
 TagCollection getTags()
           Returns the tags for a shape.
 TextFrame getTextFrame()
           Returns TextFrame object for the Shape.
 ThreeDFormat getThreeDFormat()
           Returns the ThreeDFormat object that contains 3D decoration properties for a shape.
 int getWidth()
           Returns or sets the width of the shape.
 int getX()
           Returns or sets the x-coordinate of the upper-left corner of the shape.
 int getY()
           Returns or sets the y-coordinate of the upper-left corner of the shape.
 int getZOrderPosition()
           Returns the position of a shape in the z-order.
 boolean hasExternalData()
           Determines whether the shape has external referenced data e.g.
 boolean isMasterTextHolder()
           <b>True</b> if shape is a master text holder.
 boolean isTextHolder()
           Returns true if shape is a TextHolder.
 void serialize(java.io.OutputStream stream)
           
 void setAlternativeText(java.lang.String value)
           
 void setFlipH(boolean value)
          Deprecated. 
 void setFlipHorizontal(boolean value)
           
 void setFlipV(boolean value)
          Deprecated. 
 void setFlipVertical(boolean value)
           
 void setHeight(int value)
           
 void setHidden(boolean value)
           
 void setName(java.lang.String value)
           
 void setProtection(long value)
           
 void setRotation(int value)
           
 void setWidth(int value)
           
 void setX(int value)
           
 void setY(int value)
           
 void zOrder(int cmd)
           Moves the shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isTextHolder

public boolean isTextHolder()

Returns true if shape is a TextHolder.


getPlaceholder

public Placeholder getPlaceholder()

Returns the Placeholder object for a shape in case of shape is a placeholder. Read-only Aspose.Slides.Placeholder.


isMasterTextHolder

public boolean isMasterTextHolder()

<b>True</b> if shape is a master text holder. Read-only bool.


getLineFormat

public LineFormat getLineFormat()

Returns the LineFormat object that contains line formatting properties for a shape. Read-only Aspose.Slides.LineFormat.


getFillFormat

public FillFormat getFillFormat()

Returns the FillFormat object that contains fill formatting properties for a shape. Read-only Aspose.Slides.FillFormat.


getShadowFormat

public ShadowFormat getShadowFormat()

Returns the ShadowFormat object that contains shadow decoration properties for a shape. Read-only Aspose.Slides.ShadowFormat.


getThreeDFormat

public ThreeDFormat getThreeDFormat()

Returns the ThreeDFormat object that contains 3D decoration properties for a shape. Read-only Aspose.Slides.ThreeDFormat.


getAnimationSettings

public AnimationSettings getAnimationSettings()

Returns the AnimationSettings object that contains animation properties for a shape. Read-only Aspose.Slides.AnimationSettings.


getLink

public Link getLink()

Return the Link object for a shape. Read-only Aspose.Slides.Link.


addLink

public Link addLink()

Adds new link to a shape.

Returns:
New Link object.

clearLink

public void clearLink()

Clears Link.


serialize

public void serialize(java.io.OutputStream stream)

getConnectionSitesRaw

public java.awt.Point[] getConnectionSitesRaw()

Returns array of points, to which connector can be attached. Coordinates aren't transformed and do not take into account shape's and its parents' FlipHorizontal, FlipHorizontal, FlipVertical and Rotation properties. Use Aspose.Slides.Shape.ConnectionSites instead. Readonly System.Drawing.Point[]


getConnectionSites

public java.awt.Point[] getConnectionSites()

Returns array of points, to which connector can be attached. Returned coordinates are in the document's coordinate system. Readonly System.Drawing.Point[]


createShapeElements

public ShapeElement[] createShapeElements()

Creates and returns array of shape's elements.

Returns:
Array of Aspose.Slides.ShapeElement

getShapeRectangle

public java.awt.Rectangle getShapeRectangle()

createShapeElements

public ShapeElement[] createShapeElements(ShapeDrawingOptions shapeDrawingOptions)

Creates array of shape's elements.

Returns:
Array of Aspose.Slides.ShapeElement

getParentSlide

public BaseSlide getParentSlide()

Returns the parent slide. Read-only BaseSlide.


getParent

public Slide getParent()

Returns the parent slide. Read-only Slide.


getZOrderPosition

public int getZOrderPosition()

Returns the position of a shape in the z-order. Shapes[0] returns the shape at the back of the z-order, and Shapes[Shapes.Count - 1] returns the shape at the front of the z-order. Read-only int.


zOrder

public void zOrder(int cmd)

Moves the shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order).

Parameters:
cmd - Specifies where to move the specified shape relative to the other shapes. See ZOrderCmd.

getAlternativeText

public java.lang.String getAlternativeText()

Returns or sets the alternative text associated with a shape in a Web presentation. Read/write string.


setAlternativeText

public void setAlternativeText(java.lang.String value)

getName

public java.lang.String getName()

Returns or sets the name of a shape. Returns real name value only if name was explicitly set. Read/write string.


setName

public void setName(java.lang.String value)

getHidden

public boolean getHidden()

Determines whether the shape is hidden. Read/write bool.


setHidden

public void setHidden(boolean value)

getProtection

public long getProtection()

Returns or sets the bit flags which determine how the shape is protected. Read/write ShapeProtection.


setProtection

public void setProtection(long value)

getRotation

public int getRotation()

Returns or sets the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Read/write int.


setRotation

public void setRotation(int value)

getX

public int getX()

Returns or sets the x-coordinate of the upper-left corner of the shape. Read/write int.


setX

public void setX(int value)

getY

public int getY()

Returns or sets the y-coordinate of the upper-left corner of the shape. Read/write int.


setY

public void setY(int value)

getWidth

public int getWidth()

Returns or sets the width of the shape. Read/write int.


setWidth

public void setWidth(int value)

getHeight

public int getHeight()

Returns or sets the height of the shape. Read/write int.


setHeight

public void setHeight(int value)

getFlipHorizontal

public boolean getFlipHorizontal()

<b>True</b> if a shape was flipped horizontally. Read/write bool.


setFlipHorizontal

public void setFlipHorizontal(boolean value)

getFlipH

@Deprecated
public boolean getFlipH()
Deprecated. 

<b>True</b> if a shape was flipped horizontally. Read/write bool.


setFlipH

@Deprecated
public void setFlipH(boolean value)
Deprecated. 


getFlipVertical

public boolean getFlipVertical()

<b>True</b> if a shape was flipped vertically. Read/write bool.


setFlipVertical

public void setFlipVertical(boolean value)

getFlipV

@Deprecated
public boolean getFlipV()
Deprecated. 

<b>True</b> if a shape was flipped vertically. Read/write bool.


setFlipV

@Deprecated
public void setFlipV(boolean value)
Deprecated. 


getShapeId

public int getShapeId()

Returns the unique Id of a shape. Read-only int.


getMasterShapeId

public int getMasterShapeId()

Returns the unique Id of a master shape or 0 in case shape is not inherited from any master shapes. Read-only int.


getTextFrame

public TextFrame getTextFrame()

Returns TextFrame object for the Shape. Read-only Aspose.Slides.TextFrame.


addTextFrame

public TextFrame addTextFrame(java.lang.String text)

Adds a new TextFrame to a shape. If shape already has TextFrame then do nothing.

Parameters:
text - Default text for a new TextFrame.

getTags

public TagCollection getTags()

Returns the tags for a shape. Read-only Aspose.Slides.TagCollection.


hasExternalData

public boolean hasExternalData()

Determines whether the shape has external referenced data e.g. OLE object or embedded sound. Read-only bool.