public class

FreeTextCreate

extends Tool
implements TextWatcher DialogAnnotNote.DialogAnnotNoteListener InlineEditText.InlineEditTextListener
java.lang.Object
   ↳ com.pdftron.pdf.tools.Tool
     ↳ com.pdftron.pdf.tools.FreeTextCreate
Known Direct Subclasses

Class Overview

A tool for creating free text annotation

Summary

[Expand]
Inherited Constants
From class com.pdftron.pdf.tools.Tool
[Expand]
Inherited Fields
From class com.pdftron.pdf.tools.Tool
Public Constructors
FreeTextCreate(PDFViewCtrl ctrl)
Class constructor
Public Methods
void afterTextChanged(Editable s)
The overload implementation of afterTextChanged(Editable).
void beforeTextChanged(CharSequence s, int start, int count, int after)
The overload implementation of beforeTextChanged(CharSequence, int, int, int).
static Rect calcFreeTextBBox(PDFViewCtrl pdfViewCtrl, FreeText freeText, int pageNum, boolean isRightToLeft, Point targetPoint)
int getCreateAnnotType()
Gets what annotation type this tool can create
RectF getInlineEditTextPosition()
The overload implementation of getInlineEditTextPosition().
static Rect getTextBBoxOnPage(PDFViewCtrl pdfViewCtrl, int pageNum, Point targetPoint)
ToolManager.ToolModeBase getToolMode()
The overload implementation of getToolMode().
void initFreeText(PointF point)
Initializes the free text.
boolean isCreatingAnnotation()
The overload implementation of isCreatingAnnotation().
void onAnnotButtonPressed(int button)
The overload implementation of onAnnotButtonPressed(int).
void onClose()
The overload implementation of onClose().
void onConfigurationChanged(Configuration newConfig)
The overload implementation of onConfigurationChanged(Configuration).
boolean onDown(MotionEvent e)
The overload implementation of onDown(MotionEvent).
boolean onFlingStop()
The overload implementation of onFlingStop().
boolean onMove(MotionEvent e1, MotionEvent e2, float x_dist, float y_dist)
The overload implementation of onMove(MotionEvent, MotionEvent, float, float).
void onPageTurning(int old_page, int cur_page)
The overload implementation of onPageTurning(int, int).
void onRenderingFinished()
The overload implementation of onRenderingFinished().
boolean onScaleBegin(float x, float y)
The overload implementation of onScaleBegin(float, float).
void onTextChanged(CharSequence s, int start, int before, int count)
The overload implementation of onTextChanged(CharSequence, int, int, int).
boolean onUp(MotionEvent e, PDFViewCtrl.PriorEventMode priorEventMode)
The overload implementation of onUp(MotionEvent, PDFViewCtrl.PriorEventMode).
void setupAnnotProperty(int color, float opacity, float thickness, int fillColor, String icon, String pdftronFontName, int textColor, float textSize)
void toggleToFreeTextDialog(String interimText)
The overload implementation of toggleToFreeTextDialog(String).
[Expand]
Inherited Methods
From class com.pdftron.pdf.tools.Tool
From class java.lang.Object
From interface android.text.TextWatcher
From interface com.pdftron.pdf.tools.DialogAnnotNote.DialogAnnotNoteListener
From interface com.pdftron.pdf.tools.ToolManager.Tool
From interface com.pdftron.pdf.utils.InlineEditText.InlineEditTextListener

Public Constructors

public FreeTextCreate (PDFViewCtrl ctrl)

Class constructor

Public Methods

public void afterTextChanged (Editable s)

The overload implementation of afterTextChanged(Editable).

public void beforeTextChanged (CharSequence s, int start, int count, int after)

The overload implementation of beforeTextChanged(CharSequence, int, int, int).

public static Rect calcFreeTextBBox (PDFViewCtrl pdfViewCtrl, FreeText freeText, int pageNum, boolean isRightToLeft, Point targetPoint)

public int getCreateAnnotType ()

Gets what annotation type this tool can create

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

public RectF getInlineEditTextPosition ()

The overload implementation of getInlineEditTextPosition().

Returns
  • The position of the inline edit text

public static Rect getTextBBoxOnPage (PDFViewCtrl pdfViewCtrl, int pageNum, Point targetPoint)

public ToolManager.ToolModeBase getToolMode ()

The overload implementation of getToolMode().

Returns
  • the mode/identifier of this tool.

public void initFreeText (PointF point)

Initializes the free text.

Parameters
point The new target point

public boolean isCreatingAnnotation ()

The overload implementation of isCreatingAnnotation().

public void onAnnotButtonPressed (int button)

The overload implementation of onAnnotButtonPressed(int).

Parameters
button The button ID. See android.content.DialogInterface

public void onClose ()

The overload implementation of onClose().

public void onConfigurationChanged (Configuration newConfig)

The overload implementation of onConfigurationChanged(Configuration).

public boolean onDown (MotionEvent e)

The overload implementation of onDown(MotionEvent).

public boolean onFlingStop ()

The overload implementation of onFlingStop().

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

The overload implementation of onMove(MotionEvent, MotionEvent, float, float).

public void onPageTurning (int old_page, int cur_page)

The overload implementation of onPageTurning(int, int).

public void onRenderingFinished ()

The overload implementation of onRenderingFinished().

public boolean onScaleBegin (float x, float y)

The overload implementation of onScaleBegin(float, float).

public void onTextChanged (CharSequence s, int start, int before, int count)

The overload implementation of onTextChanged(CharSequence, int, int, int).

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

The overload implementation of onUp(MotionEvent, PDFViewCtrl.PriorEventMode).

public void setupAnnotProperty (int color, float opacity, float thickness, int fillColor, String icon, String pdftronFontName, int textColor, float textSize)

Parameters
color The color
opacity The opacity
thickness The thickness
fillColor The color for filling
icon The icon
pdftronFontName The PDFTron font name
textColor The text color
textSize The text size

public void toggleToFreeTextDialog (String interimText)

The overload implementation of toggleToFreeTextDialog(String).

Parameters
interimText The interim text