Class PageVariableSetField
java.lang.Object
com.independentsoft.office.odf.fields.Field
com.independentsoft.office.odf.fields.PageVariableSetField
- All Implemented Interfaces:
IContentElement,IParagraphContent
Used to set a page variable.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the PageVariableSetField class.Instantiates a new page variable set field. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.intGets the page adjustment.Returns all content elements.Returns the parent content element.getValue()Gets the page variable.booleanisActive()Gets the setting of the page variable.voidsetActive(boolean isActive)Sets the setting of the page variable.voidsetAdjustment(int adjustment)Sets the page adjustment.voidsetParent(IContentElement parent)Sets the parent content element.voidSets the page variable.toString()Converts the value of the current PageVariableSetField object to its equivalent string representation.
-
Constructor Details
-
PageVariableSetField
public PageVariableSetField()Initializes a new instance of the PageVariableSetField class. -
PageVariableSetField
Instantiates a new page variable set field.- 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 PageVariableSetField object to its equivalent string representation. -
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
Gets the page variable.- Returns:
- the value
-
setValue
Sets the page variable.- Parameters:
value- the new value
-