|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
An Element represents a structural piece of a document. An
Element implementation is self-enclosing, iterable and can be formatted. This
interface also provides the basic implementation of such an Iterator
(@see ElementIterator).
| Nested Class Summary | |
static class |
Element.ElementIterator
The iterator implementation for TextElements. |
| Method Summary | |
void |
addElement(Element element)
Method addElement adds an element to this Element. |
Element |
getElement(int index)
Method getElement returns the Element at position index. |
int |
getElementCount()
Method getElementCount returns the number of elements contained by this Element as integer. |
FontFormat |
getFontFormat()
Method getFontFormat returns the FontFormat instance associated with this element. |
java.lang.String |
getHtmlText()
Method getHtmlText returns this elements text as html. |
java.lang.String |
getText()
Method getText returns the text associated with this Element as String. |
boolean |
isEmpty()
Method isEmpty returns true, if this Element doesn't contain any TextElements. |
java.util.Iterator |
iterator()
Method iterator returns an iterator which allows to iterate
through all elements of this Element. |
void |
remove(int index)
Method remove removes the element at position index. |
void |
setFontFormat(FontFormat fontFormat)
Method setFontFormat sets the FontFormat of this element. |
void |
setText(java.lang.String text)
Method setText sets the text for this Element. |
| Method Detail |
public void addElement(Element element)
element - the new Element to add.public Element getElement(int index)
index.
within this Element.
index - the index of the element.
index.public int getElementCount()
public java.util.Iterator iterator()
iterator returns an iterator which allows to iterate
through all elements of this Element.
public FontFormat getFontFormat()
public java.lang.String getHtmlText()
public java.lang.String getText()
String.
public boolean isEmpty()
return getElementCount() == 0;
public void remove(int index)
index.
index - the position of the element to remove.public void setFontFormat(FontFormat fontFormat)
fontFormat - The FontFormat instance to be set.public void setText(java.lang.String text)
text - the text of this Element as String.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||