org.odftoolkit.simple.text
Class Section

java.lang.Object
  extended by org.odftoolkit.simple.text.Section

public class Section
extends Object

This class represents section definition in text document. It provides methods to manipulate section in text document, such as getting/setting section name, moving section and so on.

Since:
0.4

Method Summary
 boolean equals(Object obj)
           
static Section getInstance(TextSectionElement element)
          Get a section instance by an object of TextSectionElement.
 String getName()
          Return the name of this section
 TextSectionElement getOdfElement()
          Return an instance of TextSectionElement which represents this section.
 Document getOwnerDocument()
          Return the ODF document which this section belongs to.
 void remove()
          Remove this section from the document.
 void setName(String name)
          Set the value of this section name
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Section getInstance(TextSectionElement element)
Get a section instance by an object of TextSectionElement.

Parameters:
element - - an object of TextSectionElement
Returns:
an instance of Section that can represent TextSectionElement

getOwnerDocument

public Document getOwnerDocument()
Return the ODF document which this section belongs to.

Returns:
- the ODF document which this section belongs to.

getName

public String getName()
Return the name of this section

Returns:
- the name of this section

setName

public void setName(String name)
Set the value of this section name

Parameters:
name - - the value of name to be set

remove

public void remove()
Remove this section from the document.

All the linked resources which are only linked to this section will be removed too.


getOdfElement

public TextSectionElement getOdfElement()
Return an instance of TextSectionElement which represents this section.

Returns:
- an instance of TextSectionElement which represents this section

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010-2011 ODF Toolkit Project. All Rights Reserved.