Skip to main content

NotesMaster Class

A Notes Master that is a shared layout for all notes in the presentation. The Notes Master contains visual parameters (location on a slide, text format settings, background, and so on) for headers, footers, and notes.

Declaration

public class NotesMaster extends MasterElement

Remarks

The following code snippet creates a Notes Master, customizes placeholder content and formatting, and adds notes to a slide:

import com.devexpress.docs.office.*;
import com.devexpress.docs.presentation.*;
import com.devexpress.system.drawing.*;


// Create a presentation.
try(Presentation presentation = new Presentation()) {
    // Create a Notes Master and assign it to the presentation.
    NotesMaster notesMaster = new NotesMaster("notesMaster");
    presentation.setNotesMaster(notesMaster);

    // Specify text for header and footer placeholders.
    notesMaster.getActualHeaderPlaceholder()
            .getTextArea().setText("Generated by DevExpress Presentation API for Java");

    notesMaster.getActualFooterPlaceholder()
            .getTextArea().setText("2026");

    // Create paragraph properties used to format notes content.
    TextParagraphProperties pp = new TextParagraphProperties();
    pp.getTextProperties().setFontSize(12f);
    pp.getTextProperties().setFill(new SolidFill(Color.getLightGray()));

    // Apply formatting to the header placeholder.
    notesMaster.getActualHeaderPlaceholder()
            .getTextArea().setLevel1ParagraphProperties(pp);

    // Apply formatting to the notes placeholder.
    notesMaster.getActualNotesPlaceholder()
            .getTextArea().setParagraphProperties(pp);

    // Create notes.
    NotesSlide notes = new NotesSlide("notes-slide-1");
    notes.getTextArea().setText("Key points and additional context for the presenter.");

    // Add notes to the first slide in the presentation.
    Slide slide1 = presentation.getSlides().getFirst();
    slide1.setNotes(notes);

    // Perform additional presentation processing logic.
}

Refer to the following help topic for additional information: Add Speaker Notes to Slides.

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Constructors

NotesMaster() Constructor

Initializes a new instance of the NotesMaster class.

Declaration

public NotesMaster()

NotesMaster(String name) Constructor

Initializes a new instance of the NotesMaster class with specified settings.

Declaration

public NotesMaster(String name)

Parameters

Name Type Description
name String

The notes slide associated with the notes master.

Methods

deepClone() Method

Clones the current NotesMaster instance.

Declaration

public NotesMaster deepClone()

Returns

Type Description
NotesMaster

The cloned NotesMaster instance.

getActualHeaderPlaceholder() Method

Returns the header shape in the note master layout.

Declaration

public Shape getActualHeaderPlaceholder()

Returns

Type Description
Shape

The header placeholder shape.

getTextStyle() Method

Returns the default formatting settings of a notes master’s layout.

Declaration

public TextStyle getTextStyle()

Returns

Type Description
TextStyle

The text style for the notes master.

setTextStyle(TextStyle value) Method

Sets the text style for the notes master.

Declaration

public void setTextStyle(TextStyle value)

Parameters

Name Type Description
value TextStyle

The text style for the notes master.