Interface NewPageFactory
-
- All Implemented Interfaces:
public interface NewPageFactory
Interface definition of a factory that returns NewPage instances. To use a factory, set it in the document editor using setNewPageFactory. The document editor will ask the used factory for a new instance every time the user wants to add a new page. If the factory is backed by a user interface (for example a dialog) it must itself care for proper retention of its state across configuration changes, as the document editor wont do this.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
NewPageFactory.OnNewPageReadyListener
Listens for return of a NewPage instance to the editor. The factory must ensure that it either calls onNewPageReady or onCancelled for the page creation flow to properly finish.
-
Method Summary
Modifier and Type Method Description abstract void
onCreateNewPage(@NonNull() NewPageFactory.OnNewPageReadyListener callback)
This method is called every time the factory should create a NewPage instance. -
-
Method Detail
-
onCreateNewPage
abstract void onCreateNewPage(@NonNull() 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.
-
-
-
-