com.aspose.slides
Class Slide

java.lang.Object
  extended by com.aspose.slides.BaseSlide
      extended by com.aspose.slides.Slide
Direct Known Subclasses:
MainMaster

public class Slide
extends BaseSlide

Represents a slide in a presentation.


  
  [C#]
  foreach (Slide slide in pres.Slides)
  {
      Shapes shapes = slide.Shapes
      TextFrame tf;
      
      for (int j = 0; j < shapes.Count - 1; i++)
      {
          tf = shapes[j].TextFrame;
          if (tf != null)
              System.Console.WriteLine(tf.Text)
      }
  }
  [Visual Basic]
  Dim i As Integer
  For i = 0 To pres.Slides.Count - 1
      Dim shapes As Shapes = pres.Slides(i).Shapes
      Dim tf As TextFrame
      Dim j As Integer
      
      For j = 0 To shapes.Count - 1
          tf = shapes(j).TextFrame
          If Not tf Is Nothing Then
              System.Console.WriteLine(tf.Text)
          End If
      Next
  Next
  


Method Summary
 Notes addNotes()
           Adds empty notes to the slide.
 void applyColorScheme(ExtraColorScheme scheme)
           Copies all colors from extra color scheme to color scheme of this slide.
 void changeMaster(Slide newMaster)
           Replaces the master slide for a slide and changes placeholder's style.
 void changeMaster(Slide newMaster, boolean changeStyle)
           Replaces the master slide for a slide and optionally changes placeholder's style.
 Shape findShape(java.lang.String altText)
           Search and return the shape with defined alternative text.
 boolean getFollowMasterBackground()
           Determines whether the slide follows the slide master background.
 boolean getFollowMasterObjects()
           Determines whether the slide follows the slide master objects.
 boolean getFollowMasterScheme()
           Determines whether the slide follows the slide master scheme.
 HeaderFooter getHeaderFooter()
           Returns the header and footer settings for a slide.
 int getLayout()
           Returns or sets the slide layout.
 long getMasterId()
           Returns or sets the ID of a master slide.
 java.lang.String getName()
           Returns or sets the name of a slide.
 Notes getNotes()
           Returns the notes of the slide.
 java.awt.Color getSchemeColor(int index)
           
 CommentCollection getSlideComments()
           Returns the collection of slide comments.
 long getSlideId()
           Returns the ID of the slide.
 int getSlidePosition()
           Returns or sets the position of a slide.
 SlideShowTransition getSlideShowTransition()
           Returns the SlideShowTransition object which contains information about how the specified slide advances during a slide show.
 TagCollection getTags()
           Returns the tags of a slide.
 java.awt.image.BufferedImage getThumbnail()
           Returns a Thumbnail Image object (20% of real size).
 java.awt.image.BufferedImage getThumbnail(java.awt.Dimension imageSize)
           
 java.awt.image.BufferedImage getThumbnail(java.awt.Dimension imageSize, java.awt.Rectangle window, IDrawingControl drawingControl)
           
 java.awt.image.BufferedImage getThumbnail(double scaleX, double scaleY)
           Returns a Thumbnail Image object with custom scaling.
 java.awt.image.BufferedImage getThumbnail(double scaleX, double scaleY, java.awt.Rectangle window, IDrawingControl drawingControl)
           
 java.awt.image.BufferedImage getThumbnail(com.aspose.ms.System.Collections.ICollection elementsToDraw, java.awt.Dimension imageSize, java.awt.Rectangle window)
           
 java.awt.image.BufferedImage getThumbnail(com.aspose.ms.System.Collections.ICollection elementsToDraw, double scaleX, double scaleY, java.awt.Rectangle window)
           
 java.awt.image.BufferedImage getThumbnail(TiffOptions options)
           Returns a Thumbnail tiff bitmap object with specified parameters.
 boolean isMasterSlide()
           Determines whether the slide is a master slide.
 void saveToSVG(java.io.OutputStream stream)
           
 void saveToSVG(java.io.OutputStream stream, SVGOptions svgOptions)
           
 void saveToSVG(java.lang.String fname)
           Creates image of a slide in SVG (vector graphics) format.
 void saveToSVG(java.lang.String fname, SVGOptions svgOptions)
           Creates image of a slide in SVG (vector graphics) format.
 void setFollowMasterBackground(boolean value)
           
 void setFollowMasterObjects(boolean value)
           
 void setFollowMasterScheme(boolean value)
           
 void setMasterId(long value)
           
 void setName(java.lang.String value)
           
 void setSchemeColor(int index, java.awt.Color color)
           
 void setSlidePosition(int value)
           
 
Methods inherited from class com.aspose.slides.BaseSlide
getBackground, getParent, getParentPresentation, getPlaceholders, getShapes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addNotes

public Notes addNotes()

Adds empty notes to the slide.


getNotes

public Notes getNotes()

Returns the notes of the slide. Read-only Aspose.Slides.Notes.


getSlideId

public long getSlideId()

Returns the ID of the slide. Read-only uint.

Specified by:
getSlideId in class BaseSlide

getMasterId

public long getMasterId()

Returns or sets the ID of a master slide. Read/write uint.


setMasterId

public void setMasterId(long value)

isMasterSlide

public boolean isMasterSlide()

Determines whether the slide is a master slide. Read-only bool.

Overrides:
isMasterSlide in class BaseSlide

getSlidePosition

public int getSlidePosition()

Returns or sets the position of a slide. Returns <b>0</b> and doesn't change anything for master slides. Read/write int.


setSlidePosition

public void setSlidePosition(int value)

getLayout

public int getLayout()

Returns or sets the slide layout. Read-only SlideLayout.


getFollowMasterObjects

public boolean getFollowMasterObjects()

Determines whether the slide follows the slide master objects. Read/write bool.


setFollowMasterObjects

public void setFollowMasterObjects(boolean value)

getFollowMasterScheme

public boolean getFollowMasterScheme()

Determines whether the slide follows the slide master scheme. Read/write bool.


setFollowMasterScheme

public void setFollowMasterScheme(boolean value)

getFollowMasterBackground

public boolean getFollowMasterBackground()

Determines whether the slide follows the slide master background. Read/write bool.


setFollowMasterBackground

public void setFollowMasterBackground(boolean value)

getName

public java.lang.String getName()

Returns or sets the name of a slide. Read/write string.


setName

public void setName(java.lang.String value)

getSchemeColor

public java.awt.Color getSchemeColor(int index)
Overrides:
getSchemeColor in class BaseSlide

setSchemeColor

public void setSchemeColor(int index,
                           java.awt.Color color)

getThumbnail

public java.awt.image.BufferedImage getThumbnail(double scaleX,
                                                 double scaleY)

Returns a Thumbnail Image object with custom scaling.

Parameters:
scaleX - The value by which to scale this Thumbnail in the x-axis direction.
scaleY - The value by which to scale this Thumbnail in the y-axis direction.
Returns:
Image object.

getThumbnail

public java.awt.image.BufferedImage getThumbnail(com.aspose.ms.System.Collections.ICollection elementsToDraw,
                                                 java.awt.Dimension imageSize,
                                                 java.awt.Rectangle window)

getThumbnail

public java.awt.image.BufferedImage getThumbnail(com.aspose.ms.System.Collections.ICollection elementsToDraw,
                                                 double scaleX,
                                                 double scaleY,
                                                 java.awt.Rectangle window)

getThumbnail

public java.awt.image.BufferedImage getThumbnail(double scaleX,
                                                 double scaleY,
                                                 java.awt.Rectangle window,
                                                 IDrawingControl drawingControl)

getThumbnail

public java.awt.image.BufferedImage getThumbnail(java.awt.Dimension imageSize)

getThumbnail

public java.awt.image.BufferedImage getThumbnail(java.awt.Dimension imageSize,
                                                 java.awt.Rectangle window,
                                                 IDrawingControl drawingControl)

getThumbnail

public java.awt.image.BufferedImage getThumbnail(TiffOptions options)

Returns a Thumbnail tiff bitmap object with specified parameters.

Parameters:
options - Tiff options.
Returns:
Bitmap object.

saveToSVG

public void saveToSVG(java.lang.String fname)

Creates image of a slide in SVG (vector graphics) format.

Parameters:
fname - Path to SVG file.

saveToSVG

public void saveToSVG(java.io.OutputStream stream)

saveToSVG

public void saveToSVG(java.lang.String fname,
                      SVGOptions svgOptions)

Creates image of a slide in SVG (vector graphics) format.

Parameters:
fname - Path to SVG file.
svgOptions - Options of a created SVG file.

saveToSVG

public void saveToSVG(java.io.OutputStream stream,
                      SVGOptions svgOptions)

getThumbnail

public java.awt.image.BufferedImage getThumbnail()

Returns a Thumbnail Image object (20% of real size).


getSlideShowTransition

public SlideShowTransition getSlideShowTransition()

Returns the SlideShowTransition object which contains information about how the specified slide advances during a slide show. Read-only Aspose.Slides.SlideShowTransition.


changeMaster

public void changeMaster(Slide newMaster)

Replaces the master slide for a slide and changes placeholder's style.

Parameters:
newMaster - New master slide.

changeMaster

public void changeMaster(Slide newMaster,
                         boolean changeStyle)

Replaces the master slide for a slide and optionally changes placeholder's style.

Parameters:
newMaster - New master slide.
changeStyle - True to change style of placeholders.

getHeaderFooter

public HeaderFooter getHeaderFooter()

Returns the header and footer settings for a slide. Read-only Aspose.Slides.HeaderFooter.


getTags

public TagCollection getTags()

Returns the tags of a slide. Read-only Aspose.Slides.TagCollection.


getSlideComments

public CommentCollection getSlideComments()

Returns the collection of slide comments. Read-only CommentCollection.


findShape

public Shape findShape(java.lang.String altText)

Search and return the shape with defined alternative text.

Parameters:
altText - Alternative text to find.
Returns:
Shape object.

applyColorScheme

public void applyColorScheme(ExtraColorScheme scheme)

Copies all colors from extra color scheme to color scheme of this slide.

Parameters:
scheme - Source color scheme