public interface

AnnotationCreationController

implements FragmentSpecialModeController
com.pspdfkit.ui.special_mode.controller.AnnotationCreationController

Class Overview

Default controller given when entering annotation creation mode. Used to control annotation creation mode properties and actions.

Summary

Public Methods
abstract void bindAnnotationInspectorController(AnnotationInspectorController annotationInspectorController)
Binds to the annotation inspector controller for managing annotation inspector.
abstract void changeAnnotationCreationMode(AnnotationTool annotationTool)
Starts an annotation creation mode with different annotation tool selected.
abstract AnnotationTool getActiveAnnotationTool()
Returns annotation creation mode that is currently active.
abstract float getAlpha()
Get alpha set to the annotation creation mode.
abstract AnnotationManager getAnnotationManager()
Returns an annotation manager which you can use to register listeners from the controller.
abstract List<Integer> getBorderDashArray()
Get dash array set to the annotation creation mode getBorderDashArray().
abstract BorderStyle getBorderStyle()
Get border style set to the annotation creation mode.
abstract int getColor()
Get current color set to the annotation creation mode.
abstract PdfConfiguration getConfiguration()
Returns an active configuration.
abstract int getFillColor()
Get fill color set to the annotation creation mode.
abstract Font getFont()
Get the font set to the annotation creation mode.
abstract Pair<LineEndTypeLineEndType> getLineEnds()
Returns current line ending styles for drawn lines.
abstract int getOutlineColor()
Get outline color set to the annotation creation mode.
abstract String getOverlayText()
Gets the overlay text set to the annotation creation mode.
abstract boolean getRepeatOverlayText()
Returns whether the overlay text should be repeated or not.
abstract float getTextSize()
Get text size set to the annotation creation mode.
abstract float getThickness()
Get thickness set to the annotation creation mode.
abstract void setAlpha(float alpha)
Set alpha to the annotation creation mode.
abstract void setBorderDashArray(List<Integer> dashArray)
Set dash array.
abstract void setBorderStyle(BorderStyle borderStyle)
Set border style to the annotation creation mode.
abstract void setColor(int color)
Set color for the annotation creation mode.
abstract void setFillColor(int fillColor)
Set fill color for the annotation creation mode.
abstract void setFont(Font font)
Set the font to the annotation creation mode.
abstract void setLineEnds(LineEndType lineEnd1, LineEndType lineEnd2)
Sets line ending style for drawn lines.
abstract void setOutlineColor(int outlineColor)
Set outline color for the annotation creation mode.
abstract void setOverlayText(String overlayText)
Sets the overlay text to the annotation creation mode.
abstract void setRepeatOverlayText(boolean repeatOverlayText)
Sets if the overlay text should be repeated.
abstract void setTextSize(float textSize)
Set text size to the annotation creation mode.
abstract void setThickness(float thickness)
Set thickness to the annotation creation mode.
abstract boolean shouldDisplayPicker()
Whether annotation inspector toolbar icon should be visible.
abstract void showAnnotationEditor(Annotation annotation)
Shows annotation editor for the passed annotation.
abstract void toggleAnnotationInspector()
Displays/hides an annotation inspector for the selected annotation type.
abstract void unbindAnnotationInspectorController()
Unbinds from previously bound annotation inspector controller.
[Expand]
Inherited Methods
From interface com.pspdfkit.ui.special_mode.controller.base.FragmentSpecialModeController
From interface com.pspdfkit.ui.special_mode.controller.base.SpecialModeController

Public Methods

public abstract void bindAnnotationInspectorController (AnnotationInspectorController annotationInspectorController)

Binds to the annotation inspector controller for managing annotation inspector.

Parameters
annotationInspectorController Controller for managing annotation inspector.

public abstract void changeAnnotationCreationMode (AnnotationTool annotationTool)

Starts an annotation creation mode with different annotation tool selected.

Parameters
annotationTool New annotation tool.

public abstract AnnotationTool getActiveAnnotationTool ()

Returns annotation creation mode that is currently active.

Returns
  • Active annotation tool. NONE if annotation creation mode is active but no annotation tool is selected, null if annotation creation mode is inactive.

public abstract float getAlpha ()

Get alpha set to the annotation creation mode.

Returns
  • Alpha in percent from 0 to 1.

public abstract AnnotationManager getAnnotationManager ()

Returns an annotation manager which you can use to register listeners from the controller.

Returns
  • Annotation manager managing the annotation editing listeners.

public abstract List<Integer> getBorderDashArray ()

Get dash array set to the annotation creation mode getBorderDashArray().

Returns
  • Dash array of null when none was set.

public abstract BorderStyle getBorderStyle ()

Get border style set to the annotation creation mode.

Returns
  • Border style.

public abstract int getColor ()

Get current color set to the annotation creation mode.

Returns
  • Annotation creation mode color, displayed in the color circle starting up a color picker.

public abstract PdfConfiguration getConfiguration ()

Returns an active configuration.

Returns
  • Current configuration.

public abstract int getFillColor ()

Get fill color set to the annotation creation mode.

Returns
  • Annotation creation mode fill color.

public abstract Font getFont ()

Get the font set to the annotation creation mode.

Returns
  • The font set.

public abstract Pair<LineEndTypeLineEndType> getLineEnds ()

Returns current line ending styles for drawn lines.

Returns
  • Pair of start and end line ending styles. If they're not set, returns NONE.

public abstract int getOutlineColor ()

Get outline color set to the annotation creation mode.

Returns
  • Annotation creation mode outline color.

public abstract String getOverlayText ()

Gets the overlay text set to the annotation creation mode.

Returns
  • The overlay text that is set.

public abstract boolean getRepeatOverlayText ()

Returns whether the overlay text should be repeated or not.

Returns
  • Whether the overlay text should be repeated or not.

public abstract float getTextSize ()

Get text size set to the annotation creation mode.

Returns
  • Text size in PDF points.

public abstract float getThickness ()

Get thickness set to the annotation creation mode.

Returns
  • Thickness in PDF points (font size for FREETEXT annotations).

public abstract void setAlpha (float alpha)

Set alpha to the annotation creation mode.

Parameters
alpha Alpha in percent from 0 to 1.

public abstract void setBorderDashArray (List<Integer> dashArray)

Set dash array. This is only valid when DASHED is used.

Parameters
dashArray Dash array to use. See getBorderDashArray() for description.

public abstract void setBorderStyle (BorderStyle borderStyle)

Set border style to the annotation creation mode.

Parameters
borderStyle Required border style.

public abstract void setColor (int color)

Set color for the annotation creation mode.

Parameters
color Annotation creation mode color.

public abstract void setFillColor (int fillColor)

Set fill color for the annotation creation mode.

Parameters
fillColor Annotation creation mode fill color.

public abstract void setFont (Font font)

Set the font to the annotation creation mode.

Parameters
font The font to use.

public abstract void setLineEnds (LineEndType lineEnd1, LineEndType lineEnd2)

Sets line ending style for drawn lines.

Parameters
lineEnd1 LineEndType for start of the line.
lineEnd2 LineEndType for end of the line.

public abstract void setOutlineColor (int outlineColor)

Set outline color for the annotation creation mode.

Parameters
outlineColor Annotation creation mode outline color.

public abstract void setOverlayText (String overlayText)

Sets the overlay text to the annotation creation mode.

Parameters
overlayText The overlay text to use.

public abstract void setRepeatOverlayText (boolean repeatOverlayText)

Sets if the overlay text should be repeated.

Parameters
repeatOverlayText If the overlay text should be repeated.

public abstract void setTextSize (float textSize)

Set text size to the annotation creation mode.

Parameters
textSize Text size in PDF points.

public abstract void setThickness (float thickness)

Set thickness to the annotation creation mode.

Parameters
thickness Thickness in PDF points (font size for FREETEXT annotations).

public abstract boolean shouldDisplayPicker ()

Whether annotation inspector toolbar icon should be visible.

public abstract void showAnnotationEditor (Annotation annotation)

Shows annotation editor for the passed annotation.

Parameters
annotation Annotation for which to show the editor.

public abstract void toggleAnnotationInspector ()

Displays/hides an annotation inspector for the selected annotation type.

public abstract void unbindAnnotationInspectorController ()

Unbinds from previously bound annotation inspector controller.