---
Product: Aspose.Slides
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/slides/java/masterslide
---

# MasterSlide

## Overview

`MasterSlide` is a class in Aspose.Slides FOSS for Java.
Inherits from: `BaseSlide`, `IMasterSlide`.

Represents a master slide in a presentation.

This class declares 14 methods for MasterSlide objects in Java programs.
Available methods include: `BaseSlide`, `MasterSlide`, `asIPresentationComponent`, `getLayoutSlides`, `getName`, `getPresentation`, `getShapes`, `getSlide`, `getSlideId`, `initInternal`, `setName`.
Public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package.
Properties: `layoutSlides`, `name`, `presentation`, `shapes`, `slide`, `slideId`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `layoutSlides` | `ILayoutSlideCollection` | Read | Gets the layout slides. |
| `presentation` | `IPresentation` | Read | Gets the presentation. |
| `name` | `String` | Read/Write | Gets or sets the name. |
| `slideId` | `int` | Read | Gets the slide id. |
| `shapes` | `IShapeCollection` | Read | Gets the shapes. |
| `slide` | `IBaseSlide` | Read | Gets the slide. |

## Methods

| Signature | Description |
|-----------|-------------|
| `MasterSlide(layoutSlides: ILayoutSlideCollection)` | Creates a MasterSlide with the given layout slides. |
| `MasterSlide(name: String, slideId: int, layoutSlides: ILayoutSlideCollection)` | Creates a MasterSlide with the given name, ID, and layout slides. |
| `MasterSlide()` | Creates a MasterSlide with no layout slides. |
| `initInternal(presentation: IPresentation, opcPackage: OpcPackage, partName: String, masterPart: MasterSlidePart, layoutSlides: List<ILayoutSlide>)` | Internal initialization for a master slide loaded from a package. |
| `getLayoutSlides()` → `ILayoutSlideCollection` | Returns the layout slides. |
| `getPresentation()` → `IPresentation` | Returns the presentation. |
| `BaseSlide()` | Creates a BaseSlide with default values. |
| `BaseSlide(name: String, slideId: int)` | Creates a BaseSlide with the given name and ID. |
| `getName()` → `String` | Returns the name. |
| `setName(name: String)` | Sets the name value. |
| `getSlideId()` → `int` | Returns the slide id. |
| `getShapes()` → `IShapeCollection` | Returns the shapes. |
| `getSlide()` → `IBaseSlide` | Returns the slide. |
| `asIPresentationComponent()` → `IPresentationComponent` | Calls asIPresentationComponent on this MasterSlide instance. |

## See Also

- [Aspose.Slides — Enterprise API Reference](https://reference.aspose.com/slides/)