public class

CollabViewerBuilder2

extends SkeletalFragmentBuilder<E extends Fragment>
java.lang.Object
   ↳ com.pdftron.pdf.interfaces.builder.SkeletalFragmentBuilder<E extends Fragment>
     ↳ com.pdftron.collab.ui.viewer.CollabViewerBuilder2

Class Overview

Builder to create a CollabViewerTabHostFragment2.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<CollabViewerBuilder2> CREATOR
Public Methods
CollabViewerTabHostFragment2 build(Context context)
Convenience build method that calls build(Context, Class) with the default class for this builder.
void checkArgs(Context context)
Helpers to check builder parameters
Bundle createBundle(Context context)
Create the bundle that will be passed as arguments to the Fragment.
int describeContents()
boolean equals(Object o)
int hashCode()
CollabViewerBuilder2 usingAnnotationManagerEditMode(AnnotManager.EditPermissionMode mode)
Sets annotation manager edit mode: EDIT_OWN : in this mode, you can edit only your own changes EDIT_OTHERS : in this mode, you can edit everyone's changes Default to EDIT_OWN.
CollabViewerBuilder2 usingAnnotationManagerUndoMode(PDFViewCtrl.AnnotationManagerMode mode)
Sets annotation manager undo mode: ADMIN_UNDO_OWN : in this mode, you can undo only your own changes ADMIN_UNDO_OTHERS : in this mode, you can undo everyone's changes Default to ADMIN_UNDO_OWN.
CollabViewerBuilder2 usingCacheFolder(boolean useCacheFolder)
Call to enable or disable the use of the cache folder when creating temporary files.
CollabViewerBuilder2 usingConfig(ViewerConfig config)
Call to initialize the document viewer with a specified ViewerConfig.
CollabViewerBuilder2 usingCustomHeaders(JSONObject headers)
Sets custom headers to use with all requests.
CollabViewerBuilder2 usingCustomToolbar(int[] menu)
Define the custom menu resources to use in document viewer toolbar.
CollabViewerBuilder2 usingFileExtension(String fileExtension)
Call to define the actual extension of a file.
CollabViewerBuilder2 usingFileType(int fileType)
Call to define how the file will be handled by the document viewer.
CollabViewerBuilder2 usingNavIcon(int navIconRes)
Call to define the navigation icon used by this fragment.
CollabViewerBuilder2 usingTabClass(Class<? extends CollabViewerTabFragment2> tabFragmentClass)
Call to define the fragment class that will be used to instantiate viewer tabs.
CollabViewerBuilder2 usingTabHostClass(Class<? extends CollabViewerTabHostFragment2> tabHostClass)
Call to define the fragment class that will be used to instantiate viewer host fragment.
CollabViewerBuilder2 usingTabTitle(String title)
Call to set the tab title in the document viewer with the specified String.
CollabViewerBuilder2 usingTheme(int theme)
Call to define the theme.
static CollabViewerBuilder2 withUri(Uri file)
static CollabViewerBuilder2 withUri(Uri file, String password)
Create a CollabViewerBuilder2 with the specified document and password if applicable.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class com.pdftron.pdf.interfaces.builder.SkeletalFragmentBuilder
From class java.lang.Object
From interface android.os.Parcelable
From interface com.pdftron.pdf.interfaces.builder.Builder

Fields

public static final Creator<CollabViewerBuilder2> CREATOR

Public Methods

public CollabViewerTabHostFragment2 build (Context context)

Convenience build method that calls build(Context, Class) with the default class for this builder.

Parameters
context the context used to initialize the fragment and its theme.
Returns
  • an instance of E with the specified parameters from the builder.

public void checkArgs (Context context)

Helpers to check builder parameters

Parameters
context used to initialize default building parameters

public Bundle createBundle (Context context)

Create the bundle that will be passed as arguments to the Fragment. Called right after calling checkArgs(Context)

Parameters
context used to initialize arguments for the bundle.
Returns
  • the bundle with the required arguments for the Fragment.

public int describeContents ()

public boolean equals (Object o)

public int hashCode ()

public CollabViewerBuilder2 usingAnnotationManagerEditMode (AnnotManager.EditPermissionMode mode)

Sets annotation manager edit mode: EDIT_OWN : in this mode, you can edit only your own changes EDIT_OTHERS : in this mode, you can edit everyone's changes Default to EDIT_OWN.

Parameters
mode one of EDIT_OWN and EDIT_OTHERS
Returns
  • this builder with the specified mode

public CollabViewerBuilder2 usingAnnotationManagerUndoMode (PDFViewCtrl.AnnotationManagerMode mode)

Sets annotation manager undo mode: ADMIN_UNDO_OWN : in this mode, you can undo only your own changes ADMIN_UNDO_OTHERS : in this mode, you can undo everyone's changes Default to ADMIN_UNDO_OWN.

Parameters
mode one of ADMIN_UNDO_OWN and ADMIN_UNDO_OTHERS
Returns
  • this builder with the specified mode

public CollabViewerBuilder2 usingCacheFolder (boolean useCacheFolder)

Call to enable or disable the use of the cache folder when creating temporary files. By default the cache folder is used, and if set to false the Downloads folder is used.

Parameters
useCacheFolder true to enable using the cache folder, false to use the downloads folder
Returns
  • this builder with the specified use of the cache folder

public CollabViewerBuilder2 usingConfig (ViewerConfig config)

Call to initialize the document viewer with a specified ViewerConfig. Multi-tab is unsupported for the collab documentation viewer and must be disabled in ViewerConfig.

Parameters
config to initialize the document viewer
Returns
  • this builder with the specified ViewerConfig configurations

public CollabViewerBuilder2 usingCustomHeaders (JSONObject headers)

Sets custom headers to use with all requests.

Parameters
headers custom headers for all requests
Returns
  • this builder with the specified custom headers

public CollabViewerBuilder2 usingCustomToolbar (int[] menu)

Define the custom menu resources to use in document viewer toolbar.

Parameters
menu custom toolbar menu XML resources to use in the document viewer
Returns
  • this builder with the specified custom toolbar menu

public CollabViewerBuilder2 usingFileExtension (String fileExtension)

Call to define the actual extension of a file. By default, file extension is obtained from the file name unless otherwise specified

Parameters
fileExtension actual extension of a file.
Returns
  • this builder with actual extension of a file

public CollabViewerBuilder2 usingFileType (int fileType)

Call to define how the file will be handled by the document viewer. By default, this is unspecified (value of 0) and the document viewer will automatically handle this; this is usually called to fulfill certain requirements and will not be needed in most cases.

The file types are defined in BaseFileInfo.

Parameters
fileType specified to handle the file in a specific way.
Returns
  • this builder with the specified file type handling

public CollabViewerBuilder2 usingNavIcon (int navIconRes)

Call to define the navigation icon used by this fragment. By default, a menu list icon is used for the navigation button.

Parameters
navIconRes the class that the viewer will used to instantiate tabs
Returns
  • this builder with the specified navigation icon

public CollabViewerBuilder2 usingTabClass (Class<? extends CollabViewerTabFragment2> tabFragmentClass)

Call to define the fragment class that will be used to instantiate viewer tabs.

Parameters
tabFragmentClass the class that the viewer will used to instantiate tabs
Returns
  • this builder with the specified tab fragment class

public CollabViewerBuilder2 usingTabHostClass (Class<? extends CollabViewerTabHostFragment2> tabHostClass)

Call to define the fragment class that will be used to instantiate viewer host fragment.

Parameters
tabHostClass the class that the viewer will
Returns
  • this builder with the specified tab host fragment class

public CollabViewerBuilder2 usingTabTitle (String title)

Call to set the tab title in the document viewer with the specified String. If null is specified, then the default title handling in the document viewer will be used.

Parameters
title title used for the tab when viewing the specified document
Returns
  • this builder with the specified tab title

public CollabViewerBuilder2 usingTheme (int theme)

Call to define the theme. By default, CustomAppTheme is used.

Parameters
theme the theme res
Returns
  • this builder with the specified theme

public static CollabViewerBuilder2 withUri (Uri file)

public static CollabViewerBuilder2 withUri (Uri file, String password)

Create a CollabViewerBuilder2 with the specified document and password if applicable.

Parameters
file Uri that specifies the location of the document
password used to open the document if required, null otherwise
Returns
  • builder with the specified document and password

public void writeToParcel (Parcel dest, int flags)