public class

SingleButtonToolbar

extends ActionToolbar
implements BaseEditToolbar
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.pdftron.pdf.widget.toolbar.component.view.ActionToolbar
           ↳ com.pdftron.pdf.widget.toolbar.component.view.SingleButtonToolbar

Class Overview

A special toolbar used as edit toolbar for multi-stroke shapes.

Summary

Constants
String BUILDER_TAG
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
SingleButtonToolbar(Context context)
SingleButtonToolbar(Context context, PdfViewCtrlTabHostFragment2.AnnotationToolbarPosition position)
SingleButtonToolbar(Context context, AttributeSet attrs)
SingleButtonToolbar(Context context, AttributeSet attrs, int defStyleAttr)
Public Methods
void addOnButtonClickListener(View.OnClickListener clickListener)
Add listener when commit button is pressed
List<ToolbarItem> getButtonItems()
boolean handleKeyUp(int keyCode, KeyEvent event)
void inflateDefaultEditToolbar(ToolManager.ToolMode toolMode)
boolean isEditingAnnotation()
void setButtonText(String buttonText)
void setCompactMode(boolean compactMode)
void setEditingAnnotation(boolean isEditingAnnotation)
Sets whether this toolbar is editing an annotation.
void setOnEditToolbarChangeListener(EditToolbar.OnEditToolbarChangedListener listener)
void setup(PDFViewCtrl pdfViewCtrl, OnToolSelectedListener onToolSelectedListener, ArrayList<AnnotStyle> drawStyles, boolean b, boolean hasEraseBtn, boolean b1, boolean shouldExpand, boolean isStyleFixed)
void show()
void updateControlButtons(boolean canClear, boolean canErase, boolean canUndo, boolean canRedo)
void updateDrawColor(int drawIndex, int color)
void updateDrawStyles(ArrayList<AnnotStyle> drawStyles)
[Expand]
Inherited Methods
From class com.pdftron.pdf.widget.toolbar.component.view.ActionToolbar
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface com.pdftron.pdf.controls.BaseEditToolbar

Constants

public static final String BUILDER_TAG

Constant Value: "PDFTron Commit Toolbar"

Public Constructors

public SingleButtonToolbar (Context context)

public SingleButtonToolbar (Context context, PdfViewCtrlTabHostFragment2.AnnotationToolbarPosition position)

public SingleButtonToolbar (Context context, AttributeSet attrs)

public SingleButtonToolbar (Context context, AttributeSet attrs, int defStyleAttr)

Public Methods

public void addOnButtonClickListener (View.OnClickListener clickListener)

Add listener when commit button is pressed

Parameters
clickListener click listener for when commit button is pressed.

public List<ToolbarItem> getButtonItems ()

public boolean handleKeyUp (int keyCode, KeyEvent event)

public void inflateDefaultEditToolbar (ToolManager.ToolMode toolMode)

public boolean isEditingAnnotation ()

Returns
  • true if this toolbar is editing an annotation, false otherwise (i.e. creating a new annotation)

public void setButtonText (String buttonText)

public void setCompactMode (boolean compactMode)

public void setEditingAnnotation (boolean isEditingAnnotation)

Sets whether this toolbar is editing an annotation.

Parameters
isEditingAnnotation true if this toolbar is editing an annotation, false otherwise (i.e. creating a new annotation)

public void setOnEditToolbarChangeListener (EditToolbar.OnEditToolbarChangedListener listener)

public void setup (PDFViewCtrl pdfViewCtrl, OnToolSelectedListener onToolSelectedListener, ArrayList<AnnotStyle> drawStyles, boolean b, boolean hasEraseBtn, boolean b1, boolean shouldExpand, boolean isStyleFixed)

public void show ()

public void updateControlButtons (boolean canClear, boolean canErase, boolean canUndo, boolean canRedo)

public void updateDrawColor (int drawIndex, int color)

public void updateDrawStyles (ArrayList<AnnotStyle> drawStyles)