|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.text.Node
pivot.wtk.text.Element
public abstract class Element
Abstract base class for elements.
TODO Add style properties.
TODO Add style class property.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pivot.collections.Sequence |
---|
Sequence.Search, Sequence.Sort, Sequence.Tree |
Constructor Summary | |
---|---|
Element()
|
|
Element(Element element,
boolean recursive)
|
Method Summary | |
---|---|
int |
add(Node node)
Adds an item to the sequence. |
void |
dumpOffsets()
|
Node |
get(int index)
Retrieves the item at the given index. |
int |
getCharacterCount()
Returns the number of characters in this node. |
Node |
getDescendantAt(int offset)
Determines the descendant node at a given offset. |
ListenerList<ElementListener> |
getElementListeners()
|
int |
getIndexAt(int offset)
Determines the index of the child node at a given offset. |
int |
getLength()
Returns the length of the sequence. |
Node |
getNodeAt(int offset)
Determines the child node at a given offset. |
Sequence<java.lang.Integer> |
getPathAt(int offset)
Determines the path of the descendant node at a given offset. |
Node |
getRange(int offset,
int characterCount)
Returns a range from the node. |
int |
indexOf(Node node)
Returns the index of an item in the sequence. |
void |
insert(Node node,
int index)
Inserts an item into the sequence at a specific index. |
void |
insertRange(Node range,
int offset)
Inserts a range into the node. |
java.util.Iterator<Node> |
iterator()
|
protected void |
rangeInserted(int offset,
int characterCount)
Called to notify a node that a range has been inserted. |
protected void |
rangeRemoved(int offset,
int characterCount)
Called to notify a node that a range has been removed. |
Sequence<Node> |
remove(int index,
int count)
Removes one or more items from the sequence. |
int |
remove(Node node)
Removes the first occurrence of the given item from the sequence. |
Node |
removeRange(int offset,
int characterCount)
Removes a range from the node. |
Node |
update(int index,
Node node)
Updates the item at the given index. |
Methods inherited from class pivot.wtk.text.Node |
---|
duplicate, getDocumentOffset, getNodeListeners, getOffset, getParent, replaceRange, setOffset, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Element()
public Element(Element element, boolean recursive)
Method Detail |
---|
public void insertRange(Node range, int offset)
Node
insertRange
in class Node
public Node removeRange(int offset, int characterCount)
Node
removeRange
in class Node
public Node getRange(int offset, int characterCount)
Node
getRange
in class Node
public int getCharacterCount()
Node
getCharacterCount
in class Node
public int add(Node node)
Sequence
add
in interface Sequence<Node>
node
- The item to be added to the sequence.
public void insert(Node node, int index)
Sequence
insert
in interface Sequence<Node>
node
- 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 Node update(int index, Node node)
Sequence
update
in interface Sequence<Node>
index
- The index of the item to update.node
- The item that will replace any existing value at the given index.
public int remove(Node node)
Sequence
remove
in interface Sequence<Node>
node
- The item to remove.
Sequence.remove(int, int)
public Sequence<Node> remove(int index, int count)
Sequence
remove
in interface Sequence<Node>
index
- The starting index to remove.count
- The number of items to remove, beginning with index.
public Node get(int index)
Sequence
get
in interface Sequence<Node>
index
- The index of the item to retrieve.public int indexOf(Node node)
Sequence
indexOf
in interface Sequence<Node>
node
- The item to locate.
public int getLength()
Sequence
getLength
in interface Sequence<Node>
public int getIndexAt(int offset)
offset
-
public Sequence<java.lang.Integer> getPathAt(int offset)
offset
-
public Node getNodeAt(int offset)
offset
-
public Node getDescendantAt(int offset)
offset
-
protected void rangeInserted(int offset, int characterCount)
Node
rangeInserted
in class Node
protected void rangeRemoved(int offset, int characterCount)
Node
rangeRemoved
in class Node
public java.util.Iterator<Node> iterator()
iterator
in interface java.lang.Iterable<Node>
public void dumpOffsets()
public ListenerList<ElementListener> getElementListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |