public final class

ValueNewPageFactory

extends Object
implements NewPageFactory
java.lang.Object
   ↳ com.pspdfkit.document.editor.page.ValueNewPageFactory

Class Overview

A NewPageFactory that returns the same NewPage instance every time it is called.

Summary

Public Constructors
ValueNewPageFactory(NewPage newPage)
Create the factory for returning the given newPage instance.
Public Methods
void onCreateNewPage(NewPageFactory.OnNewPageReadyListener callback)
This method is called every time the factory should create a NewPage instance.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pspdfkit.document.editor.page.NewPageFactory

Public Constructors

public ValueNewPageFactory (NewPage newPage)

Create the factory for returning the given newPage instance.

Parameters
newPage NewPage instance that should be returned by this factory.

Public Methods

public void onCreateNewPage (NewPageFactory.OnNewPageReadyListener callback)

This method is called every time the factory should create a NewPage instance. Since creation of the new page can be a longer running asynchronous operation (for example via a page configuration dialog shown to the user) this method receives a callback that the factory can call once the new page is ready.

Parameters
callback OnNewPageReadyListener for notifying the editor once the new page is ready.