java.lang.Object
   ↳ com.pdftron.pdf.tools.Tool
     ↳ com.pdftron.pdf.tools.AnnotEdit
Known Direct Subclasses

Class Overview

This class is responsible for editing a selected annotation, e.g., moving and resizing.

Summary

Constants
int RECTANGULAR_CTRL_PTS_CNT
int e_ll lower left control point
int e_lm lower middle control point
int e_lr lower right control point
int e_ml middle left control point
int e_moving moving control
int e_mr middle right control point
int e_ul upper left control point
int e_um upper middle control point
int e_unknown unknown control point
int e_ur upper right control point
[Expand]
Inherited Constants
From class com.pdftron.pdf.tools.Tool
[Expand]
Inherited Fields
From class com.pdftron.pdf.tools.Tool
Public Constructors
AnnotEdit(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).
void enterText()
int getCreateAnnotType()
Gets what annotation type this tool can create
int getEffectCtrlPointId(float x, float y)
Returns which effective control point is closest to the specified coordinate.
RectF getInlineEditTextPosition()
The overload implementation of getInlineEditTextPosition().
ToolManager.ToolModeBase getToolMode()
The overload implementation of getToolMode().
boolean isCreatingAnnotation()
The overload implementation of isCreatingAnnotation().
boolean isCtrlPtsHidden()
boolean isEditAnnotTool()
The overload implementation of isEditAnnotTool()
boolean isFreeTextEditing()
void onAnnotButtonPressed(int button)
The overload implementation of onAnnotButtonPressed(int).
void onChangeAnnotFillColor(int color)
The method is invoked when fill color is selected
void onChangeAnnotFont(FontResource font)
The method is invoked when font resource is selected in font spinner
void onChangeAnnotIcon(String icon)
The method is invoked when icon is selected in icon picker
void onChangeAnnotOpacity(float opacity, boolean done)
The method is invoked when opacity is changed in style picker
void onChangeAnnotStrokeColor(int color)
The method is invoked when color is selected If it is Text annotation, it will change sticky note icon color If it is FreeText annoation, it will change text color
void onChangeAnnotTextColor(int textColor)
The method is invoked when text color is changed in style picker
void onChangeAnnotTextSize(float textSize, boolean done)
The method is invoked when text size is changed in style picker
void onChangeAnnotThickness(float thickness, boolean done)
The method is invoked when thickness is changed in style picker
void onChangeOverlayText(String overlayText)
The method is invoked when overlay text change
void onChangeRichContentEnabled(boolean enabled)
The method is invoked when rich content enabled change
void onChangeRulerProperty(RulerItem rulerItem)
The method is invoked when any of the ruler properties change
void onChangeSnapping(boolean snap)
The method is invoked when snap switch change
void onClose()
The overload implementation of onClose().
void onConfigurationChanged(Configuration newConfig)
The overload implementation of onConfigurationChanged(Configuration).
void onCreate()
The overload implementation of onCreate().
boolean onDown(MotionEvent e)
The overload implementation of onDown(MotionEvent).
void onDraw(Canvas canvas, Matrix tfm)
The overload implementation of onDraw(Canvas, Matrix).
boolean onFlingStop()
The overload implementation of onFlingStop().
boolean onKeyUp(int keyCode, KeyEvent event)
The overload implementation of onKeyUp(int, KeyEvent).
void onLayout(boolean changed, int l, int t, int r, int b)
The overload implementation of onLayout(boolean, int, int, int, int).
boolean onLongPress(MotionEvent e)
The overload implementation of onLongPress(MotionEvent).
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).
boolean onQuickMenuClicked(QuickMenuItem menuItem)
The overload implementation of onQuickMenuClicked(QuickMenuItem).
void onRenderingFinished()
The overload implementation of onRenderingFinished().
boolean onScale(float x, float y)
The overload implementation of onScale(float, float).
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 onSingleTapConfirmed(MotionEvent e)
The overload implementation of onSingleTapConfirmed(MotionEvent).
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 selectAnnot(Annot annot, int pageNum)
The overload implementation of selectAnnot(Annot, int).
static void setDebug(boolean debug)
void setUpFromFreeTextCreate(boolean flag)
void setUpFromStickyCreate(boolean flag)
boolean showMenu(RectF anchor_rect, QuickMenu quickMenu)
The overload implementation of showMenu(RectF, QuickMenu).
boolean showMenu(RectF anchor_rect)
Shows the quick menu.
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.model.AnnotStyle.OnAnnotStyleChangeListener
From interface com.pdftron.pdf.tools.DialogAnnotNote.DialogAnnotNoteListener
From interface com.pdftron.pdf.tools.ToolManager.Tool
From interface com.pdftron.pdf.utils.InlineEditText.InlineEditTextListener

Constants

public static final int RECTANGULAR_CTRL_PTS_CNT

Constant Value: 8 (0x00000008)

public static final int e_ll

lower left control point

Constant Value: 0 (0x00000000)

public static final int e_lm

lower middle control point

Constant Value: 6 (0x00000006)

public static final int e_lr

lower right control point

Constant Value: 1 (0x00000001)

public static final int e_ml

middle left control point

Constant Value: 7 (0x00000007)

public static final int e_moving

moving control

Constant Value: -2 (0xfffffffe)

public static final int e_mr

middle right control point

Constant Value: 4 (0x00000004)

public static final int e_ul

upper left control point

Constant Value: 3 (0x00000003)

public static final int e_um

upper middle control point

Constant Value: 5 (0x00000005)

public static final int e_unknown

unknown control point

Constant Value: -1 (0xffffffff)

public static final int e_ur

upper right control point

Constant Value: 2 (0x00000002)

Public Constructors

public AnnotEdit (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 void enterText ()

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 int getEffectCtrlPointId (float x, float y)

Returns which effective control point is closest to the specified coordinate.

Parameters
x The x coordinate
y The y coordinate
Returns

public RectF getInlineEditTextPosition ()

The overload implementation of getInlineEditTextPosition().

Returns
  • The position of the inline edit text

public ToolManager.ToolModeBase getToolMode ()

The overload implementation of getToolMode().

Returns
  • the mode/identifier of this tool.

public boolean isCreatingAnnotation ()

The overload implementation of isCreatingAnnotation().

public boolean isCtrlPtsHidden ()

Returns
  • True if control points are hidden

public boolean isEditAnnotTool ()

The overload implementation of isEditAnnotTool()

Returns
  • true

public boolean isFreeTextEditing ()

Returns
  • True if the free text annotation is editable.

public void onAnnotButtonPressed (int button)

The overload implementation of onAnnotButtonPressed(int).

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

public void onChangeAnnotFillColor (int color)

The method is invoked when fill color is selected

Parameters
color fill color of annotation

public void onChangeAnnotFont (FontResource font)

The method is invoked when font resource is selected in font spinner

Parameters
font font resource

public void onChangeAnnotIcon (String icon)

The method is invoked when icon is selected in icon picker

Parameters
icon icon name of sticky note

public void onChangeAnnotOpacity (float opacity, boolean done)

The method is invoked when opacity is changed in style picker

Parameters
opacity opacity of annotation

public void onChangeAnnotStrokeColor (int color)

The method is invoked when color is selected If it is Text annotation, it will change sticky note icon color If it is FreeText annoation, it will change text color

Parameters
color stroke color/ icon color/ text color of annotation

public void onChangeAnnotTextColor (int textColor)

The method is invoked when text color is changed in style picker

Parameters
textColor text color of annotation style.

public void onChangeAnnotTextSize (float textSize, boolean done)

The method is invoked when text size is changed in style picker

Parameters
textSize text size of annotation style.

public void onChangeAnnotThickness (float thickness, boolean done)

The method is invoked when thickness is changed in style picker

Parameters
thickness thickness of annotation style.

public void onChangeOverlayText (String overlayText)

The method is invoked when overlay text change

Parameters
overlayText the overlay text

public void onChangeRichContentEnabled (boolean enabled)

The method is invoked when rich content enabled change

Parameters
enabled whether to enable rich content

public void onChangeRulerProperty (RulerItem rulerItem)

The method is invoked when any of the ruler properties change

Parameters
rulerItem the ruler item

public void onChangeSnapping (boolean snap)

The method is invoked when snap switch change

Parameters
snap whether to snap

public void onClose ()

The overload implementation of onClose().

public void onConfigurationChanged (Configuration newConfig)

The overload implementation of onConfigurationChanged(Configuration).

public void onCreate ()

The overload implementation of onCreate().

public boolean onDown (MotionEvent e)

The overload implementation of onDown(MotionEvent).

public void onDraw (Canvas canvas, Matrix tfm)

The overload implementation of onDraw(Canvas, Matrix).

public boolean onFlingStop ()

The overload implementation of onFlingStop().

public boolean onKeyUp (int keyCode, KeyEvent event)

The overload implementation of onKeyUp(int, KeyEvent).

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

The overload implementation of onLayout(boolean, int, int, int, int).

public boolean onLongPress (MotionEvent e)

The overload implementation of onLongPress(MotionEvent).

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 boolean onQuickMenuClicked (QuickMenuItem menuItem)

The overload implementation of onQuickMenuClicked(QuickMenuItem).

Parameters
menuItem The clicked menu item.
Returns
  • True if handled

public void onRenderingFinished ()

The overload implementation of onRenderingFinished().

public boolean onScale (float x, float y)

The overload implementation of onScale(float, float).

public boolean onScaleBegin (float x, float y)

The overload implementation of onScaleBegin(float, float).

public boolean onScaleEnd (float x, float y)

The overload implementation of onScaleEnd(float, float).

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

The overload implementation of onScrollChanged(int, int, int, int).

public boolean onSingleTapConfirmed (MotionEvent e)

The overload implementation of onSingleTapConfirmed(MotionEvent).

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 selectAnnot (Annot annot, int pageNum)

The overload implementation of selectAnnot(Annot, int).

Parameters
annot The annotaion
pageNum The page number where the annotaion is on

public static void setDebug (boolean debug)

public void setUpFromFreeTextCreate (boolean flag)

public void setUpFromStickyCreate (boolean flag)

public boolean showMenu (RectF anchor_rect, QuickMenu quickMenu)

The overload implementation of showMenu(RectF, QuickMenu).

public boolean showMenu (RectF anchor_rect)

Shows the quick menu.

public void toggleToFreeTextDialog (String interImText)

The overload implementation of toggleToFreeTextDialog(String).

Parameters
interImText The interim text