public class

KeyStrokeEventData

extends Object
implements AutoCloseable
java.lang.Object
   ↳ com.pdftron.pdf.KeyStrokeEventData

Class Overview

KeyStokeEventData contains information for executing KeyStrokeAction.

Summary

Public Constructors
KeyStrokeEventData(String field_name, String current_value, String change, int selection_start, int selection_end)
The constructor for KeyStrokeEventData.
Public Methods
void close()
Frees the native memory of the object.
void destroy()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.AutoCloseable

Public Constructors

public KeyStrokeEventData (String field_name, String current_value, String change, int selection_start, int selection_end)

The constructor for KeyStrokeEventData. For example, given the starting string "PDFTron Rocks", and the user selected "Tron" and pasted "Net", this would be indicated with the following constructor: KeyStrokeEventData(field_name, "PDFTron Rocks", "Net", 3, 7);.

Parameters
field_name the name of the field where the event happens
current_value the value of the field before event happens
change the value of text that the user wants to add
selection_start the start postion of the selected text
selection_end the end postion of the selected text

Note: slection_start can be the same as selection_end if no text is selected.

Public Methods

public void close ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

public void destroy ()