Class TextSElement

All Implemented Interfaces:
Serializable, Cloneable, Element, ElementTraversal, EventTarget, Node, NodeList, TypeInfo

public class TextSElement extends OdfElement
DOM implementation of OpenDocument element <text:s>.
See Also:
  • Field Details

    • ELEMENT_NAME

      public static final OdfName ELEMENT_NAME
  • Constructor Details

    • TextSElement

      public TextSElement(OdfFileDom ownerDoc)
      Create the instance of TextSElement
      Parameters:
      ownerDoc - The type is OdfFileDom
  • Method Details

    • getOdfName

      public OdfName getOdfName()
      Get the element name
      Specified by:
      getOdfName in class OdfElement
      Returns:
      return OdfName the name of element <text:s>.
    • getTextCAttribute

      public Integer getTextCAttribute()
      Receives the value of the ODFDOM attribute representation TextCAttribute , See @text:c
      Returns:
      - the Integer , the value or null, if the attribute is not set and no default value defined.
    • setTextCAttribute

      public void setTextCAttribute(Integer textCValue)
      Sets the value of ODFDOM attribute representation TextCAttribute , See @text:c
      Parameters:
      textCValue - The type is Integer
    • accept

      public void accept(ElementVisitor visitor)
      Accept an visitor instance to allow the visitor to do some operations. Refer to visitor design pattern to get a better understanding.
      Overrides:
      accept in class OdfElement
      Parameters:
      visitor - an instance of DefaultElementVisitor
    • isComponentRoot

      public boolean isComponentRoot()
      Overrides:
      isComponentRoot in class OdfElement
    • getRepetition

      public int getRepetition()
      Overrides:
      getRepetition in class OdfElement
      Returns:
      the repetition the element represents, by default it is 1
    • isRepeatable

      public boolean isRepeatable()
      Overrides:
      isRepeatable in class OdfElement
      Returns:
      true if the element does represent multiple instances. (only applicable for some elements as cell or row).
    • setRepetition

      public void setRepetition(int repetition)
      Overrides:
      setRepetition in class OdfElement
    • split

      public TextSElement split(int posStart)
      Splitting the element at the given position into two halves
      Overrides:
      split in class OdfElement
      Parameters:
      posStart - The split position. Counting is starting with zero. The start of the second half.
      Returns:
      the new created second element (or if posStart was less than 1 the original element)