Class PageNumber
java.lang.Object
com.independentsoft.office.odf.fields.Field
com.independentsoft.office.odf.fields.PageNumber
- All Implemented Interfaces:
IContentElement,IParagraphContent
Displays the current page number.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the PageNumber class.PageNumber(InternalXMLStreamReader reader)Instantiates a new page number. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.intSpecifies an adjustment of the value of a page number field, in order to display of page numbers of following or preceding pages.Returns all content elements.Gets the page continuation.Returns the parent content element.Specifies whether to display or not the number of a previous or following page rather than the number of the current page.getStyle()Gets the name of a data style.getValue()Gets the page number.booleanisFixed()Specifies whether the value of a field element is fixed.voidsetAdjustment(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.voidsetFixed(boolean isFixed)Specifies whether the value of a field element is fixed.voidsetPageContinuation(String pageContinuation)Sets the page continuation.voidsetParent(IContentElement parent)Sets the parent content element.voidsetSelectPage(SelectPage selectPage)Specifies whether to display or not the number of a previous or following page rather than the number of the current page.voidSets the name of a data style.voidSets the page number.toString()Converts the value of the current PageNumber object to its equivalent string representation.
-
Constructor Details
-
PageNumber
public PageNumber()Initializes a new instance of the PageNumber class. -
PageNumber
Instantiates a new page number.- Parameters:
reader- the reader- Throws:
XMLStreamException- the xML stream exception
-
-
Method Details
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin interfaceIContentElement- Specified by:
getContentElementsin classField- Returns:
- A collection of content elements.
-
getParent
Returns the parent content element.- Specified by:
getParentin interfaceIContentElement- Overrides:
getParentin classField- Returns:
- the parent
-
setParent
Sets the parent content element.- Specified by:
setParentin interfaceIContentElement- Overrides:
setParentin classField- Parameters:
parent- the new parent
-
clone
Creates a new object that is a deep copy of the current instance.- Specified by:
clonein interfaceIContentElement- Specified by:
clonein interfaceIParagraphContent- Specified by:
clonein classField- Returns:
- A new object that is a copy of this instance.
-
toString
Converts the value of the current PageNumber object to its equivalent string representation. -
getStyle
Gets the name of a data style.- Returns:
- the style
-
setStyle
Sets the name of a data style.- Parameters:
style- the new style
-
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
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
Gets the page number.- Returns:
- the value
-
setValue
Sets the page number.- Parameters:
value- the new value
-
getPageContinuation
Gets the page continuation.- Returns:
- the page continuation
-
setPageContinuation
Sets the page continuation.- Parameters:
pageContinuation- the new page continuation
-