public abstract class

AdvancedShapeCreate

extends SimpleShapeCreate
java.lang.Object
   ↳ com.pdftron.pdf.tools.Tool
     ↳ com.pdftron.pdf.tools.BaseTool
       ↳ com.pdftron.pdf.tools.SimpleShapeCreate
         ↳ com.pdftron.pdf.tools.AdvancedShapeCreate
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This class is the base class for several shape creation classes that need clicks to determine vertices vs drag and drop, e.g., Polyline, Polygon, Cloud and etc.

Summary

Nested Classes
interface AdvancedShapeCreate.OnEditToolbarListener Callback interface invoked when the edit toolbar should be shown/closed. 
[Expand]
Inherited Constants
From class com.pdftron.pdf.tools.SimpleShapeCreate
From class com.pdftron.pdf.tools.BaseTool
From class com.pdftron.pdf.tools.Tool
[Expand]
Inherited Fields
From class com.pdftron.pdf.tools.Tool
Public Constructors
AdvancedShapeCreate(PDFViewCtrl ctrl)
Class constructor
Public Methods
boolean canClear()
boolean canRedo()
boolean canUndo()
void clear()
Clears the vertices.
void commit()
Commits creating the annotation.
int getPageNum()
boolean onDoubleTap(MotionEvent e)
The overload implementation of onDoubleTap(MotionEvent).
boolean onDoubleTapEvent(MotionEvent e)
The overload implementation of onDoubleTapEvent(MotionEvent).
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 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 onPointerDown(MotionEvent e)
The overload implementation of onPointerDown(MotionEvent).
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).
boolean onSingleTapConfirmed(MotionEvent e)
The overload implementation of onSingleTapConfirmed(MotionEvent).
boolean onUp(MotionEvent e, PDFViewCtrl.PriorEventMode priorEventMode)
The overload implementation of onUp(MotionEvent, PDFViewCtrl.PriorEventMode).
void redo()
Redoes the last undo.
void setOnEditToolbarListener(AdvancedShapeCreate.OnEditToolbarListener listener)
void setOnToolbarStateUpdateListener(OnToolbarStateUpdateListener listener)
Sets the OnToolbarStateUpdateListener listener.
void setupAnnotProperty(int strokeColor, float opacity, float thickness, int fillColor, String icon, String pdfTronFontName)
void undo()
Undoes the last action.
[Expand]
Inherited Methods
From class com.pdftron.pdf.tools.SimpleShapeCreate
From class com.pdftron.pdf.tools.BaseTool
From class com.pdftron.pdf.tools.Tool
From class java.lang.Object
From interface com.pdftron.pdf.tools.ToolManager.Tool

Public Constructors

public AdvancedShapeCreate (PDFViewCtrl ctrl)

Class constructor

Public Methods

public boolean canClear ()

Returns
  • True if can clear the vertices

public boolean canRedo ()

Returns
  • True if can redo the last undo

public boolean canUndo ()

Returns
  • True if can undo the last action

public void clear ()

Clears the vertices.

public void commit ()

Commits creating the annotation.

public int getPageNum ()

Returns
  • the page number that the annotation is created on

public boolean onDoubleTap (MotionEvent e)

The overload implementation of onDoubleTap(MotionEvent).

public boolean onDoubleTapEvent (MotionEvent e)

The overload implementation of onDoubleTapEvent(MotionEvent).

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 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 onPointerDown (MotionEvent e)

The overload implementation of onPointerDown(MotionEvent).

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 boolean onSingleTapConfirmed (MotionEvent e)

The overload implementation of onSingleTapConfirmed(MotionEvent).

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

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

public void redo ()

Redoes the last undo.

public void setOnEditToolbarListener (AdvancedShapeCreate.OnEditToolbarListener listener)

Parameters
listener the AdvancedShapeCreate.OnEditToolbarListener listener

public void setOnToolbarStateUpdateListener (OnToolbarStateUpdateListener listener)

Sets the OnToolbarStateUpdateListener listener.

Parameters
listener the OnToolbarStateUpdateListener listener

public void setupAnnotProperty (int strokeColor, float opacity, float thickness, int fillColor, String icon, String pdfTronFontName)

Parameters
strokeColor The color
opacity The opacity
thickness The thickness
fillColor The color for filling
icon The icon
pdfTronFontName The PDFTron font name

public void undo ()

Undoes the last action.