概述 | 软件包 | 类 | 使用 | 树 | 索引 | 帮助

上一个类 下一个类 | 框架 无框架
摘要： 嵌套 | 字段 | 构造函数 | 方法 | 详细信息： 字段 | 构造函数 | 方法

## application.workbooks.workbook.presentations.presentation
类 Slide

    java.lang.Object
      application.workbooks.workbook.presentations.presentation.Slide

    public class Slide

extends java.lang.Object

该类提供了创建，获得幻灯片等的方法。

方法摘要
`void` | `export(java.lang.String fileName, java.lang.String filterName, int scaleWidth, int scaleheight)` 使用指定的图形筛选器导出一张幻灯片或幻灯片范围，并将导出的文件以指定的文件名保存。
`int` | `getAniamtionSchemeIndex()` 得到动画方案数据的索引值
`int` | `getAnimationSchemeType()` 得到动画方案的索引值
`application.workbooks.workbook.presentations.presentation.design.ColorScheme` | `getColorScheme()` 返回 ColorScheme 对象。
`application.workbooks.workbook.presentations.presentation.design.ColorSchemes` | `getColorSchemes()` 返回 ColorSchemes 对象。
`application.workbooks.workbook.presentations.presentation.slide.PgComments` | `getComments(PgShape shape)` 返回 Comments 对象，该对象代表批注的集合。
`application.workbooks.workbook.presentations.presentation.design.Design` | `getDesign()` 返回代表设计的 Design 对象。
`FillAttribute` | `getFillAttribute()` 返回幻灯片背景。
`application.workbooks.workbook.presentations.presentation.slide.HeaderFooter` | `getHeaderFooter(int index)` 返回其HeaderFooter对象
`int` | `getID()` 获得幻灯片ID。
`int` | `getLayout()` 返回PpSlideLayout 类型常数，该常数代表幻灯片版式。
`application.workbooks.workbook.presentations.presentation.Master` | `getMaster()` 返回一个代表幻灯片母版的 Master 对象。
`Slide` | `getNotesPage()` 返回一张幻灯片的备注页。
`PgShapes` | `getShapes()` 获取幻灯片中的浮动图形对象。
`int` | `getSlideIndex()` 返回 Slides 集合内指定幻灯片的索引号。
`int` | `getSlideNumber()` 返回幻灯片编号。
`application.workbooks.workbook.presentations.presentation.slide.SlideTransitionSetting` | `getSlideShowTransition()` 返回一个 SlideShowTransition 对象，该对象代表指定幻灯片切换的特殊效果。
`application.workbooks.workbook.presentations.presentation.animation.TimeLine` | `getTimeLine()` 返回 TimeLine 对象，该对象代表幻灯片的动画日程表。
`boolean` | `isDisplayMasterShapes()` 返回是否由指定的幻灯片显示幻灯片母版中的背景对象。
`boolean` | `isFollowMasterBackground()` 返回是否决定幻灯片或幻灯片范围是否继承幻灯片母版背景。
`void` | `moveTo(int toPos)` 将本幻灯片移动到同一集合中的指定位置，并适当地对集合中所有其他项目进行重新编号。
`void` | `select()` 选取本幻灯片。
`void` | `setAnimationScheme(int type, int index)` 根据动画方案列表中组的索引值和对应的数据的索引值添加
`void` | `setColorScheme(application.workbooks.workbook.presentations.presentation.design.ColorScheme colorScheme)` 设置 ColorScheme 对象。
`void` | `setDesign(application.workbooks.workbook.presentations.presentation.design.Design design)` 设置代表设计的 Design 对象。
`void` | `setDisplayMasterShapes(boolean display)` 决定是否由指定的幻灯片显示幻灯片母版中的背景对象。
`void` | `setFillAttribute(FillAttribute fillAttr)` 设置背景。
`void` | `setHeaderFooter(application.workbooks.workbook.presentations.presentation.slide.HeaderFooter headerFooter)` 设置一个 HeaderFooter 对象。
`void` | `setLayout(int layout)` 设置 PpSlideLayout 类型常数，该常数代表幻灯片版式。
`void` | `setSlideTransition(application.workbooks.workbook.presentations.presentation.slide.SlideTransitionSetting setting)` 应用幻灯片切换方式。
`void` | `setVisible(boolean isVisible)` 设置幻灯片是否显示。

从类 java.lang.Object 继承的方法
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

方法详细信息

### export

    public void export(java.lang.String fileName,
                       java.lang.String filterName,
                       int scaleWidth,
                       int scaleheight)

  使用指定的图形筛选器导出一张幻灯片或幻灯片范围，并将导出的文件以指定的文件名保存。

  参数：
    `fileName` - 将导出并保存到磁盘的文件的名称
    `filterName` - 要导出幻灯片的图形格式
    `scaleWidth` - 导出的幻灯片的宽度（以像素为单位）
    `scaleheight` - 导出的幻灯片的高度（以像素为单位）

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         slide.export("123", "jpg", 300, 200);

### getAniamtionSchemeIndex

    public int getAniamtionSchemeIndex()

  得到动画方案数据的索引值

  返回：
    动画方案数据的索引值

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         slide.setAnimationScheme(2,3);
         System.out.println(slide.getAniamtionSchemeIndex());

### getAnimationSchemeType

    public int getAnimationSchemeType()

  得到动画方案的索引值

  返回：
    动画方案组的索引值

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         slide.setAnimationScheme(2,3);
         System.out.println(slide.getAnimationSchemeType());

### getColorScheme

    public application.workbooks.workbook.presentations.presentation.design.ColorScheme getColorScheme()

  返回 ColorScheme 对象。

  返回：
    ColorScheme 对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getSlide(1);
         ColorScheme colorScheme = slide.getColorScheme();
         colorScheme.setSchemeValue(1,Color.RED);
         slide.setColorScheme(colorScheme);

### getColorSchemes

    public application.workbooks.workbook.presentations.presentation.design.ColorSchemes getColorSchemes()

  返回 ColorSchemes 对象。

  返回：
    ColorSchemes 对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getSlide(1);
         ColorSchemes colorSchemes = slide.getColorSchemes();

### getComments

    public application.workbooks.workbook.presentations.presentation.slide.PgComments getComments(PgShape shape)

  返回 Comments 对象，该对象代表批注的集合。

  返回：
    批注集合Comments 对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         PgShape shape = slide.getShapes().getAllShapes()[0];
         PgComments pgComments = slide.getComments(shape);
         System.out.println(pgComments.getCount());

### getDesign

    public application.workbooks.workbook.presentations.presentation.design.Design getDesign()

  返回代表设计的 Design 对象。

  返回：
    代表设计的 Design 对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getSlide(1);
         Design design = slide.getDesign();
         design.setPreserved(true);
         slide.setDesign(design);

### getFillAttribute

    public FillAttribute getFillAttribute()

  返回幻灯片背景。

  返回：
    幻灯片背景FillAttribute属性

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         FillAttribute fill = slide.getFillAttribute();
         fill.setFillColorType(ChartConstants.FILL_CUSTOM);
         fill.getTextureAttribute().setTextureIndex(2);
         slide.setFillAttribute(fill);

### getHeaderFooter

    public application.workbooks.workbook.presentations.presentation.slide.HeaderFooter getHeaderFooter(int index)

  返回其HeaderFooter对象

  参数：
    `index` -

         0 = 幻灯片
         1 = 备注和讲义

  返回：
    HeaderFooter对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         HeaderFooter headerFooter = slide.getHeaderFooter(0);
         headerFooter.setVisible(true, 0);
         slide.setHeaderFooter(headerFooter);

### getID

    public int getID()

  获得幻灯片ID。

  返回：
    幻灯片ID

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         System.out.println(slide.getID());

### getLayout

    public int getLayout()

  返回PpSlideLayout 类型常数，该常数代表幻灯片版式。

  返回：
    PpSlideLayout 类型常数

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         slide.setLayout(3);
         System.out.println(slide.getLayout());

### getMaster

    public application.workbooks.workbook.presentations.presentation.Master getMaster()

  返回一个代表幻灯片母版的 Master 对象。

  返回：
    代表幻灯片母版的 Master 对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         Master master = slide.getMaster();
         master.setName("123");

### getNotesPage

    public Slide getNotesPage()

  返回一张幻灯片的备注页。

  返回：
    幻灯片的备注页

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         System.out.println(slide.getNotesPage());

### getShapes

    public PgShapes getShapes()

  获取幻灯片中的浮动图形对象。

  返回：
    浮动图形对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         PgShapes pgShapes = slide.getShapes();

### getSlideIndex

    public int getSlideIndex()

  返回 Slides 集合内指定幻灯片的索引号。

  返回：
    Slides 集合内指定幻灯片的索引号

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getSlide(3);
         System.out.println(slide.getSlideIndex());

### getSlideNumber

    public int getSlideNumber()

  返回幻灯片编号。 Slide 对象的 SlideNumber 属性是显示幻灯片编号时在幻灯片右下角出现的实际编号。 此编号由演示文稿（SlideIndex 属性值）中的幻灯片编号以及作为演示文稿（FirstSlideNumber 属性值)起始幻灯片的编号决定。 幻灯片编号总是等于开始幻灯片编号 + 幻灯片索引号 - 1。

  返回：
    幻灯片编号

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getSlide(3);
         System.out.println(slide.getSlideNumber());

### getSlideShowTransition

    public application.workbooks.workbook.presentations.presentation.slide.SlideTransitionSetting getSlideShowTransition()

  返回一个 SlideShowTransition 对象，该对象代表指定幻灯片切换的特殊效果。

  返回：
    代表指定幻灯片切换的特殊效果的 SlideShowTransition 对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         SlideTransitionSetting slideTransitionSetting = slide.getSlideShowTransition();
         slideTransitionSetting.setLoop(true);
         slide.setSlideTransition(slideTransitionSetting);

### getTimeLine

    public application.workbooks.workbook.presentations.presentation.animation.TimeLine getTimeLine()

  返回 TimeLine 对象，该对象代表幻灯片的动画日程表。

  返回：
    代表幻灯片的动画日程表的TimeLine 对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         slide.getTimeLine();
         ....待续

### isDisplayMasterShapes

    public boolean isDisplayMasterShapes()

  返回是否由指定的幻灯片显示幻灯片母版中的背景对象。

  返回：
    是否由指定的幻灯片显示幻灯片母版中的背景对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         slide.setDisplayMasterShapes(true);
         System.out.println(slide.isDisplayMasterShapes());

### isFollowMasterBackground

    public boolean isFollowMasterBackground()

  返回是否决定幻灯片或幻灯片范围是否继承幻灯片母版背景。

  返回：
    是否决定幻灯片或幻灯片范围是否继承幻灯片母版背景。

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         System.out.println(slide.isFollowMasterBackground());

### moveTo

    public void moveTo(int toPos)

  将本幻灯片移动到同一集合中的指定位置，并适当地对集合中所有其他项目进行重新编号。

  参数：
    `toPos` -

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         slide.moveTo(5);

### select

    public void select()

  选取本幻灯片。

  例子：

       Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
       Presentation present = workbook.getPresentations().getActivePresentation();
       Slides slides = present.getSlides();
       Slide slide = slides.getSlide(3);
       slide.select();

### setAnimationScheme

    public void setAnimationScheme(int type,
                                   int index)

  根据动画方案列表中组的索引值和对应的数据的索引值添加

  参数：
    `type` - 列表中组的索引值 ,其常量和相应的值如下：

          AnimationSettingConstants.MINUTELY = 2 (细微)
          AnimationSettingConstants.GENTLE = 3 (温和)
          AnimationSettingConstants.BRAVERY = 4 (华丽)

    `index` - 对应的数据的索引值 index：各区域在面板中从0开始的值

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         slide.setAnimationScheme(2,3);

### setColorScheme

    public void setColorScheme(application.workbooks.workbook.presentations.presentation.design.ColorScheme colorScheme)

  设置 ColorScheme 对象。

  参数：
    `colorScheme` - 设置的ColorScheme对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getSlide(1);
         ColorScheme colorScheme = slide.getColorScheme();
         colorScheme.setSchemeValue(1,Color.RED);
         slide.setColorScheme(colorScheme);

### setDesign

    public void setDesign(application.workbooks.workbook.presentations.presentation.design.Design design)

  设置代表设计的 Design 对象。

  参数：
    `design` - 要设置Design对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getSlide(1);
         Design design = slide.getDesign();
         design.setPreserved(true);
         slide.setDesign(design);

### setDisplayMasterShapes

    public void setDisplayMasterShapes(boolean display)

  决定是否由指定的幻灯片显示幻灯片母版中的背景对象。

  参数：
    `display` - 是否由指定的幻灯片显示幻灯片母版中的背景对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getSlide();
         slide.setDisplayMasterShapes(true);
         System.out.println(slide.isDisplayMasterShapes());

### setFillAttribute

    public void setFillAttribute(FillAttribute fillAttr)

  设置背景。

  参数：
    `fillAttr` - 设置的背景

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         FillAttribute fill = slide.getFillAttribute();
         fill.setFillColorType(ChartConstants.FILL_CUSTOM);
         fill.getTextureAttribute().setTextureIndex(2);
         slide.setFillAttribute(fill);

### setHeaderFooter

    public void setHeaderFooter(application.workbooks.workbook.presentations.presentation.slide.HeaderFooter headerFooter)

  设置一个 HeaderFooter 对象。

  参数：
    `headerFooter` - 设置的HeaderFooter对象

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         HeaderFooter headerFooter = slide.getHeaderFooter(0);
         headerFooter.setVisible(true, 0);
         slide.setHeaderFooter(headerFooter);

### setLayout

    public void setLayout(int layout)

  设置 PpSlideLayout 类型常数，该常数代表幻灯片版式。

  参数：
    `layout` - 布局类型,其常量和相应的值如下：

          SlideConstants.LAYOUT_TITLE = 0; (标题幻灯片)
          SlideConstants.LAYOUT_BULLETLIST = 1; (项目清单)
          SlideConstants.LAYOUT_TWOCOLUMNTEXT = 2; (两栏文本)
          SlideConstants.LAYOUT_TABLE = 3; (表格)
          SlideConstants.LAYOUT_TITLEONLY = 4; (只有标题)
          SlideConstants.LAYOUT_CLIP = 5; (剪贴画)
          SlideConstants.LAYOUT_TEXTANDCLIP = 6; (文本与剪贴画)
          SlideConstants.LAYOUT_CLIPANDTEXT = 7; (剪辑画与文本)
          SlideConstants.LAYOUT_BLANK = 8; (空白)
          SlideConstants.LAYOUT_MEDIA = 9; (媒体剪辑)
          SlideConstants.LAYOUT_TEXTANDMEDIA = 10; (文本与媒体剪辑)
          SlideConstants.LAYOUT_MEDIAANDTEXT = 11; (媒体剪辑与文本)
          SlideConstants.LAYOUT_CLIPANDVERTICALTEXT = 12; (剪贴画与竖排文本)
          SlideConstants.LAYOUT_VERTICALTEXTANDCLIP = 13; (竖排文本与剪贴画)
          SlideConstants.LAYOUT_VERTICALTEXT = 14; (竖排文本)
          SlideConstants.LAYOUT_VERTICALTEXTANDTITLE = 15; (竖排文本与标题)
          SlideConstants.LAYOUT_TEXTANDCHART = 16; (文本与图表)
          SlideConstants.LAYOUT_VERTICALTEXTANDCHART = 17; (垂直排列标题，且文本在图表之上)
          SlideConstants.LAYOUT_CHART = 18; (图表)
          SlideConstants.LAYOUT_CHARTANDTEXT = 19; (图表与文本)

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         slide.setLayout(3);
         System.out.println(slide.getLayout());

### setSlideTransition

    public void setSlideTransition(application.workbooks.workbook.presentations.presentation.slide.SlideTransitionSetting setting)

  应用幻灯片切换方式。

  参数：
    `setting` - 幻灯片切换方式设置

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         SlideTransitionSetting slideTransitionSetting = slide.getSlideShowTransition();
         slideTransitionSetting.setLoop(true);
         slide.setSlideTransition(slideTransitionSetting);

### setVisible

    public void setVisible(boolean isVisible)

  设置幻灯片是否显示。

  参数：
    `isVisible` - 表示是否隐藏幻灯片，如果为false，则隐藏幻灯片；如果为true，则不隐藏

    例子：

         Workbook workbook = Application.getWorkbooks().getActiveWorkbook();
         Presentation present = workbook.getPresentations().getActivePresentation();
         Slides slides = present.getSlides();
         Slide slide = slides.getActiveSlide();
         slide.setVisible(true);

概述 | 软件包 | 类 | 使用 | 树 | 索引 | 帮助

上一个类 下一个类 | 框架 无框架
摘要： 嵌套 | 字段 | 构造函数 | 方法 | 详细信息： 字段 | 构造函数 | 方法