SVGTextData.java
1.21 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.svg;
import com.adobe.xfa.Element;
import com.adobe.xfa.Node;
import com.adobe.xfa.TextNode;
import com.adobe.xfa.XFA;
public class SVGTextData
extends TextNode {
public SVGTextData(Element oParent, Node oNode, String text) {
super(oParent, oNode, text);
}
@Override
public Node clone(Element parent) {
return new SVGTextData(parent, parent.getLastXMLChild(), this.getValue());
}
@Override
public String getValue() {
StringBuilder sReturn = new StringBuilder();
if (this.getClassTag() == XFA.TEXTNODETAG) {
sReturn.append(super.getValue());
} else {
this.getValuesFromDom(sReturn, this);
}
return sReturn.toString();
}
public void setValue(String sData) {
super.setValue(sData, false, false);
this.makeNonDefault(false);
}
public String toString() {
return this.getValue();
}
private void getValuesFromDom(StringBuilder textValue, Node oNode) {
for (Node child = oNode.getFirstXMLChild(); child != null; child = child.getNextXMLSibling()) {
this.getValuesFromDom(textValue, child);
}
}
}