Class PageVariableSetField

java.lang.Object
com.independentsoft.office.odf.fields.Field
com.independentsoft.office.odf.fields.PageVariableSetField
All Implemented Interfaces:
IContentElement, IParagraphContent

public class PageVariableSetField extends Field
Used to set a page variable.
  • Constructor Details

    • PageVariableSetField

      public PageVariableSetField()
      Initializes a new instance of the PageVariableSetField class.
    • PageVariableSetField

      public PageVariableSetField(InternalXMLStreamReader reader) throws XMLStreamException
      Instantiates a new page variable set field.
      Parameters:
      reader - the reader
      Throws:
      XMLStreamException - the xML stream exception
  • Method Details

    • getContentElements

      public List<IContentElement> getContentElements()
      Returns all content elements.
      Specified by:
      getContentElements in interface IContentElement
      Specified by:
      getContentElements in class Field
      Returns:
      A collection of content elements.
    • getParent

      public IContentElement getParent()
      Returns the parent content element.
      Specified by:
      getParent in interface IContentElement
      Overrides:
      getParent in class Field
      Returns:
      the parent
    • setParent

      public void setParent(IContentElement parent)
      Sets the parent content element.
      Specified by:
      setParent in interface IContentElement
      Overrides:
      setParent in class Field
      Parameters:
      parent - the new parent
    • clone

      public PageVariableSetField clone()
      Creates a new object that is a deep copy of the current instance.
      Specified by:
      clone in interface IContentElement
      Specified by:
      clone in interface IParagraphContent
      Specified by:
      clone in class Field
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current PageVariableSetField object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • isActive

      public boolean isActive()
      Gets the setting of the page variable. It defaults to false (inactive) at the beginning of a document. An inactive page variable is not incremented between pages. The defined values are: -false: page variable is turned off. -true: page variable is turned on.
      Returns:
      true, if is active
    • setActive

      public void setActive(boolean isActive)
      Sets the setting of the page variable. It defaults to false (inactive) at the beginning of a document. An inactive page variable is not incremented between pages. The defined values are: -false: page variable is turned off. -true: page variable is turned on.
      Parameters:
      isActive - the new active
    • getAdjustment

      public int getAdjustment()
      Gets the page adjustment.
      Returns:
      the adjustment
    • setAdjustment

      public void setAdjustment(int adjustment)
      Sets the page adjustment.
      Parameters:
      adjustment - the new adjustment
    • getValue

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

      public void setValue(String value)
      Sets the page variable.
      Parameters:
      value - the new value