Class FieldCode

java.lang.Object
com.independentsoft.office.word.FieldCode
All Implemented Interfaces:
IContentElement, IRunContent

public class FieldCode extends Object implements IRunContent
The Class FieldCode.
  • Constructor Details

    • FieldCode

      public FieldCode()
      Instantiates a new field code.
    • FieldCode

      public FieldCode(String text)
      Instantiates a new field code.
      Parameters:
      text - the text
    • FieldCode

      public FieldCode(Field field)
      Instantiates a new field code.
      Parameters:
      field - the field
    • FieldCode

      public FieldCode(String text, boolean preserveSpace)
      Instantiates a new field code.
      Parameters:
      text - the text
      preserveSpace - the preserve space
  • Method Details

    • getContentElements

      public List<IContentElement> getContentElements()
      Specified by:
      getContentElements in interface IContentElement
    • clone

      public FieldCode clone()
      Specified by:
      clone in interface IContentElement
      Specified by:
      clone in interface IRunContent
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      public String getValue()
      Gets the value.
      Returns:
      the value
    • setValue

      public void setValue(String text)
      Sets the value.
      Parameters:
      text - the new value
    • getPreserveSpace

      public boolean getPreserveSpace()
      Gets the preserve space.
      Returns:
      the preserve space
    • setPreserveSpace

      public void setPreserveSpace(boolean preserveSpace)
      Sets the preserve space.
      Parameters:
      preserveSpace - the new preserve space