Script.java
1.53 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.template.automation;
import com.adobe.xfa.Element;
import com.adobe.xfa.Model;
import com.adobe.xfa.Node;
import com.adobe.xfa.ProtoableNode;
import com.adobe.xfa.ScriptTable;
import com.adobe.xfa.TextNode;
import com.adobe.xfa.XFA;
import com.adobe.xfa.template.automation.ScriptScript;
import com.adobe.xfa.ut.ResourceLoader;
import org.xml.sax.Attributes;
public final class Script
extends ProtoableNode {
private static final boolean ACROBAT_PLUGIN = ResourceLoader.loadProperty("ACROBAT_PLUGIN").equalsIgnoreCase("true");
private boolean mbIsParsing;
public Script(Element pParent, Node prevSibling) {
super(pParent, prevSibling, null, "script", "script", null, XFA.SCRIPTTAG, "script");
if (ACROBAT_PLUGIN && this.getModel().getLocalName().equals("template")) {
this.setPermsLock(true);
}
}
@Override
public ScriptTable getScriptTable() {
return ScriptScript.getScriptTable();
}
public String getValue() {
TextNode t = this.getText(true, false, false);
if (t == null) {
return "";
}
return t.getValue();
}
public boolean isParsing() {
return this.mbIsParsing;
}
public void isParsing(boolean bIsParsing) {
this.mbIsParsing = bIsParsing;
}
public void setValue(String sValue) {
TextNode pNode = this.getText(true, false, false);
if (pNode != null) {
pNode.setValue(sValue, true, false);
}
}
}