java.lang.Object | ||
↳ | com.pdftron.pdf.tools.Tool | |
↳ | com.pdftron.pdf.tools.TextHighlighter |
This class can be used to highlight all search results.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.tools.Tool
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.tools.Tool
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TextHighlighter(PDFViewCtrl pdfViewCtrl)
Class constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
cancel()
Cancel the running search task(s).
| ||||||||||
void |
clear()
Clears highlighted text.
| ||||||||||
int |
getCreateAnnotType()
Gets what annotation type this tool can create
| ||||||||||
String | getSearchPattern() | ||||||||||
ToolManager.ToolModeBase |
getToolMode()
The overload implementation of
getToolMode() . | ||||||||||
void | highlightSelection() | ||||||||||
boolean | isRunning() | ||||||||||
void |
onClose()
The overload implementation of
onClose() . | ||||||||||
void |
onDoubleTapZoomAnimationBegin()
The overload implementation of
onDoubleTapZoomAnimationBegin() . | ||||||||||
void |
onDoubleTapZoomAnimationEnd()
The overload implementation of
onDoubleTapZoomAnimationEnd() . | ||||||||||
void |
onDraw(Canvas canvas, Matrix tfm)
The overload implementation of
onDraw(Canvas, Matrix) . | ||||||||||
boolean |
onFlingStop()
The overload implementation of
onFlingStop() . | ||||||||||
void |
onHighlightsTaskCancelled(int pageStart, int pageEnd)
Called when the task of highlights has been cancelled.
| ||||||||||
void |
onHighlightsTaskFinished(Highlights[] highlights, int pageStart, int pageEnd)
Called when the task of highlights has been terminated.
| ||||||||||
void |
onLayout(boolean changed, int l, int t, int r, int b)
The overload implementation of
onLayout(boolean, int, int, int, int) . | ||||||||||
void |
onNightModeUpdated(boolean isNightMode)
The overload implementation of
onNightModeUpdated(boolean) . | ||||||||||
void |
onPageTurning(int old_page, int cur_page)
The overload implementation of
onPageTurning(int, int) . | ||||||||||
boolean |
onScaleBegin(float x, float y)
The overload implementation of
onScaleBegin(float, float) . | ||||||||||
boolean |
onScaleEnd(float x, float y)
The overload implementation of
onScaleEnd(float, float) . | ||||||||||
void |
onScrollChanged(int l, int t, int oldl, int oldt)
The overload implementation of
onScrollChanged(int, int, int, int) . | ||||||||||
boolean |
onUp(MotionEvent e, PDFViewCtrl.PriorEventMode priorEventMode)
The overload implementation of
onUp(MotionEvent, PDFViewCtrl.PriorEventMode) . | ||||||||||
void |
setHighlightColors(int highlightColorInDayMode, int highlightColorInNightMode, int selColorInDayMode, int selColorInNightMode)
Sets the highlight colors.
| ||||||||||
void |
start(String searchPattern, boolean matchCase, boolean matchWholeWords, boolean useRegularExpressions)
Starts highlighting text.
| ||||||||||
void |
start(String searchPattern)
Starts highlighting text.
| ||||||||||
void |
stop()
Cancel all tasks and indicate that the TextHighlighter has stopped.
| ||||||||||
void |
update()
Updates highlighted text
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.tools.Tool
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.pdftron.pdf.asynctask.GenerateHighlightsTask.Callback
| |||||||||||
From interface
com.pdftron.pdf.tools.ToolManager.Tool
|
Cancel the running search task(s). The state of the TextHighlighter will still be "running", so calling classes that depend on the TextHighlighter running will still function the same way.
Clears highlighted text.
Gets what annotation type this tool can create
The overload implementation of getToolMode()
.
The overload implementation of onDoubleTapZoomAnimationBegin()
.
The overload implementation of onDoubleTapZoomAnimationEnd()
.
The overload implementation of onDraw(Canvas, Matrix)
.
Called when the task of highlights has been cancelled.
pageStart | The start page |
---|---|
pageEnd | The end page |
Called when the task of highlights has been terminated.
highlights | The output highlights |
---|---|
pageStart | The start page |
pageEnd | The end page |
The overload implementation of onLayout(boolean, int, int, int, int)
.
The overload implementation of onNightModeUpdated(boolean)
.
The overload implementation of onPageTurning(int, int)
.
The overload implementation of onScaleBegin(float, float)
.
The overload implementation of onScaleEnd(float, float)
.
The overload implementation of onScrollChanged(int, int, int, int)
.
The overload implementation of onUp(MotionEvent, PDFViewCtrl.PriorEventMode)
.
Sets the highlight colors.
highlightColorInDayMode | highlight color in day mode |
---|---|
highlightColorInNightMode | highlight color in night mode |
selColorInDayMode | Selection color in day mode |
selColorInNightMode | Selection color in night mode |
Starts highlighting text.
searchPattern | The search pattern |
---|---|
matchCase | True if match case is enabled |
matchWholeWords | True if whole word is enabled |
useRegularExpressions | True if regular expressions is enabled |
Starts highlighting text.
The search pattern doesn't need to match case or match the whole word.
See start(String, boolean, boolean, boolean)
.
searchPattern | The search pattern |
---|
Cancel all tasks and indicate that the TextHighlighter has stopped. This method should be used instead of just cancel() if the search will not be continued.
Updates highlighted text