GenericTextContainer.java 1.31 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.xfa;

import com.adobe.xfa.Element;
import com.adobe.xfa.GenericTextContainerScript;
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 org.xml.sax.Attributes;

public final class GenericTextContainer
extends ProtoableNode {
    public GenericTextContainer(Element parent, Node prevSibling) {
        super(parent, prevSibling, null, null, null, null, -1, null);
    }

    @Override
    public Element clone(Element pParent, boolean bDeep) {
        GenericTextContainer oClone = (GenericTextContainer)super.clone(pParent, bDeep);
        oClone.setLocalName(this.getLocalName());
        return oClone;
    }

    @Override
    public ScriptTable getScriptTable() {
        return GenericTextContainerScript.getScriptTable();
    }

    public String getValue() {
        TextNode node = (TextNode)this.getProperty(XFA.TEXTNODETAG, 0);
        String sReturn = "";
        if (node != null) {
            sReturn = node.getValue();
        }
        return sReturn;
    }

    void setValue(String sValue) {
        TextNode node = (TextNode)this.getProperty(XFA.TEXTNODETAG, 0);
        if (node != null) {
            node.setValue(sValue, true, false);
        }
    }
}