public class

ToolbarSharedPreferences

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.widget.toolbar.component.ToolbarSharedPreferences

Class Overview

Class that controls toolbar shared preference settings such as: storing the last used tool, storing the last used toolbar, storing the customized toolbars

Summary

Public Constructors
ToolbarSharedPreferences()
Public Methods
static clearToolbarItemsInDb(Context context, String toolbarId)
LinkedHashMap<String, List<ToolbarItem>> getAllDefaultToolbarItems(Context context)
AnnotationToolbarBuilder getAnnotateToolbar(Context context)
AnnotationToolbarBuilder getCompactAnnotateToolbar(Context context)
AnnotationToolbarBuilder getCompactDrawToolbar(Context context)
AnnotationToolbarBuilder getCompactFavoriteToolbar(Context context)
AnnotationToolbarBuilder getCompactFillAndSignToolbar(Context context)
AnnotationToolbarBuilder getCompactInsertToolbar(Context context)
AnnotationToolbarBuilder getCompactMeasureToolbar(Context context)
AnnotationToolbarBuilder getCompactPensToolbar(Context context)
AnnotationToolbarBuilder getCompactPrepareFormToolbar(Context context)
AnnotationToolbarBuilder getCompactRedactToolbar(Context context)
AnnotationToolbarBuilder getCustomToolbar(Context context, AnnotationToolbarBuilder originalToolbar, boolean isFavorite)
AnnotationToolbarBuilder getCustomToolbar(Context context, AnnotationToolbarBuilder originalToolbar)
Returns the custom toolbar stored in the database, defined by the original toolbar builder.
static List<ToolbarItem> getCustomizableSublist(List<ToolbarItem> toolbarItems)
Returns the given list of toolbar items excluding non customizable items.
AnnotationToolbarBuilder getDrawToolbar(Context context)
AnnotationToolbarBuilder getFavoriteToolbar(Context context)
AnnotationToolbarBuilder getFillAndSignToolbar(Context context)
AnnotationToolbarBuilder getInsertToolbar(Context context)
static String getLastOpenedToolbarTag(Context context)
static int getLastUsedTool(Context context)
AnnotationToolbarBuilder getMeasureToolbar(Context context)
AnnotationToolbarBuilder getPensToolbar(Context context)
AnnotationToolbarBuilder getPrepareFormToolbar(Context context)
AnnotationToolbarBuilder getRedactToolbar(Context context)
AnnotationToolbarBuilder getViewToolbar()
static void setLastOpenedToolbarTag(Context context, String toolbarTag)
static void setLastUsedTool(Context context, int buttonId)
static updateToolbarItemsInDb(Context context, String toolbarId, String toolbarName, List<MenuEditorItem> menuEditorItems, boolean shouldClear)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ToolbarSharedPreferences ()

Public Methods

public static clearToolbarItemsInDb (Context context, String toolbarId)

public LinkedHashMap<String, List<ToolbarItem>> getAllDefaultToolbarItems (Context context)

public AnnotationToolbarBuilder getAnnotateToolbar (Context context)

public AnnotationToolbarBuilder getCompactAnnotateToolbar (Context context)

public AnnotationToolbarBuilder getCompactDrawToolbar (Context context)

public AnnotationToolbarBuilder getCompactFavoriteToolbar (Context context)

public AnnotationToolbarBuilder getCompactFillAndSignToolbar (Context context)

public AnnotationToolbarBuilder getCompactInsertToolbar (Context context)

public AnnotationToolbarBuilder getCompactMeasureToolbar (Context context)

public AnnotationToolbarBuilder getCompactPensToolbar (Context context)

public AnnotationToolbarBuilder getCompactPrepareFormToolbar (Context context)

public AnnotationToolbarBuilder getCompactRedactToolbar (Context context)

public AnnotationToolbarBuilder getCustomToolbar (Context context, AnnotationToolbarBuilder originalToolbar, boolean isFavorite)

public AnnotationToolbarBuilder getCustomToolbar (Context context, AnnotationToolbarBuilder originalToolbar)

Returns the custom toolbar stored in the database, defined by the original toolbar builder.

Parameters
context for the database. This is usually the Application context.
originalToolbar the toolbar containing the custom toolbar's original toolbar items and its ordering
Returns
  • the toolbar stored in the data base, defined by the original toolbar builder.

public static List<ToolbarItem> getCustomizableSublist (List<ToolbarItem> toolbarItems)

Returns the given list of toolbar items excluding non customizable items. For now, only edit toolbar button. Also remove duplicate tools.

Parameters
toolbarItems the list of toolbar items to filter

public AnnotationToolbarBuilder getDrawToolbar (Context context)

public AnnotationToolbarBuilder getFavoriteToolbar (Context context)

public AnnotationToolbarBuilder getFillAndSignToolbar (Context context)

public AnnotationToolbarBuilder getInsertToolbar (Context context)

public static String getLastOpenedToolbarTag (Context context)

public static int getLastUsedTool (Context context)

public AnnotationToolbarBuilder getMeasureToolbar (Context context)

public AnnotationToolbarBuilder getPensToolbar (Context context)

public AnnotationToolbarBuilder getPrepareFormToolbar (Context context)

public AnnotationToolbarBuilder getRedactToolbar (Context context)

public AnnotationToolbarBuilder getViewToolbar ()

public static void setLastOpenedToolbarTag (Context context, String toolbarTag)

public static void setLastUsedTool (Context context, int buttonId)

public static updateToolbarItemsInDb (Context context, String toolbarId, String toolbarName, List<MenuEditorItem> menuEditorItems, boolean shouldClear)