SubformSet.java
2.5 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
75
76
77
78
79
80
81
82
83
84
85
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.template.containers;
import com.adobe.xfa.Arg;
import com.adobe.xfa.DependencyTracker;
import com.adobe.xfa.Element;
import com.adobe.xfa.Node;
import com.adobe.xfa.Obj;
import com.adobe.xfa.ScriptDynamicPropObj;
import com.adobe.xfa.ScriptTable;
import com.adobe.xfa.XFA;
import com.adobe.xfa.template.InstanceManager;
import com.adobe.xfa.template.containers.Container;
import com.adobe.xfa.template.containers.Subform;
import com.adobe.xfa.template.containers.SubformSetScript;
import org.xml.sax.Attributes;
public class SubformSet
extends Container {
private static final ScriptDynamicPropObj getInstanceManagerScriptObj = new ScriptDynamicPropObj(21, 63){
@Override
public boolean invokeGetProp(Obj scriptThis, Arg retValue, String sPropertyName) {
return SubformSet.getInstanceManagerFunc(scriptThis, retValue, sPropertyName);
}
};
public SubformSet(Element parent, Node prevSibling) {
super(parent, prevSibling, null, "subformSet", "subformSet", null, XFA.SUBFORMSETTAG, "subformSet");
this.setTransparent(true);
}
public void reset() {
}
@Override
public boolean isWidthGrowSupported() {
return false;
}
@Override
public boolean isHeightGrowSupported() {
return false;
}
public int[][] getUsedTable() {
return null;
}
protected int getInstanceIndex(DependencyTracker pDepTrack) {
return 0;
}
public void setInstanceIndex(int nIndex) {
}
public Obj getInstanceManager() {
return new InstanceManager(this);
}
@Override
public ScriptTable getScriptTable() {
return SubformSetScript.getScriptTable();
}
@Override
protected ScriptDynamicPropObj getDynamicScriptProp(String sPropertyName, boolean bPropertyOverride, boolean bPeek) {
String sNewName;
Node oChild;
if (sPropertyName.length() > 0 && sPropertyName.charAt(0) == '_' && (sNewName = sPropertyName.substring(1)).length() > 0 && ((oChild = this.locateChildByName(sNewName, 0)) instanceof Subform || oChild instanceof SubformSet)) {
return getInstanceManagerScriptObj;
}
return super.getDynamicScriptProp(sPropertyName, bPropertyOverride, bPeek);
}
private static boolean getInstanceManagerFunc(Obj oObj, Arg oRetVal, String sProp) {
SubformSet oSubSet = (SubformSet)oObj;
oRetVal.setObject(oSubSet.getInstanceManager());
return true;
}
}