public static interface

ToolManager.Tool

com.pdftron.pdf.tools.ToolManager.Tool
Known Indirect Subclasses

Class Overview

This interface is used to forward events from PDFViewCtrl.ToolManager to the actual implementation of the Tool.

Summary

Public Methods
abstract int getCreateAnnotType()
Gets what annotation type this tool can create
abstract ToolManager.ToolModeBase getNextToolMode()
Gets the next tool mode.
abstract ToolManager.ToolModeBase getToolMode()
Gets the tool mode.
abstract boolean isCreatingAnnotation()
Propagates isCreatingAnnotation() to the tools.
abstract void onAnnotPainterUpdated(int page, long which, CurvePainter painter)
abstract void onClose()
Propagates onClose() to the tools.
abstract void onConfigurationChanged(Configuration newConfig)
Propagates onConfigurationChanged(Configuration) to the tools.
abstract void onCustomEvent(Object obj)
Propagates onCustomEvent(Object) to the tools.
abstract void onDocumentDownloadEvent(PDFViewCtrl.DownloadState state, int page_num, int page_downloaded, int page_count, String message)
abstract boolean onDoubleTap(MotionEvent e)
Propagates onDoubleTap(MotionEvent) to the tools.
abstract void onDoubleTapEnd(MotionEvent e)
Propagates onDoubleTapEnd(MotionEvent) to the tools.
abstract boolean onDoubleTapEvent(MotionEvent e)
Propagates onDoubleTapEvent(MotionEvent) to the tools.
abstract void onDoubleTapZoomAnimationBegin()
Propagates onDoubleTapZoomAnimationBegin() to the tools.
abstract void onDoubleTapZoomAnimationEnd()
Propagates onDoubleTapZoomAnimationEnd() to the tools.
abstract boolean onDown(MotionEvent e)
Propagates onDown(MotionEvent) to the tools.
abstract void onDraw(Canvas canvas, Matrix tfm)
Propagates onDraw(Canvas, Matrix) to the tools.
abstract boolean onDrawEdgeEffects(Canvas canvas, int width, int verticalOffset)
Propagates onDrawEdgeEffects(Canvas, int, int) to the tools.
abstract boolean onFlingStop()
Propagates onFlingStop() to the tools.
abstract boolean onKeyUp(int keyCode, KeyEvent event)
Propagates onKeyUp(int, KeyEvent) to the tools.
abstract void onLayout(boolean changed, int l, int t, int r, int b)
Propagates onLayout(boolean, int, int, int, int) to the tools.
abstract boolean onLongPress(MotionEvent e)
Propagates onLongPress(MotionEvent) to the tools.
abstract boolean onMove(MotionEvent e1, MotionEvent e2, float x_dist, float y_dist)
abstract void onNightModeUpdated(boolean isNightMode)
Called when night mode has been updated.
abstract void onPageTurning(int old_page, int cur_page)
Propagates onPageTurning(int, int) to the tools.
abstract boolean onPointerDown(MotionEvent e)
Propagates onPointerDown(MotionEvent) to the tools.
abstract void onPostSingleTapConfirmed()
Propagates onPostSingleTapConfirmed() to the tools.
abstract void onPullEdgeEffects(int which_edge, float delta_distance)
Propagates onPullEdgeEffects(int, float) to the tools.
abstract void onReleaseEdgeEffects()
Propagates onReleaseEdgeEffects() to the tools.
abstract void onRenderingFinished()
Propagates onRenderingFinished() to the tools.
abstract boolean onScale(float x, float y)
Propagates onScale(float, float) to the tools.
abstract boolean onScaleBegin(float x, float y)
Propagates onScaleBegin(float, float) to the tools.
abstract boolean onScaleEnd(float x, float y)
Propagates onScaleEnd(float, float) to the tools.
abstract void onScrollChanged(int l, int t, int oldl, int oldt)
Propagates onScrollChanged(int, int, int, int) to the tools.
abstract void onSetDoc()
Propagates onSetDoc() to the tools.
abstract boolean onShowPress(MotionEvent e)
Propagates onShowPress(MotionEvent) to the tools.
abstract boolean onSingleTapConfirmed(MotionEvent e)
Propagates onSingleTapConfirmed(MotionEvent) to the tools.
abstract boolean onSingleTapUp(MotionEvent e)
Propagates onSingleTapUp(MotionEvent) to the tools.
abstract boolean onUp(MotionEvent e, PDFViewCtrl.PriorEventMode priorEventMode)

Public Methods

public abstract int getCreateAnnotType ()

Gets what annotation type this tool can create

Returns
  • annot type for annotation creation tool, or unknown for non-creation tool.

public abstract ToolManager.ToolModeBase getNextToolMode ()

Gets the next tool mode.

Returns
  • the mode of the next tool. Via this method, a tool can indicate the next tool to switch to.

public abstract ToolManager.ToolModeBase getToolMode ()

Gets the tool mode.

Returns
  • the mode/identifier of this tool.

public abstract boolean isCreatingAnnotation ()

Propagates isCreatingAnnotation() to the tools.

public abstract void onAnnotPainterUpdated (int page, long which, CurvePainter painter)

public abstract void onClose ()

Propagates onClose() to the tools.

public abstract void onConfigurationChanged (Configuration newConfig)

Propagates onConfigurationChanged(Configuration) to the tools.

public abstract void onCustomEvent (Object obj)

Propagates onCustomEvent(Object) to the tools.

public abstract void onDocumentDownloadEvent (PDFViewCtrl.DownloadState state, int page_num, int page_downloaded, int page_count, String message)

public abstract boolean onDoubleTap (MotionEvent e)

Propagates onDoubleTap(MotionEvent) to the tools.

public abstract void onDoubleTapEnd (MotionEvent e)

Propagates onDoubleTapEnd(MotionEvent) to the tools.

public abstract boolean onDoubleTapEvent (MotionEvent e)

Propagates onDoubleTapEvent(MotionEvent) to the tools.

public abstract void onDoubleTapZoomAnimationBegin ()

Propagates onDoubleTapZoomAnimationBegin() to the tools.

public abstract void onDoubleTapZoomAnimationEnd ()

Propagates onDoubleTapZoomAnimationEnd() to the tools.

public abstract boolean onDown (MotionEvent e)

Propagates onDown(MotionEvent) to the tools.

public abstract void onDraw (Canvas canvas, Matrix tfm)

Propagates onDraw(Canvas, Matrix) to the tools.

public abstract boolean onDrawEdgeEffects (Canvas canvas, int width, int verticalOffset)

Propagates onDrawEdgeEffects(Canvas, int, int) to the tools.

public abstract boolean onFlingStop ()

Propagates onFlingStop() to the tools.

public abstract boolean onKeyUp (int keyCode, KeyEvent event)

Propagates onKeyUp(int, KeyEvent) to the tools.

public abstract void onLayout (boolean changed, int l, int t, int r, int b)

Propagates onLayout(boolean, int, int, int, int) to the tools.

public abstract boolean onLongPress (MotionEvent e)

Propagates onLongPress(MotionEvent) to the tools.

public abstract boolean onMove (MotionEvent e1, MotionEvent e2, float x_dist, float y_dist)

public abstract void onNightModeUpdated (boolean isNightMode)

Called when night mode has been updated.

public abstract void onPageTurning (int old_page, int cur_page)

Propagates onPageTurning(int, int) to the tools.

public abstract boolean onPointerDown (MotionEvent e)

Propagates onPointerDown(MotionEvent) to the tools.

public abstract void onPostSingleTapConfirmed ()

Propagates onPostSingleTapConfirmed() to the tools.

public abstract void onPullEdgeEffects (int which_edge, float delta_distance)

Propagates onPullEdgeEffects(int, float) to the tools.

public abstract void onReleaseEdgeEffects ()

Propagates onReleaseEdgeEffects() to the tools.

public abstract void onRenderingFinished ()

Propagates onRenderingFinished() to the tools.

public abstract boolean onScale (float x, float y)

Propagates onScale(float, float) to the tools.

public abstract boolean onScaleBegin (float x, float y)

Propagates onScaleBegin(float, float) to the tools.

public abstract boolean onScaleEnd (float x, float y)

Propagates onScaleEnd(float, float) to the tools.

public abstract void onScrollChanged (int l, int t, int oldl, int oldt)

Propagates onScrollChanged(int, int, int, int) to the tools.

public abstract void onSetDoc ()

Propagates onSetDoc() to the tools.

public abstract boolean onShowPress (MotionEvent e)

Propagates onShowPress(MotionEvent) to the tools.

public abstract boolean onSingleTapConfirmed (MotionEvent e)

Propagates onSingleTapConfirmed(MotionEvent) to the tools.

public abstract boolean onSingleTapUp (MotionEvent e)

Propagates onSingleTapUp(MotionEvent) to the tools.

public abstract boolean onUp (MotionEvent e, PDFViewCtrl.PriorEventMode priorEventMode)