public interface PDFView
Modifier and Type | Interface and Description |
---|---|
static interface |
PDFView.PDFAnnotListener
Interface for annotation operations listener.
|
static class |
PDFView.PDFPageDispPara
read only class to tell developers how a page displayed.
|
static class |
PDFView.PDFPosition
class record position for view.
|
static class |
PDFView.PDFSelDispPara
read only class to tell developers how selection displayed.
|
static interface |
PDFView.PDFViewListener
Interface for view operations listener.
|
static class |
PDFView.STATUS
inner class, developer should not use this.
|
Modifier and Type | Method and Description |
---|---|
void |
annotEnd()
end annotation operations.
|
java.lang.String |
annotGetSubject()
get selected annotation's subject.
|
java.lang.String |
annotGetText()
get selected annotation's text.
|
void |
annotInk()
start draw ink.
|
void |
annotPerform()
perform selected annotation.
|
void |
annotRect()
start draw rectangle.
|
void |
annotRemove()
remove selected annotation.
|
boolean |
annotSetChoice(int sel)
select combo-box item
|
boolean |
annotSetEditText(java.lang.String val)
set edit-box value.
|
boolean |
annotSetMarkup(int type)
set selected text as markup annotation.
|
boolean |
annotSetSubject(java.lang.String subj)
set selected annotation's subject.
|
boolean |
annotSetText(java.lang.String text)
set selected annotation's text.
|
void |
viewClose()
detach Document object and destroy the object of this class.
|
void |
viewDraw(Canvas canvas)
draw to canvas.
|
void |
viewEnableTextSelection(boolean enable)
Enable or disable text selection
|
int |
viewFind(int dir)
start find operation.
|
void |
viewFindEnd()
end find-operations.
|
void |
viewFindStart(java.lang.String key,
boolean match_case,
boolean whole_word)
start find-operations.
|
PDFView.PDFAnnotListener |
viewGetAnnotListener() |
int |
viewGetCurPageNo()
return value: 0 based.
|
java.lang.String |
viewGetCurPageText()
inner function developers should not use this.
|
Document |
viewGetDoc()
get Document object this view attached.
|
PDFView.PDFPosition |
viewGetPos() |
float |
viewGetRatio() |
PDFThread |
viewGetThread()
inner function developers should not use this.
|
PDFView.PDFViewListener |
viewGetViewListener() |
void |
viewGoto(PDFView.PDFPosition pos) |
void |
viewGotoNextPage() |
void |
viewGotoPage(int pageno)
Goto page.
|
void |
viewGotoPrevPage() |
void |
viewLockSide(boolean lock,
Context context)
lock or unlock horizontal moving in vertical layout.
lock or unlock vertical moving in horizontal layout. |
void |
viewOpen(Context context,
Document doc,
int back_color,
int page_gap)
attach Document object.
|
void |
viewResize(int w,
int h)
resize PDFView object.
|
void |
viewSetAnnotListener(PDFView.PDFAnnotListener listener)
set PDFAnnotListener
|
boolean |
viewSetRatio(float ratio,
float fx,
float fy,
boolean wait_finish)
set to special ratio, only can be invoked after ActionUp
|
void |
viewSetSel(float x1,
float y1,
float x2,
float y2)
set text selection by 2 points
if succeeded it will fired PDFViewListener.onSelectEnd and PDFViewListener.onSelDiaplayed |
void |
viewSetViewListener(PDFView.PDFViewListener listener)
set PDFViewListener
|
boolean |
viewTouchEvent(MotionEvent event)
called when touch event fired.
|
void viewOpen(Context context, Document doc, int back_color, int page_gap)
context
- Context objectdoc
- Document objectback_color
- view background color, formated in 0xAARRGGBB, alpha channel can be 0 for transparent view.page_gap
- gap between pages, can't be negative number.void viewClose()
Document viewGetDoc()
void viewResize(int w, int h)
void viewDraw(Canvas canvas)
void viewLockSide(boolean lock, Context context)
lock
- lock or unlock.context
- Context object.void viewGotoPage(int pageno)
pageno
- 0 based page NO.void viewGotoPrevPage()
void viewGotoNextPage()
int viewGetCurPageNo()
boolean viewTouchEvent(MotionEvent event)
void viewFindStart(java.lang.String key, boolean match_case, boolean whole_word)
int viewFind(int dir)
dir
- dir < 0 means backward, dir > 0 means forward.void viewFindEnd()
void viewSetAnnotListener(PDFView.PDFAnnotListener listener)
void viewSetViewListener(PDFView.PDFViewListener listener)
PDFView.PDFAnnotListener viewGetAnnotListener()
PDFView.PDFViewListener viewGetViewListener()
PDFView.PDFPosition viewGetPos()
void viewGoto(PDFView.PDFPosition pos)
void viewSetSel(float x1, float y1, float x2, float y2)
boolean viewSetRatio(float ratio, float fx, float fy, boolean wait_finish)
ratio
- fx
- fixed point for view.fy
- fixed point for view.wait_finish
- wait all render finished?float viewGetRatio()
void viewEnableTextSelection(boolean enable)
void annotInk()
void annotPerform()
java.lang.String annotGetText()
java.lang.String annotGetSubject()
boolean annotSetText(java.lang.String text)
boolean annotSetSubject(java.lang.String subj)
boolean annotSetMarkup(int type)
type
- 0: Highlight, 1: Underline, 2: StrikeOutboolean annotSetEditText(java.lang.String val)
val
- string valueboolean annotSetChoice(int sel)
sel
- 0 based index.void annotRect()
void annotRemove()
void annotEnd()
PDFThread viewGetThread()
java.lang.String viewGetCurPageText()