public class

AddPageDialogFragment

extends DialogFragment
java.lang.Object
   ↳ DialogFragment
     ↳ com.pdftron.pdf.controls.AddPageDialogFragment

Class Overview

The AddPageDialogFragment is responsible for add new pages with various page options. Use the newInstance() factory method to create an instance of this fragment.

Summary

Nested Classes
interface AddPageDialogFragment.OnAddNewPagesListener Callback interface invoked when new pages should be added to the current document. 
interface AddPageDialogFragment.OnCreateNewDocumentListener Callback interface invoked when new document should be created. 
enum AddPageDialogFragment.PageColor The page color  
enum AddPageDialogFragment.PageOrientation The page orientation  
enum AddPageDialogFragment.PageSize The page size  
enum AddPageDialogFragment.PageType The type of page  
Constants
String ADD_PAGE_DIALOG_TAG
Fields
public static int[] PageColorStrings The page color name corresponds to AddPageDialogFragment.PageColor
public static int[] PageColorValues The value of page color corresponds to AddPageDialogFragment.PageColor
Public Constructors
AddPageDialogFragment()
Public Methods
static AddPageDialogFragment newInstance()
Returns a new instance of this class.
static AddPageDialogFragment newInstance(double lastPageWidth, double lastPageHeight)
Returns a new instance of this class The creator must implement AddPageDialogFragment.OnAddNewPagesListener interface by calling setOnAddNewPagesListener(OnAddNewPagesListener) to handle interaction events.
void onCreate(Bundle savedInstanceState)
The overloaded implementation of DialogFragment#onCreate(Bundle).
Dialog onCreateDialog(Bundle savedInstanceState)
The overloaded implementation of DialogFragment#onCreateDialog(Bundle).
void onDetach()
The overloaded implementation of DialogFragment#onDetach().
AddPageDialogFragment setInitialPageColor(AddPageDialogFragment.PageColor initialPageColor)
Sets the initial option for page color (see AddPageDialogFragment.PageSize)
AddPageDialogFragment setInitialPageSize(AddPageDialogFragment.PageSize initialPageSize)
Sets the initial option for page size (see AddPageDialogFragment.PageSize)
AddPageDialogFragment setInitialPageType(AddPageDialogFragment.PageType initialPageType)
Sets the initial option for page type (see AddPageDialogFragment.PageType)
void setOnAddNewPagesListener(AddPageDialogFragment.OnAddNewPagesListener listener)
Sets the listener for adding new pages to a new document.
void setOnCreateNewDocumentListener(AddPageDialogFragment.OnCreateNewDocumentListener listener)
Sets the listener for creating a new document with new pages.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ADD_PAGE_DIALOG_TAG

Constant Value: "create_document_local_file"

Fields

public static int[] PageColorStrings

The page color name corresponds to AddPageDialogFragment.PageColor

public static int[] PageColorValues

The value of page color corresponds to AddPageDialogFragment.PageColor

Public Constructors

public AddPageDialogFragment ()

Public Methods

public static AddPageDialogFragment newInstance ()

Returns a new instance of this class. The creator must implement AddPageDialogFragment.OnCreateNewDocumentListener interface by calling setOnCreateNewDocumentListener(OnCreateNewDocumentListener) to handle interaction events.

Use this when the goal is to create a new document with new pages.If you want to add new pages to the existing document call newInstance(double, double).

Returns
  • An instance of this class

public static AddPageDialogFragment newInstance (double lastPageWidth, double lastPageHeight)

Returns a new instance of this class The creator must implement AddPageDialogFragment.OnAddNewPagesListener interface by calling setOnAddNewPagesListener(OnAddNewPagesListener) to handle interaction events.

Use this when the goal is to add pages to the existing document. If you want to create a new document with new pages call newInstance().

Parameters
lastPageWidth The page width if Custom is selected by the user.
lastPageHeight The page height if Custom is selected by the user.
Returns
  • An instance of this class

public void onCreate (Bundle savedInstanceState)

The overloaded implementation of DialogFragment#onCreate(Bundle).

public Dialog onCreateDialog (Bundle savedInstanceState)

The overloaded implementation of DialogFragment#onCreateDialog(Bundle).

public void onDetach ()

The overloaded implementation of DialogFragment#onDetach().

public AddPageDialogFragment setInitialPageColor (AddPageDialogFragment.PageColor initialPageColor)

Sets the initial option for page color (see AddPageDialogFragment.PageSize)

public AddPageDialogFragment setInitialPageSize (AddPageDialogFragment.PageSize initialPageSize)

Sets the initial option for page size (see AddPageDialogFragment.PageSize)

public AddPageDialogFragment setInitialPageType (AddPageDialogFragment.PageType initialPageType)

Sets the initial option for page type (see AddPageDialogFragment.PageType)

public void setOnAddNewPagesListener (AddPageDialogFragment.OnAddNewPagesListener listener)

Sets the listener for adding new pages to a new document.

Parameters
listener The listener

public void setOnCreateNewDocumentListener (AddPageDialogFragment.OnCreateNewDocumentListener listener)

Sets the listener for creating a new document with new pages.

Parameters
listener The listener