com.tensegrity.graphics.text
Class TextSection

java.lang.Object
  extended bycom.tensegrity.graphics.text.AbstractElement
      extended bycom.tensegrity.graphics.text.TextSection
All Implemented Interfaces:
Element

public class TextSection
extends AbstractElement

A container for titles and paragraphs.

Version:
$Id: TextSection.java,v 1.4 2003/04/22 10:17:26 GillesIachelini Exp $
Author:
Gilles Iachelini

Nested Class Summary
 
Nested classes inherited from class com.tensegrity.graphics.text.Element
Element.ElementIterator
 
Constructor Summary
TextSection()
          Constructor for TextSection.
 
Method Summary
 void addElement(Element element)
          Method addElement adds an element to this Element.
 int getCharacterCount()
          Method getElementCountEx extends the default getElementCount returns the number of all TextElements contained in this document.
 java.util.List getCharacters()
          Method getCharacters should return a List with all CharacterElements of this Element implementation.
 java.lang.String getHtmlText()
          Returns a html document containing all paragraphs and titles of this document.
 java.util.List getParagraphs()
          Method getParagraphs returns a list with all Paragraphs of this TextSection.
 Title getTitle()
          Method getTitle returns the first found title from the elements list.
 java.lang.String toString()
           
 
Methods inherited from class com.tensegrity.graphics.text.AbstractElement
getElement, getElementCount, getFontFormat, getText, isEmpty, iterator, remove, removeTextElements, setFontFormat, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextSection

public TextSection()
Constructor for TextSection.

Method Detail

addElement

public void addElement(Element element)
Description copied from interface: Element
Method addElement adds an element to this Element.

Specified by:
addElement in interface Element
Overrides:
addElement in class AbstractElement
See Also:
Element.addElement(Element)

getHtmlText

public java.lang.String getHtmlText()
Returns a html document containing all paragraphs and titles of this document.

Specified by:
getHtmlText in interface Element
Overrides:
getHtmlText in class AbstractElement
See Also:
Element.getHtmlText()

getCharacterCount

public int getCharacterCount()
Method getElementCountEx extends the default getElementCount returns the number of all TextElements contained in this document. According to getElementEx(int), which lets you get a single CharacterElement from the elements.

Returns:
int

getTitle

public Title getTitle()
Method getTitle returns the first found title from the elements list.

Returns:
Title the first occurence of a Title instance within the element list.

getParagraphs

public java.util.List getParagraphs()
Method getParagraphs returns a list with all Paragraphs of this TextSection.

Returns:
List an ArrayList with all Paragraphs.

toString

public java.lang.String toString()
See Also:
Object.toString()

getCharacters

public java.util.List getCharacters()
Description copied from class: AbstractElement
Method getCharacters should return a List with all CharacterElements of this Element implementation.

Specified by:
getCharacters in class AbstractElement
Returns:
List with all CharacterElements within this Element and all of its subelements.
See Also:
AbstractElement.getCharacters()


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.