Class Content

All Implemented Interfaces:
Peer
Direct Known Subclasses:
BooleanValue, DateTimeValue, DateValue, DecimalValue, ExDataValue, FloatValue, ImageValue, IntegerValue, RectangleValue, TextValue, TimeValue

public class Content extends ProtoableNode
Base class for all the XFA types that hold content (integer, text, image etc)
  • Method Details

    • appendChild

      public void appendChild(Node poChild, boolean bValidate)
      Description copied from class: Element
      Appends the given child to this element.
      Overrides:
      appendChild in class Element
      Parameters:
      poChild - the child node being appended.
      bValidate - when true, ensures the given child is valid per the model's schema and throws an ExFull if not.
    • couldBeNull

      public boolean couldBeNull()
    • equals

      public boolean equals(Object object)
      Equals is a helper function that returns whether two Contents are equal (case-sensitive, and considering the null state of both nodes).
      Overrides:
      equals in class Object
      Parameters:
      object - the content node to compare.
      Returns:
      true if the content nodes are equal.
    • hashCode

      public int hashCode()
      Returns a hash code value for the object. This method is unsupported.
      Overrides:
      hashCode in class Object
    • getIsNull

      public boolean getIsNull()
      Description copied from class: Element
      Determine if this node contains a null value.
      Overrides:
      getIsNull in class Element
      Returns:
      true if this node contains a null value, false otherwise.
    • getStrValue

      public String getStrValue()
    • getScriptTable

      public ScriptTable getScriptTable()
      Overrides:
      getScriptTable in class ProtoableNode
    • insertChild

      public void insertChild(Node poChild, Node poRefNode, boolean bValidate)
      Description copied from class: Element
      Inserts a child before a specific child in the child list.
      Overrides:
      insertChild in class Element
      Parameters:
      poChild - the child to be inserted
      poRefNode - the child to insert before
      bValidate - if true, validate the insertion
    • resetPostLoadXML

      public void resetPostLoadXML()
      Overrides:
      resetPostLoadXML in class Element
    • sameText

      public boolean sameText(Content compare)
      This method is a helper function that returns whether two Contents have the same text value. For example if you had the following: 0 and 0 This method will return true, as their content translated to text are the same. (case-sensitive, and considering the IsContentNull setting of both nodes).
      Parameters:
      compare - - the Content node to compare with
      Returns:
      true if the Content nodes are equal
    • setIsNull

      public void setIsNull(boolean bNull, boolean bNotify, boolean bDefault)
      Sets the null state of the node
      Parameters:
      bNull - if true, set to null
      bNotify - if true, notify peers of change
      bDefault - if false make sure this node is marked as not default
    • setStrValue

      public void setStrValue(String sText, boolean bNotify, boolean bDefault)
    • setValue

      public void setValue(String sValue, boolean bFromData, boolean bNotify, boolean bDefault)
    • toString

      public String toString()
      Return the value of the content as a string
      Overrides:
      toString in class Object
      Returns:
      the string representation of the value.