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)
EditToolbarImpl(FragmentActivity activity, BaseEditToolbar editToolbar, ToolManager toolManager, ToolManager.ToolMode toolMode, Annot editAnnot, int pageNumber, boolean shouldExpand, Bundle bundle)
Class constructor
Public Methods
boolean canRedo()
boolean canUndo()
void close()
Commits the changes and closes the Edit toolbar
ToolManager.ToolMode getToolMode()
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.EditToolbar.OnEditToolbarChangedListener
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)

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

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 boolean canRedo ()

public boolean canUndo ()

public void close ()

Commits the changes and closes the Edit toolbar

public ToolManager.ToolMode getToolMode ()

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