Class Chapter
java.lang.Object
com.independentsoft.office.odf.fields.Field
com.independentsoft.office.odf.fields.Chapter
- All Implemented Interfaces:
IContentElement,IParagraphContent
Represents a field that displays one of the following:
- The name of the current chapter.
- The number of the current chapter.
- Both the name and number of the current chapter.
If this element is placed inside a header or footer, it displays the current chapter name or number on every page.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionChapter()Initializes a new instance of the Chapter class.Chapter(InternalXMLStreamReader reader)Instantiates a new chapter. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Returns all content elements.Gets the information that a chapter field should display.intGets the outline level.Returns the parent content element.getValue()Gets the chapter.voidsetDisplayType(ChapterDisplayType displayType)Sets the information that a chapter field should display.voidsetOutlineLevel(int outlineLevel)Sets the outline level.voidsetParent(IContentElement parent)Sets the parent content element.voidSets the chapter.toString()Converts the value of the current Chapter object to its equivalent string representation.
-
Constructor Details
-
Chapter
public Chapter()Initializes a new instance of the Chapter class. -
Chapter
Instantiates a new chapter.- 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 Chapter object to its equivalent string representation. -
getDisplayType
Gets the information that a chapter field should display.- Returns:
- the display type
-
setDisplayType
Sets the information that a chapter field should display.- Parameters:
displayType- the new display type
-
getOutlineLevel
public int getOutlineLevel()Gets the outline level.- Returns:
- the outline level
-
setOutlineLevel
public void setOutlineLevel(int outlineLevel)Sets the outline level.- Parameters:
outlineLevel- the new outline level
-
getValue
Gets the chapter.- Returns:
- the value
-
setValue
Sets the chapter.- Parameters:
value- the new value
-