ConfigurationValue.java
2.23 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.configuration;
import com.adobe.xfa.Attribute;
import com.adobe.xfa.Element;
import com.adobe.xfa.Model;
import com.adobe.xfa.Node;
import com.adobe.xfa.Schema;
import com.adobe.xfa.ScriptTable;
import com.adobe.xfa.TextNode;
import com.adobe.xfa.XFA;
import com.adobe.xfa.configuration.ConfigurationElement;
import com.adobe.xfa.configuration.ConfigurationValueScript;
import com.adobe.xfa.ut.BooleanHolder;
import org.xml.sax.Attributes;
public class ConfigurationValue
extends ConfigurationElement {
public ConfigurationValue(Element parent, Node prevSibling, int classTag, String className) {
super(parent, prevSibling, null, className, className, null, classTag, className);
}
public ConfigurationValue(Element parent, Node prevSibling) {
super(parent, prevSibling, null, "configurationValue", "configurationValue", null, XFA.CONFIGURATIONVALUETAG, "configurationValue");
}
public Attribute getValue() {
return this.getValue(null);
}
public Attribute getValue(BooleanHolder oIsDefault) {
TextNode textNode = null;
if (this.getXFAChildCount() == 1) {
textNode = (TextNode)this.getFirstXFAChild();
}
int eParentTag = XFA.XFA_START;
if (this.getXFAParent() != null) {
eParentTag = this.getXFAParent().getClassTag();
}
if (textNode != null) {
if (oIsDefault != null) {
oIsDefault.value = false;
}
return this.getModel().getSchema().newAttribute(this.getClassTag(), textNode.getValue(), eParentTag);
}
if (oIsDefault != null) {
oIsDefault.value = true;
}
return this.getModel().getSchema().defaultAttribute(this.getClassTag(), eParentTag);
}
@Override
public ScriptTable getScriptTable() {
return ConfigurationValueScript.getScriptTable();
}
public void setValue(Attribute oData) {
if (this.getXFAChildCount() == 1) {
TextNode textNode = (TextNode)this.getFirstXFAChild();
textNode.setValue(oData.toString(), true, false);
} else {
this.getModel().createTextNode(this, null, oData.toString());
}
}
}