|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pivot.wtk.text.Node
org.apache.pivot.wtk.text.Element
org.apache.pivot.wtk.text.Block
org.apache.pivot.wtk.text.Paragraph
public class Paragraph
Element representing a paragraph.
TODO Add indent property.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence |
|---|
Sequence.Tree<T> |
| Constructor Summary | |
|---|---|
Paragraph()
|
|
Paragraph(Paragraph paragraph,
boolean recursive)
|
|
Paragraph(String text)
|
|
| Method Summary | |
|---|---|
int |
add(String text)
|
Paragraph |
duplicate(boolean recursive)
Creates a copy of this node. |
char |
getCharacterAt(int offset)
Returns the character at the given offset. |
int |
getCharacterCount()
Returns the number of characters in this node. |
Node |
getDescendantAt(int offset)
Determines the descendant node at a given offset. |
Sequence<Integer> |
getPathAt(int offset)
Determines the path of the descendant node at a given offset. |
Paragraph |
getRange(int offset,
int characterCount)
Returns a range from the node. |
void |
insert(Node node,
int index)
Inserts an item into the sequence at a specific index. |
Node |
removeRange(int offset,
int characterCount)
Removes a range from the node. |
| Methods inherited from class org.apache.pivot.wtk.text.Block |
|---|
getBlockListeners, getHorizontalAlignment, setHorizontalAlignment |
| Methods inherited from class org.apache.pivot.wtk.text.Element |
|---|
add, dumpOffsets, get, getBackgroundColor, getElementListeners, getFont, getForegroundColor, getLength, getNodeAt, indexOf, insertRange, isStrikethrough, isUnderline, iterator, rangeInserted, rangeRemoved, remove, remove, setBackgroundColor, setBackgroundColor, setFont, setFont, setForegroundColor, setForegroundColor, setStrikethrough, setUnderline, update |
| Methods inherited from class org.apache.pivot.wtk.text.Node |
|---|
getDocumentOffset, getDocumentSpan, getNodeListeners, getOffset, getParent, nodeInserted, nodesRemoved, replaceRange, setOffset, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Paragraph()
public Paragraph(String text)
public Paragraph(Paragraph paragraph,
boolean recursive)
| Method Detail |
|---|
public Node removeRange(int offset,
int characterCount)
Node
removeRange in class Element
public Paragraph getRange(int offset,
int characterCount)
Node
getRange in class Elementpublic char getCharacterAt(int offset)
Node
getCharacterAt in class Elementpublic int getCharacterCount()
Node
getCharacterCount in class Elementpublic int add(String text)
public void insert(Node node,
int index)
Sequence
insert in interface Sequence<Node>insert in class Elementnode - The item to be added to the sequence.index - The index at which the item should be inserted. Must be a value between
0 and getLength().public Sequence<Integer> getPathAt(int offset)
Element
getPathAt in class Elementpublic Node getDescendantAt(int offset)
Element
getDescendantAt in class Elementpublic Paragraph duplicate(boolean recursive)
Node
duplicate in class Element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||