Package com.independentsoft.office.odf
Class TableOfContents
java.lang.Object
com.independentsoft.office.odf.TableOfContents
- All Implemented Interfaces:
ICellContent,IContentElement,IIndexContent,ITextContent,IHeaderFooterContent
Represents a table of contents for a document.
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the MasterPage class.TableOfContents(InternalXMLStreamReader reader)Instantiates a new table of contents. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Returns all content elements.Gets the index.getName()Gets the name.Returns the parent content element.Specifies that an authorization is required for removing the protection of a section.Specifies how a table of contents is generated.getStyle()Gets the style.booleanSpecifies whether a section is protected.voidsetIndexBody(IndexBody indexBody)Sets the index.voidSets the name.voidsetParent(IContentElement parent)Sets the parent content element.voidsetProtected(boolean isProtected)Specifies whether a section is protected.voidsetProtectionKey(String protectionKey)Specifies that an authorization is required for removing the protection of a section.voidsetSource(TableOfContentsSource source)Specifies how a table of contents is generated.voidSets the style.toString()Converts the value of the current TableOfContents object to its equivalent string representation.
-
Constructor Details
-
TableOfContents
public TableOfContents()Initializes a new instance of the MasterPage class. -
TableOfContents
Instantiates a new table of contents.- Parameters:
reader- the reader- Throws:
XMLStreamException- the xML stream exception
-
-
Method Details
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin interfaceIContentElement- Returns:
- A collection of content elements.
-
getParent
Returns the parent content element.- Specified by:
getParentin interfaceIContentElement- Returns:
- the parent
-
setParent
Sets the parent content element.- Specified by:
setParentin interfaceIContentElement- Parameters:
parent- the new parent
-
clone
Creates a new object that is a deep copy of the current instance.- Specified by:
clonein interfaceICellContent- Specified by:
clonein interfaceIContentElement- Specified by:
clonein interfaceIHeaderFooterContent- Specified by:
clonein interfaceIIndexContent- Specified by:
clonein interfaceITextContent- Overrides:
clonein classObject- Returns:
- A new object that is a copy of this instance.
-
toString
Converts the value of the current TableOfContents object to its equivalent string representation. -
getSource
Specifies how a table of contents is generated.- Returns:
- the source
-
setSource
Specifies how a table of contents is generated.- Parameters:
source- the new source
-
getIndexBody
Gets the index.- Returns:
- the index body
-
setIndexBody
Sets the index.- Parameters:
indexBody- the new index body
-
getName
Gets the name.- Returns:
- the name
-
setName
Sets the name.- Parameters:
name- the new name
-
getStyle
Gets the style.- Returns:
- the style
-
setStyle
Sets the style.- Parameters:
style- the new style
-
isProtected
public boolean isProtected()Specifies whether a section is protected.- Returns:
- true, if is protected
-
setProtected
public void setProtected(boolean isProtected)Specifies whether a section is protected.- Parameters:
isProtected- the new protected
-
getProtectionKey
Specifies that an authorization is required for removing the protection of a section.- Returns:
- the protection key
-
setProtectionKey
Specifies that an authorization is required for removing the protection of a section.- Parameters:
protectionKey- the new protection key
-