PDFJavaScriptEvent.java
2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.internal.pdftoolkit.pdf.interactive.action;
import com.adobe.internal.pdftoolkit.pdf.document.PDFCosObject;
import com.adobe.internal.pdftoolkit.pdf.interactive.action.PDFActionJavaScript;
import com.adobe.internal.pdftoolkit.pdf.interactive.forms.PDFField;
public class PDFJavaScriptEvent {
private PDFCosObject pdfObject;
private String eventName;
private String eventType;
private PDFActionJavaScript pdfJSAction;
public static final String fieldEventType = "Field";
protected PDFJavaScriptEvent(PDFField field, String eventName, String type, PDFActionJavaScript action) {
this.setParent(field);
this.setEventType(type);
this.setPdfJSAction(action);
this.setEventName(eventName);
}
public PDFJavaScriptEvent(PDFField field, PDFActionJavaScript action, String eventType) {
this.setParent(field);
this.setEventType("Field");
this.setPdfJSAction(action);
if (eventType.equalsIgnoreCase("c")) {
this.setEventName("Calculate");
}
if (eventType.equalsIgnoreCase("f")) {
this.setEventName("Format");
}
if (eventType.equalsIgnoreCase("v")) {
this.setEventName("Validate");
}
if (eventType.equalsIgnoreCase("k")) {
this.setEventName("KeystrokeMouse");
}
}
public PDFCosObject getParent() {
return this.pdfObject;
}
public void setParent(PDFField parent) {
this.pdfObject = parent;
}
public PDFActionJavaScript getPdfJSAction() {
return this.pdfJSAction;
}
public void setPdfJSAction(PDFActionJavaScript pdfJSAction) {
this.pdfJSAction = pdfJSAction;
}
public String getEventType() {
return this.eventType;
}
public void setEventType(String type) {
this.eventType = type;
}
public String getEventName() {
return this.eventName;
}
public void setEventName(String eventName) {
this.eventName = eventName;
}
}