Package com.independentsoft.office.odf
Class Section
java.lang.Object
com.independentsoft.office.odf.Section
- All Implemented Interfaces:
ICellContent,IContentElement,IIndexContent,ITextContent,IHeaderFooterContent
Represents a named region of content in a document.
-
Constructor Summary
ConstructorsConstructorDescriptionSection()Initializes a new instance of the Section class.Section(InternalXMLStreamReader reader)Instantiates a new section. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a Change object to the content.voidAdds a ChangeEnd object to the content.voidadd(ChangeStart changeStart)Adds a ChangeStart object to the content.voidAdds a Shape object to the content.voidAdds a Heading object to the content.voidadd(IndexOfIllustrations index)Adds an IndexOfIllustrations object to the content.voidadd(ITextContent textContent)Adds an ITextContent object to the content.voidAdds a List object to the content.voidAdds a Paragraph object to the content.voidAdds a Section object to the content.voidAdds a Table object to the content.voidadd(TableOfContents toc)Adds a TableOfContents object to the content.clone()Creates a new object that is a deep copy of the current instance.Gets the condition under which a section is hidden.Contains a collection of ITextContent objects.Returns all content elements.Specifies whether the section is hidden.getName()Gets the unique name.Returns the parent content element.Specifies that an authorization is required for removing the protection of the section.getStyle()Gets the section family style for a section.booleanSpecifies whether a section is protected.voidsetCondition(String condition)Sets the condition under which a section is hidden.voidsetDisplay(SectionDisplayType display)Specifies whether the section is hidden.voidSets the unique 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 the section.voidSets the section family style.toString()Converts the value of the current Section object to its equivalent string representation.
-
Constructor Details
-
Section
public Section()Initializes a new instance of the Section class. -
Section
Instantiates a new section.- Parameters:
reader- the reader- Throws:
XMLStreamException- the xML stream exception
-
-
Method Details
-
add
Adds a Change object to the content.- Parameters:
change- the change
-
add
Adds a ChangeEnd object to the content.- Parameters:
changeEnd- the change end
-
add
Adds a ChangeStart object to the content.- Parameters:
changeStart- the change start
-
add
Adds a Shape object to the content.- Parameters:
shape- the shape
-
add
Adds an IndexOfIllustrations object to the content.- Parameters:
index- the index
-
add
Adds a Heading object to the content.- Parameters:
heading- the heading
-
add
Adds a List object to the content.- Parameters:
list- the list
-
add
Adds a Paragraph object to the content.- Parameters:
paragraph- the paragraph
-
add
Adds a Section object to the content.- Parameters:
section- the section
-
add
Adds a Table object to the content.- Parameters:
table- the table
-
add
Adds a TableOfContents object to the content.- Parameters:
toc- the toc
-
add
Adds an ITextContent object to the content.- Parameters:
textContent- the text content
-
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 Section object to its equivalent string representation. -
getContent
Contains a collection of ITextContent objects.- Returns:
- the content
-
getName
Gets the unique name.- Returns:
- the name
-
setName
Sets the unique name.- Parameters:
name- the new name
-
getProtectionKey
Specifies that an authorization is required for removing the protection of the section.- Returns:
- the protection key
-
setProtectionKey
Specifies that an authorization is required for removing the protection of the section.- Parameters:
protectionKey- the new protection key
-
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
-
getStyle
Gets the section family style for a section.- Returns:
- the style
-
setStyle
Sets the section family style.- Parameters:
style- the new style
-
getDisplay
Specifies whether the section is hidden.- Returns:
- the display
-
setDisplay
Specifies whether the section is hidden.- Parameters:
display- the new display
-
getCondition
Gets the condition under which a section is hidden. The condition is encoded as a string.- Returns:
- the condition
-
setCondition
Sets the condition under which a section is hidden. The condition is encoded as a string.- Parameters:
condition- the new condition
-