org.odftoolkit.simple.draw
Class AbstractTextboxContainer

java.lang.Object
  extended by org.odftoolkit.simple.draw.AbstractFrameContainer
      extended by org.odftoolkit.simple.draw.AbstractTextboxContainer
All Implemented Interfaces:
FrameContainer, TextboxContainer

public abstract class AbstractTextboxContainer
extends AbstractFrameContainer
implements TextboxContainer

AbstractTextboxContainer is an abstract implementation of the TextboxContainer interface, with a default implementation for every method defined in TextboxContainer, except getFrameContainerElement(). A subclass must implement the abstract method getFrameContainerElement().

Since:
0.5

Constructor Summary
AbstractTextboxContainer()
           
 
Method Summary
 Textbox addTextbox()
          Add a text box
 Textbox addTextbox(FrameRectangle position)
          Add a text box with a specific size at a specific position
 Textbox getTextboxByName(String name)
          Return a text box whose name is a given value.
 List<Textbox> getTextboxByUsage(PresentationDocument.PresentationClass usage)
          This method is only useful for presentation slides.
 Iterator<Textbox> getTextboxIterator()
          Return an Iterator of the text objects in this container.
 boolean removeTextbox(Textbox box)
          Remove the text box.
 
Methods inherited from class org.odftoolkit.simple.draw.AbstractFrameContainer
addFrame, addFrame, getFrameByName, getFrameByPresentationclass, getFrameContainerElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.odftoolkit.simple.draw.FrameContainer
getFrameContainerElement
 

Constructor Detail

AbstractTextboxContainer

public AbstractTextboxContainer()
Method Detail

addTextbox

public Textbox addTextbox()
Description copied from interface: TextboxContainer
Add a text box

Specified by:
addTextbox in interface TextboxContainer
Returns:
the object of text box

removeTextbox

public boolean removeTextbox(Textbox box)
Remove the text box.

Specified by:
removeTextbox in interface TextboxContainer
Parameters:
box - - the text box to be removed
Returns:
true if the text box is removed successfully, false if errors happen.

getTextboxIterator

public Iterator<Textbox> getTextboxIterator()
Description copied from interface: TextboxContainer
Return an Iterator of the text objects in this container.

Specified by:
getTextboxIterator in interface TextboxContainer
Returns:
an Iterator of the text objects in this container

addTextbox

public Textbox addTextbox(FrameRectangle position)
Description copied from interface: TextboxContainer
Add a text box with a specific size at a specific position

Specified by:
addTextbox in interface TextboxContainer
Parameters:
position - - the rectangle (position and size) of this text box
Returns:
the object of text box

getTextboxByName

public Textbox getTextboxByName(String name)
Return a text box whose name is a given value.

Specified by:
getTextboxByName in interface TextboxContainer
Parameters:
name - - the name of the text box
Returns:
a text box whose name is a given value
See Also:
AbstractFrameContainer.getFrameByName(String)

getTextboxByUsage

public List<Textbox> getTextboxByUsage(PresentationDocument.PresentationClass usage)
This method is only useful for presentation slides.

This method will return a list of text boxs by the usage defined in presentation slides.

Specified by:
getTextboxByUsage in interface TextboxContainer
Parameters:
usage - - the usage description
Returns:
a list of text box Null will be returned if the owner document is not a presentation
See Also:
AbstractFrameContainer.getFrameByPresentationclass(PresentationDocument.PresentationClass), PresentationDocument.PresentationClass


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