public class

EditToolbarImpl

extends Object
implements OnToolSelectedListener OnToolbarStateUpdateListener
java.lang.Object
   ↳ com.pdftron.pdf.controls.EditToolbarImpl

Class Overview

This class is implementing the logic for EditToolbar to create/edit annotations.

Summary

Nested Classes
interface EditToolbarImpl.OnEditToolbarListener Callback interface invoked when the edit toolbar is dismissed. 
Public Constructors
EditToolbarImpl(FragmentActivity activity, EditToolbar editToolbar, ToolManager toolManager, ToolManager.ToolMode toolMode, Annot editAnnot, int pageNumber, boolean shouldExpand)
Class constructor
Public Methods
void close()
Commits the changes and closes the Edit toolbar
boolean handleKeyUp(int keyCode, KeyEvent event)
Handles the shortcuts key in the edit toolbar.
boolean isToolbarShown()
void onClearSelected()
The overloaded implementation of onClearSelected() }
void onCloseSelected()
The overloaded implementation of onCloseSelected() }
void onDrawSelected(int drawIndex, boolean wasSelectedBefore, View anchor)
The overloaded implementation of onDrawSelected(int, boolean, View) }
void onEraserSelected(boolean wasSelectedBefore, View anchor)
The overloaded implementation of onEraserSelected(boolean, View) }
void onOrientationChanged()
void onRedoSelected()
The overloaded implementation of onRedoSelected() }
void onToolbarStateUpdated()
Called when the state of edit toolbar should be updated.
void onUndoSelected()
The overloaded implementation of onUndoSelected() }
void setOnEditToolbarListener(EditToolbarImpl.OnEditToolbarListener listener)
void showToolbar()
make the edit toolbar visible
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pdftron.pdf.controls.OnToolSelectedListener
From interface com.pdftron.pdf.controls.OnToolbarStateUpdateListener

Public Constructors

public EditToolbarImpl (FragmentActivity activity, EditToolbar editToolbar, ToolManager toolManager, ToolManager.ToolMode toolMode, Annot editAnnot, int pageNumber, boolean shouldExpand)

Class constructor

Parameters
activity The activity which is used for showing a popup window dialog
editToolbar The edit toolbar view
toolManager The tool manager
toolMode The tool mode which the toolbar should start with
editAnnot The annotation to be edited
shouldExpand Specify whether the toolbar should be expanded when phone is in portrait mode

Public Methods

public void close ()

Commits the changes and closes the Edit toolbar

public boolean handleKeyUp (int keyCode, KeyEvent event)

Handles the shortcuts key in the edit toolbar.

Parameters
keyCode the key code
event the key event
Returns
  • true if it is handled; false otherwise

public boolean isToolbarShown ()

Returns
  • True if the edit toolbar is shown

public void onClearSelected ()

The overloaded implementation of onClearSelected() }

public void onCloseSelected ()

The overloaded implementation of onCloseSelected() }

public void onDrawSelected (int drawIndex, boolean wasSelectedBefore, View anchor)

The overloaded implementation of onDrawSelected(int, boolean, View) }

Parameters
drawIndex The index of draw button that was selected
wasSelectedBefore Specify if the button has been already selected
anchor The view of the selected button which will be used as an anchor

public void onEraserSelected (boolean wasSelectedBefore, View anchor)

The overloaded implementation of onEraserSelected(boolean, View) }

Parameters
wasSelectedBefore Specify if the button has been already selected
anchor The view of the button which will be used as an anchor

public void onOrientationChanged ()

public void onRedoSelected ()

The overloaded implementation of onRedoSelected() }

public void onToolbarStateUpdated ()

Called when the state of edit toolbar should be updated.

public void onUndoSelected ()

The overloaded implementation of onUndoSelected() }

public void setOnEditToolbarListener (EditToolbarImpl.OnEditToolbarListener listener)

Parameters
listener The EditToolbarImpl.OnEditToolbarListener listener

public void showToolbar ()

make the edit toolbar visible