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 the abstract shape on a slide.


Method Summary
 Link addLink()
          Adds the new link to a shape.
 void addTextFrame(java.lang.String text)
          Adds a new TextFrame to a shape.
 void clearLink()
          Clears the Link.
 java.lang.String getAlternativeText()
          Returns the alternative text associated with a shape in a Web presentation.
 AnimationSettings getAnimationSettings()
          Returns the AnimationSettings object that contains animation properties for a shape.
 FillFormat getFillFormat()
          Returns the FillFormat object that contains fill formatting properties for a shape.
 int getHeight()
          Returns the height of a shape.
 LineFormat getLineFormat()
          Returns the LineFormat object that contains line formatting properties for a shape.
 Link getLink()
          Return the Link object for a shape.
 java.lang.String getName()
          Returns the name of a shape.
 Slide getParent()
          Returns the parent slide.
 int getRotation()
          Returns the number of degrees the specified shape is rotated around the z-axis.
 Tags getTags()
          Returns the tags for a shape.
 TextFrame getTextFrame()
          Returns the TextFrame object for a Shape.
 int getWidth()
          Returns the width of a shape.
 int getX()
          Returns the x-coordinate of the upper-left corner of a shape.
 int getY()
          Returns the y-coordinate of the upper-left corner of a shape.
 int getZOrderPosition()
          Returns the position of a shape in the z-order.
 boolean isFlipH()
          Determines whether the shape is flipped horizontally.
 boolean isFlipV()
          Determines whether the shape is flipped vertically.
 boolean isTextHolder()
          Returns true if shape is a TextHolder.
 void setAlternativeText(java.lang.String value)
          Sets the alternative text associated with a shape in a Web presentation.
 void setFlipH(boolean value)
          Flips the shape horizontally.
 void setFlipV(boolean value)
          Flips the shape vertically.
 void setHeight(int value)
          Sets the height of a shape.
 void setName(java.lang.String value)
          Sets the name of a shape.
 void setRotation(int value)
          Sets the number of degrees the specified shape is rotated around the z-axis.
 void setWidth(int value)
          Sets the width of a shape.
 void setX(int value)
          Sets the x-coordinate of the upper-left corner of a shape.
 void setY(int value)
          Sets the y-coordinate of the upper-left corner of a shape.
 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.

Returns:
true if shape is a TextHolder.

getLineFormat

public LineFormat getLineFormat()
Returns the LineFormat object that contains line formatting properties for a shape.

Returns:
The LineFormat object.

getFillFormat

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

Returns:
The FillFormat object.

getAnimationSettings

public AnimationSettings getAnimationSettings()
Returns the AnimationSettings object that contains animation properties for a shape.

Returns:
The AnimationSettings object.

getLink

public Link getLink()
Return the Link object for a shape.

Returns:
The Link object.

addLink

public Link addLink()
Adds the new link to a shape.

Returns:
The new Link object.

clearLink

public void clearLink()
Clears the Link.


getParent

public Slide getParent()
Returns the parent slide.

Returns:
The parent 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.

Returns:
The z-order position.

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.

getAlternativeText

public java.lang.String getAlternativeText()
Returns the alternative text associated with a shape in a Web presentation.

Returns:
The alternative text.

setAlternativeText

public void setAlternativeText(java.lang.String value)
Sets the alternative text associated with a shape in a Web presentation.

Parameters:
value - the alternative text.

getName

public java.lang.String getName()
Returns the name of a shape. Returns real name value only if name was explicitly set.

Returns:
The alternative text.

setName

public void setName(java.lang.String value)
Sets the name of a shape.

Parameters:
value - the alternative text.

getRotation

public int getRotation()
Returns 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.

Returns:
The rotation angle.

setRotation

public void setRotation(int value)
                 throws java.lang.Exception
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.

Parameters:
value - new rotation angle.
Throws:
java.lang.Exception

getX

public int getX()
Returns the x-coordinate of the upper-left corner of a shape.

Returns:
The x coordinate.

setX

public void setX(int value)
Sets the x-coordinate of the upper-left corner of a shape.

Parameters:
value - new x coordinate.

getY

public int getY()
Returns the y-coordinate of the upper-left corner of a shape.

Returns:
The y coordinate.

setY

public void setY(int value)
Sets the y-coordinate of the upper-left corner of a shape.

Parameters:
value - new y coordinate.

getWidth

public int getWidth()
Returns the width of a shape.

Returns:
The width of a shape.

setWidth

public void setWidth(int value)
Sets the width of a shape.

Parameters:
value - new width of a shape.

getHeight

public int getHeight()
Returns the height of a shape.

Returns:
The height of a shape.

setHeight

public void setHeight(int value)
Sets the height of a shape.

Parameters:
value - new height of a shape.

isFlipH

public boolean isFlipH()
Determines whether the shape is flipped horizontally.

Returns:
true if the shape is flipped horizontally.

setFlipH

public void setFlipH(boolean value)
              throws java.lang.Exception
Flips the shape horizontally.

Parameters:
value - true to flip the shape horizontally.
Throws:
java.lang.Exception

isFlipV

public boolean isFlipV()
Determines whether the shape is flipped vertically.

Returns:
true if the shape is flipped vertically.

setFlipV

public void setFlipV(boolean value)
              throws java.lang.Exception
Flips the shape vertically.

Parameters:
value - true to flip the shape vertically.
Throws:
java.lang.Exception

getTextFrame

public TextFrame getTextFrame()
Returns the TextFrame object for a Shape.

Returns:
The TextFrame object.

addTextFrame

public void addTextFrame(java.lang.String text)
                  throws PptEditException
Adds a new TextFrame to a shape. If shape already has TextFrame then do nothing.

Parameters:
text - Default text for a new TextFrame.
Throws:
PptEditException

getTags

public Tags getTags()
Returns the tags for a shape.

Returns:
the tags for a shape. See Tags.