Package com.independentsoft.office.odf.fields

# Class PageNumber

java.lang.Object
com.independentsoft.office.odf.fields.Field
com.independentsoft.office.odf.fields.PageNumber

All Implemented Interfaces:
  `IContentElement`, `IParagraphContent`

public class PageNumber extends Field
Displays the current page number.

- ## Field Summary

  ### Fields inherited from class com.independentsoft.office.odf.fields.Field

  `parent`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PageNumber()`
  Initializes a new instance of the PageNumber class.
  `PageNumber​(InternalXMLStreamReader reader)`
  Instantiates a new page number.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PageNumber`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `int`
  `getAdjustment()`
  Specifies an adjustment of the value of a page number field, in order to display of page numbers of following or preceding pages.
  `List<IContentElement>`
  `getContentElements()`
  Returns all content elements.
  `String`
  `getPageContinuation()`
  Gets the page continuation.
  `IContentElement`
  `getParent()`
  Returns the parent content element.
  `SelectPage`
  `getSelectPage()`
  Specifies whether to display or not the number of a previous or following page rather than the number of the current page.
  `String`
  `getStyle()`
  Gets the name of a data style.
  `String`
  `getValue()`
  Gets the page number.
  `boolean`
  `isFixed()`
  Specifies whether the value of a field element is fixed.
  `void`
  `setAdjustment​(int adjustment)`
  Specifies an adjustment of the value of a page number field, in order to display of page numbers of following or preceding pages.
  `void`
  `setFixed​(boolean isFixed)`
  Specifies whether the value of a field element is fixed.
  `void`
  `setPageContinuation​(String pageContinuation)`
  Sets the page continuation.
  `void`
  `setParent​(IContentElement parent)`
  Sets the parent content element.
  `void`
  `setSelectPage​(SelectPage selectPage)`
  Specifies whether to display or not the number of a previous or following page rather than the number of the current page.
  `void`
  `setStyle​(String style)`
  Sets the name of a data style.
  `void`
  `setValue​(String value)`
  Sets the page number.
  `String`
  `toString()`
  Converts the value of the current PageNumber object to its equivalent string representation.

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### PageNumber

    public PageNumber()
    Initializes a new instance of the PageNumber class.

  - ### PageNumber

    public PageNumber​(InternalXMLStreamReader reader) throws XMLStreamException
    Instantiates a new page number.
    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 PageNumber 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 PageNumber object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getStyle

    public String getStyle()
    Gets the name of a data style.
    Returns:
      the style

  - ### setStyle

    public void setStyle​(String style)
    Sets the name of a data style.
    Parameters:
      `style` - the new style

  - ### getSelectPage

    public SelectPage getSelectPage()
    Specifies whether to display or not the number of a previous or following page rather than the number of the current page.
    Returns:
      the select page

  - ### setSelectPage

    public void setSelectPage​(SelectPage selectPage)
    Specifies whether to display or not the number of a previous or following page rather than the number of the current page.
    Parameters:
      `selectPage` - the new select page

  - ### getAdjustment

    public int getAdjustment()
    Specifies an adjustment of the value of a page number field, in order to display of page numbers of following or preceding pages. The specified value is added to the current page number. If a page with the resulting page number does not exist, no number is displayed.
    Returns:
      the adjustment

  - ### setAdjustment

    public void setAdjustment​(int adjustment)
    Specifies an adjustment of the value of a page number field, in order to display of page numbers of following or preceding pages. The specified value is added to the current page number. If a page with the resulting page number does not exist, no number is displayed.
    Parameters:
      `adjustment` - the new adjustment

  - ### isFixed

    public boolean isFixed()
    Specifies whether the value of a field element is fixed. The defined values are: - false: value of field element may be replaced with a new value in future edits. - true: value of field element shall be preserved in future edits.
    Returns:
      true, if is fixed

  - ### setFixed

    public void setFixed​(boolean isFixed)
    Specifies whether the value of a field element is fixed. The defined values are: - false: value of field element may be replaced with a new value in future edits. - true: value of field element shall be preserved in future edits.
    Parameters:
      `isFixed` - the new fixed

  - ### getValue

    public String getValue()
    Gets the page number.
    Returns:
      the value

  - ### setValue

    public void setValue​(String value)
    Sets the page number.
    Parameters:
      `value` - the new value

  - ### getPageContinuation

    public String getPageContinuation()
    Gets the page continuation.
    Returns:
      the page continuation

  - ### setPageContinuation

    public void setPageContinuation​(String pageContinuation)
    Sets the page continuation.
    Parameters:
      `pageContinuation` - the new page continuation