pivot.wtk.text
Class Span

java.lang.Object
  extended by pivot.wtk.text.Node
      extended by pivot.wtk.text.Element
          extended by pivot.wtk.text.Span
All Implemented Interfaces:
Iterable<Node>, Sequence<Node>

public class Span
extends Element

Element representing an inline range of styled characters.

TODO Add text alignment enum/property.

Author:
gbrown

Nested Class Summary
 
Nested classes/interfaces inherited from interface pivot.collections.Sequence
Sequence.Search, Sequence.Sort, Sequence.Tree
 
Constructor Summary
Span()
           
Span(Span span, boolean recursive)
           
 
Method Summary
 Node duplicate(boolean recursive)
          Creates a copy of this node.
 void insert(Node node, int index)
          Inserts an item into the sequence at a specific index.
 
Methods inherited from class pivot.wtk.text.Element
add, dumpOffsets, get, getCharacterCount, getDescendantAt, getElementListeners, getIndexAt, getLength, getNodeAt, getPathAt, getRange, indexOf, insertRange, iterator, rangeInserted, rangeRemoved, remove, remove, removeRange, update
 
Methods inherited from class pivot.wtk.text.Node
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

Span

public Span()

Span

public Span(Span span,
            boolean recursive)
Method Detail

insert

public void insert(Node node,
                   int index)
Description copied from interface: Sequence
Inserts an item into the sequence at a specific index.

Specified by:
insert in interface Sequence<Node>
Overrides:
insert in class Element
Parameters:
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().

duplicate

public Node duplicate(boolean recursive)
Description copied from class: Node
Creates a copy of this node.

Specified by:
duplicate in class Node