public static interface PDFViewCtrl.Tool
PDFViewCtrl.ToolManager.| Modifier and Type | Method and Description |
|---|---|
int |
getMode()
Returns the mode/identifier of this tool.
|
int |
getNextToolMode()
Returns the mode of the next tool.
|
void |
onClose()
Called by PDFViewCtrl to indicate the tool is being closed, e.g.,
when the current document is being closed.
|
void |
onCustom(java.lang.Object o)
Called by PDFViewCtrl in the next message loop of the main thread.
|
void |
onDocumentDownloadEvent(int type,
int page_num,
int page_downloaded,
int page_count)
Called when an update from document downloading is available, which
can be started by
PDFViewCtrl#openURL(String, String). |
boolean |
onDoubleTap(MotionEvent e)
Called at the beginning when PDFViewCtrl.onDoubleTap() is triggered.
|
void |
onDoubleTapEnd(MotionEvent e)
Called at the end when PDFViewCtrl.onDoubleTap() is triggered.
|
boolean |
onDown(MotionEvent e)
Called when PDFViewCtrl.onDown() is triggered.
|
void |
onDraw(Canvas canvas,
android.graphics.Matrix tfm)
Called by PDFViewCtrl to draw tool's content, if there is any.
|
boolean |
onFlingStop()
Called when a fling motion stops by itself (not by a touching event).
|
void |
onLayout(boolean changed,
int l,
int t,
int r,
int b)
Called when PDFViewCtrl's onLayout(), e.g.,
android.view.View.onLayout(), is triggered, or PDFViewCtrl's page
presentation mode or page view mode is changed by
PDFViewCtrl.setPagePresentationMode(int) or
PDFViewCtrl.setPageViewMode(int). |
boolean |
onLongPress(MotionEvent e)
Called when PDFViewCtrl.onLongPress() is triggered.
|
boolean |
onMove(MotionEvent e1,
MotionEvent e2,
float x_dist,
float y_dist)
Called when PDFViewCtrl.onScroll() is triggered.
|
void |
onPageTurning(int old_page,
int cur_page)
Called when turning pages in non-continuous page presentation mode.
|
void |
onPostSingleTapConfirmed()
Called about 200ms after PDFViewCtrl.onSingleTapConfirmed() is
called.
|
boolean |
onScale(float x,
float y)
Called when PDFViewCtrl.onScale() is triggered.
|
boolean |
onScaleBegin(float x,
float y)
Called when PDFViewCtrl.onScaleBegin() is triggered.
|
boolean |
onScaleEnd(float x,
float y)
Called when PDFViewCtrl.onScaleEnd() is triggered.
|
void |
onSetDoc()
Called by PDFViewCtrl after {link
PDFViewCtrl.setDoc(PDFDoc)
is called and the document is set within PDFViewCtrl. |
boolean |
onShowPress(MotionEvent e)
Called when onShowPress() is triggered.
|
boolean |
onSingleTapConfirmed(MotionEvent e)
Called when PDFViewCtrl.onSingleTapConfirmed() is triggered.
|
boolean |
onSingleTapUp(MotionEvent e)
Called when onSingleTapUp() is triggered.
|
boolean |
onUp(MotionEvent e,
int prior_event_type)
Called when PDFViewCtrl.onUp() is triggered.
|
int getMode()
int getNextToolMode()
void onClose()
void onCustom(java.lang.Object o)
PDFViewCtrl.postToolOnCustomEvent(Object) method. Note
that this function is called only once per posting.o - The Object passed in when calling
PDFViewCtrl.postToolOnCustomEvent(Object).boolean onDoubleTap(MotionEvent e)
void onDoubleTapEnd(MotionEvent e)
boolean onDown(MotionEvent e)
void onDocumentDownloadEvent(int type,
int page_num,
int page_downloaded,
int page_count)
PDFViewCtrl#openURL(String, String).type - the type of the update. Possible values are:
page_num - the number of the page that is just downloaded. Meaningful
if type is PDFViewCtrl.DOWNLOAD_PAGE.page_downloaded - the total number of pages that have been downloaded.page_count - the page count of the associated document.void onDraw(Canvas canvas,
android.graphics.Matrix tfm)
canvas - The android.graphics.Canvas object to draw on PDFViewCtrl.tfm - The extra transformation matrix applied to 'canvas'. This
matrix is normally an identity matrix unless when the
built-in page sliding is in process. The inverse of this
matrix can be temporarily applied to 'canvas' in order to make the
content drawn in this function appear stationary during
sliding.boolean onFlingStop()
void onLayout(boolean changed,
int l,
int t,
int r,
int b)
PDFViewCtrl.setPagePresentationMode(int) or
PDFViewCtrl.setPageViewMode(int).changed - This is a new size or position for this view.l - Left position, relative to parentt - Top position, relative to parentr - Right position, relative to parentb - Bottom position, relative to parentboolean onLongPress(MotionEvent e)
boolean onMove(MotionEvent e1,
MotionEvent e2,
float x_dist,
float y_dist)
void onPageTurning(int old_page,
int cur_page)
boolean onScale(float x,
float y)
boolean onScaleBegin(float x,
float y)
boolean onScaleEnd(float x,
float y)
void onSetDoc()
PDFViewCtrl.setDoc(PDFDoc)
is called and the document is set within PDFViewCtrl.boolean onShowPress(MotionEvent e)
boolean onSingleTapConfirmed(MotionEvent e)
void onPostSingleTapConfirmed()
boolean onSingleTapUp(MotionEvent e)
boolean onUp(MotionEvent e,
int prior_event_type)
e - the up motion event.prior_event_type - indicates the prior event type. Possible values are: