Package com.pspdfkit.ui.toolbar
Class AnnotationEditingToolbar
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.View.OnClickListener
,android.view.View.OnLongClickListener
,android.view.ViewManager
,android.view.ViewParent
,android.view.accessibility.AccessibilityEventSource
,com.pspdfkit.annotations.AnnotationProvider.OnAnnotationUpdatedListener
,com.pspdfkit.ui.special_mode.manager.AnnotationManager.OnAnnotationEditingModeChangeListener
,com.pspdfkit.undo.OnUndoHistoryChangeListener
public final class AnnotationEditingToolbar extends ContextualToolbar<AnnotationEditingController> implements AnnotationProvider.OnAnnotationUpdatedListener, AnnotationManager.OnAnnotationEditingModeChangeListener, OnUndoHistoryChangeListener
Toolbar shown when annotations are being edited.
-
-
Field Summary
Fields Modifier and Type Field Description private AnnotationEditingController
controller
-
Constructor Summary
Constructors Constructor Description AnnotationEditingToolbar(Context context)
AnnotationEditingToolbar(Context context, AttributeSet attrs)
AnnotationEditingToolbar(Context context, AttributeSet attrs, Integer defStyleAttr)
-
Method Summary
Modifier and Type Method Description final AnnotationEditingController
getController()
final Unit
setController(AnnotationEditingController controller)
Unit
bindController(AnnotationEditingController controller)
Bind annotation editing controller. Unit
unbindController()
Unbind current annotation editing controller (if any). Boolean
isControllerBound()
Returns true
if the controller is bound.Unit
onAnnotationCreated(Annotation annotation)
Called when annotation has been created. Unit
onAnnotationUpdated(Annotation annotation)
Called when existing annotation has changed. Unit
onAnnotationRemoved(Annotation annotation)
Called when existing annotation has been removed. Unit
onAnnotationZOrderChanged(Integer pageIndex, List<Annotation> oldOrder, List<Annotation> newOrder)
Called when the z-order of annotations has changed on a specified page. Unit
onEnterAnnotationEditingMode(AnnotationEditingController controller)
Called when annotation editing mode has been entered. Unit
onChangeAnnotationEditingMode(AnnotationEditingController controller)
Called then annotation editing mode changes, meaning another annotation is being selected for editing. Unit
onExitAnnotationEditingMode(AnnotationEditingController controller)
Called when annotation editing mode has been exited. Unit
onUndoHistoryChanged(UndoManager undoManager)
Notifies the observer that the undo history has changed inside the undo manager. -
-
Constructor Detail
-
AnnotationEditingToolbar
AnnotationEditingToolbar(Context context)
-
AnnotationEditingToolbar
AnnotationEditingToolbar(Context context, AttributeSet attrs)
-
AnnotationEditingToolbar
AnnotationEditingToolbar(Context context, AttributeSet attrs, Integer defStyleAttr)
-
-
Method Detail
-
getController
final AnnotationEditingController getController()
-
setController
final Unit setController(AnnotationEditingController controller)
-
bindController
Unit bindController(AnnotationEditingController controller)
Bind annotation editing controller.
- Parameters:
controller
- Annotation editing controller to be connected and synced with this toolbar.
-
unbindController
Unit unbindController()
Unbind current annotation editing controller (if any).
-
isControllerBound
Boolean isControllerBound()
Returns
true
if the controller is bound.
-
onAnnotationCreated
Unit onAnnotationCreated(Annotation annotation)
Called when annotation has been created.
-
onAnnotationUpdated
Unit onAnnotationUpdated(Annotation annotation)
Called when existing annotation has changed.
-
onAnnotationRemoved
Unit onAnnotationRemoved(Annotation annotation)
Called when existing annotation has been removed.
-
onAnnotationZOrderChanged
Unit onAnnotationZOrderChanged(Integer pageIndex, List<Annotation> oldOrder, List<Annotation> newOrder)
Called when the z-order of annotations has changed on a specified page.
-
onEnterAnnotationEditingMode
Unit onEnterAnnotationEditingMode(AnnotationEditingController controller)
Called when annotation editing mode has been entered.
-
onChangeAnnotationEditingMode
Unit onChangeAnnotationEditingMode(AnnotationEditingController controller)
Called then annotation editing mode changes, meaning another annotation is being selected for editing.
-
onExitAnnotationEditingMode
Unit onExitAnnotationEditingMode(AnnotationEditingController controller)
Called when annotation editing mode has been exited.
-
onUndoHistoryChanged
Unit onUndoHistoryChanged(UndoManager undoManager)
Notifies the observer that the undo history has changed inside the undo manager.
- Parameters:
undoManager
- Undo manager this listener is registered to.
-
-
-
-