org.apache.pivot.wtk.text
Class TextSpan
java.lang.Object
org.apache.pivot.wtk.text.Node
org.apache.pivot.wtk.text.Element
org.apache.pivot.wtk.text.TextSpan
- All Implemented Interfaces:
- Iterable<Node>, org.apache.pivot.collections.Sequence<Node>
- Direct Known Subclasses:
- Span
public class TextSpan
- extends Element
Element representing an inline range of styled characters.
| Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence |
org.apache.pivot.collections.Sequence.Tree<T> |
| Methods inherited from class org.apache.pivot.wtk.text.Element |
add, dumpOffsets, get, getBackgroundColor, getCharacterAt, getCharacterCount, getDescendantAt, getElementListeners, getFont, getForegroundColor, getLength, getNodeAt, getPathAt, indexOf, insertRange, isStrikethrough, isUnderline, iterator, rangeInserted, rangeRemoved, remove, remove, removeRange, setBackgroundColor, setBackgroundColor, setFont, setFont, setForegroundColor, setForegroundColor, setStrikethrough, setUnderline, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextSpan
public TextSpan()
TextSpan
public TextSpan(TextSpan span,
boolean recursive)
add
public int add(String text)
insert
public void insert(Node node,
int index)
- Specified by:
insert in interface org.apache.pivot.collections.Sequence<Node>- Overrides:
insert in class Element
duplicate
public TextSpan duplicate(boolean recursive)
- Description copied from class:
Node
- Creates a copy of this node.
- Specified by:
duplicate in class Element
getRange
public TextSpan getRange(int offset,
int characterCount)
- Description copied from class:
Node
- Returns a range from the node.
- Overrides:
getRange in class Element
- Returns:
- A node containing a copy of the node structure spanning the given range,
relative to this node.