RectangleValue.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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.content;
import com.adobe.xfa.AppModel;
import com.adobe.xfa.Element;
import com.adobe.xfa.Model;
import com.adobe.xfa.Node;
import com.adobe.xfa.XFA;
import com.adobe.xfa.content.Content;
import org.xml.sax.Attributes;
public final class RectangleValue
extends Content {
public RectangleValue(Element parent, Node prevSibling) {
super(parent, prevSibling, null, "rectangle", "rectangle", null, XFA.RECTANGLETAG, "rectangle");
}
@Override
public boolean equals(Object obj) {
return this == obj;
}
@Override
public int hashCode() {
return System.identityHashCode(this);
}
@Override
protected Node defaultElementImpl(int eTag, int nOccurrence, boolean bAppend) {
if (eTag == XFA.SCHEMA_DEFAULTTAG) {
eTag = this.defaultElement();
}
if (eTag == XFA.SCHEMA_DEFAULTTAG) {
return null;
}
Element e = null;
if (nOccurrence == 0) {
String className = XFA.getString(eTag);
RectangleValue parent = bAppend ? this : null;
e = this.getModel().createElement(parent, null, null, className, className, null, 0, null);
} else if (nOccurrence == 1) {
Element source;
e = bAppend ? this.getElement(eTag, false, 0, false, false).clone(this, true) : ((source = this.getElement(eTag, true, 0, false, false)) != null ? source.clone(null, true) : this.getModel().createElement(eTag, null));
} else if (nOccurrence == 2) {
if (bAppend) {
this.getElement(eTag, false, 1, false, false);
e = this.getElement(eTag, false, 0, false, false).clone(this, true);
} else {
Element source = this.getElement(eTag, true, 0, false, false);
e = source != null ? source.clone(null, true) : this.getModel().createElement(eTag, null);
}
} else if (nOccurrence == 3 || this.getAppModel().getLegacySetting(AppModel.XFA_LEGACY_V27_SCRIPTING)) {
if (bAppend) {
this.getElement(eTag, false, 2, false, false);
return this.getElement(eTag, false, 1, false, false).clone(this, true);
}
Element source = this.getElement(eTag, true, 0, false, false);
e = source != null ? source.clone(null, true) : this.getModel().createElement(eTag, null);
}
if (e != null) {
e.isTransient(true, true);
}
return e;
}
}