org.odftoolkit.simple.presentation
Class Notes

java.lang.Object
  extended by org.odftoolkit.simple.Component
      extended by org.odftoolkit.simple.presentation.Notes
All Implemented Interfaces:
ListContainer

public class Notes
extends Component
implements ListContainer

Notes represents the presentation notes feature of the ODF document. Notes provides methods to creates notes, add content, add list, etc.


Nested Class Summary
static class Notes.NotesBuilder
          This is a tool class which supplies all of the notes creation detail.
 
Method Summary
 List addList()
          Add a new List to this container.
 List addList(ListDecorator decorator)
          Add a List with specified ListDecorator to this container.
 void addText(String text)
          insert some text to the notes page
 void clearList()
          Remove all Lists from this container.
static Notes getInstance(PresentationNotesElement noteElement)
          Get a presentation notes page instance by an instance of PresentationNotesElement.
 OdfElement getListContainerElement()
          Get the ODF element which can have as child element directly according to ODF specification.
 Iterator<List> getListIterator()
          Return an Iterator of the Lists in this ListContainer.
 PresentationNotesElement getOdfElement()
          Return an instance of PresentationNotesElement which represents presentation notes page feature.
 boolean removeList(List list)
          Remove the existing List from this container.
 
Methods inherited from class org.odftoolkit.simple.Component
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Notes getInstance(PresentationNotesElement noteElement)
Get a presentation notes page instance by an instance of PresentationNotesElement.

Parameters:
noteElement - an instance of PresentationNotesElement
Returns:
an instance of Notes that can represent PresentationNotesElement

getOdfElement

public PresentationNotesElement getOdfElement()
Return an instance of PresentationNotesElement which represents presentation notes page feature.

Specified by:
getOdfElement in class Component
Returns:
an instance of PresentationNotesElement

addText

public void addText(String text)
insert some text to the notes page

Parameters:
text - the text that need to insert in the notes page

getListContainerElement

public OdfElement getListContainerElement()
Description copied from interface: ListContainer
Get the ODF element which can have as child element directly according to ODF specification. This Element will help to find the position to insert a new List. For example, element is usable with element, so TextDocument will return OfficeTextElement. While Presentation Notes is an indirectly ListContainer, which holds List with the help of its grand-child element , so for Notes, DrawTextBoxElement should be return.

Specified by:
getListContainerElement in interface ListContainer
Returns:
container element which can hold .

addList

public List addList()
Description copied from interface: ListContainer
Add a new List to this container.

Specified by:
addList in interface ListContainer
Returns:
added list.

addList

public List addList(ListDecorator decorator)
Description copied from interface: ListContainer
Add a List with specified ListDecorator to this container.

Specified by:
addList in interface ListContainer
Parameters:
decorator - the specified ListDecorator
Returns:
added list.

clearList

public void clearList()
Description copied from interface: ListContainer
Remove all Lists from this container.

Specified by:
clearList in interface ListContainer

getListIterator

public Iterator<List> getListIterator()
Description copied from interface: ListContainer
Return an Iterator of the Lists in this ListContainer. The Lists are iterated in the same order that they occur in the ListContainer.

Specified by:
getListIterator in interface ListContainer
Returns:
an Iterator of the Lists in this ListContainer
See Also:
Iterator

removeList

public boolean removeList(List list)
Description copied from interface: ListContainer
Remove the existing List from this container.

Specified by:
removeList in interface ListContainer
Returns:
true, if the container contains this List.


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.