java.lang.Object | |
↳ | com.pdftron.pdf.utils.EventHandler |
Singleton instance class that sends viewer events to any listeners.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | EventHandler.EventListener | Listener used to listen for viewer events. | |||||||||
class | EventHandler.EventType | Encapsulates and event type. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ADD_PAGES_FROM_ANOTHER_DOC | ||||||||||
String | ANNOT_LIST_FILTER_EVENT | ||||||||||
String | ANNOT_TOOLBAR_BUTTON_TYPE_METADATA_KEY | ||||||||||
String | ANNOT_TOOLBAR_EVENT | ||||||||||
String | ANNOT_TOOLBAR_TOOL_EVENT | ||||||||||
String | APPLY_REDACTION_EVENT | ||||||||||
String | EDIT_OUTLINE_EVENT | ||||||||||
String | FAVORITE_TOOLBAR_EVENT | ||||||||||
String | FILE_PICKER_VISIBLE_EVENT | ||||||||||
String | REFLOW_TEXT_MARKUP | ||||||||||
String | TOOLBAR_METADATA_KEY |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EventHandler() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static void |
addListener(EventHandler.EventListener listener)
Adds an event listener to listen for viewer events.
| ||||||||||
static String | eventIdFromToolbar(String toolbarId, int buttonId) | ||||||||||
static EventHandler | getInstance() | ||||||||||
static void |
removeListener(EventHandler.EventListener listener)
Removes an event listener.
| ||||||||||
static boolean |
sendPreEvent(String eventId)
Sends event with given event id to the event listeners.
| ||||||||||
static boolean |
sendPreEvent(String eventId, HashMap<String, String> metadata)
Sends event with given event id and metadata to the event listeners.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Adds an event listener to listen for viewer events.
listener | EventHandler.EventListener that listeners for viewer events
|
---|
Removes an event listener.
listener | to remove |
---|
Sends event with given event id to the event listeners. Called before the event occurs.
eventId | unique event id that represents the type of event |
---|
Sends event with given event id and metadata to the event listeners. Called before the event occurs.
eventId | unique event id that represents the type of event |
---|---|
metadata | metadata to attach to event |