Package org.apache.pivot.wtk.text
Class ComponentNode
- java.lang.Object
 - 
- org.apache.pivot.wtk.text.Node
 - 
- org.apache.pivot.wtk.text.ComponentNode
 
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ComponentNode()ComponentNode(Component component)ComponentNode(ComponentNode componentNode) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Nodeduplicate(boolean recursive)Creates a copy of this node.chargetCharacterAt(int offset)intgetCharacterCount()java.lang.CharSequencegetCharacters()java.lang.CharSequencegetCharacters(int start, int end)java.lang.CharSequencegetCharacters(CharSpan charSpan)java.lang.CharSequencegetCharacters(Component comp)java.lang.CharSequencegetCharacters(Span range)ComponentgetComponent()ListenerList<ComponentNodeListener>getComponentNodeListeners()NodegetRange(int offset, int characterCount)Returns a range from the node.java.lang.StringgetSubstring(int start, int end)java.lang.StringgetSubstring(CharSpan charSpan)java.lang.StringgetSubstring(Span range)java.lang.StringgetText()voidinsertRange(Node range, int offset)Inserts a range into the node.NoderemoveRange(int offset, int span)Removes a range from the node.voidsetComponent(Component component)- 
Methods inherited from class org.apache.pivot.wtk.text.Node
getDocumentOffset, getDocumentSpan, getNodeListeners, getOffset, getParagraph, getParent, getUserData, nodeInserted, nodesRemoved, rangeInserted, rangeRemoved, replaceRange, setOffset, setParent, setUserData 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
ComponentNode
public ComponentNode()
 
- 
ComponentNode
public ComponentNode(ComponentNode componentNode)
 
- 
ComponentNode
public ComponentNode(Component component)
 
 - 
 
- 
Method Detail
- 
getComponent
public Component getComponent()
 
- 
setComponent
public void setComponent(Component component)
 
- 
getText
public java.lang.String getText()
 
- 
getSubstring
public java.lang.String getSubstring(Span range)
 
- 
getSubstring
public java.lang.String getSubstring(int start, int end) 
- 
getSubstring
public java.lang.String getSubstring(CharSpan charSpan)
 
- 
getCharacters
public java.lang.CharSequence getCharacters(Component comp)
 
- 
getCharacters
public java.lang.CharSequence getCharacters()
- Specified by:
 getCharactersin classNode- Returns:
 - The character sequence in this node.
 
 
- 
getCharacters
public java.lang.CharSequence getCharacters(Span range)
 
- 
getCharacters
public java.lang.CharSequence getCharacters(int start, int end) 
- 
getCharacters
public java.lang.CharSequence getCharacters(CharSpan charSpan)
 
- 
getCharacterAt
public char getCharacterAt(int offset)
- Specified by:
 getCharacterAtin classNode- Parameters:
 offset- Offset relative to this node.- Returns:
 - The character at the given offset.
 
 
- 
getCharacterCount
public int getCharacterCount()
- Specified by:
 getCharacterCountin classNode- Returns:
 - The number of characters in this node.
 
 
- 
insertRange
@UnsupportedOperation public void insertRange(Node range, int offset)
Description copied from class:NodeInserts a range into the node. Note that the contents of the range, rather than the range itself, is added to the node.- Specified by:
 insertRangein classNode- Parameters:
 range- The node containing the text to insert.offset- Offset relative to this node.
 
- 
removeRange
@UnsupportedOperation public Node removeRange(int offset, int span)
Description copied from class:NodeRemoves a range from the node.- Specified by:
 removeRangein classNode- Parameters:
 offset- Offset relative to this node.span- Count of characters to remove.- Returns:
 - The removed range. This will be a copy of the node structure relative to this node.
 
 
- 
getRange
public Node getRange(int offset, int characterCount)
Description copied from class:NodeReturns a range from the node. 
- 
duplicate
public Node duplicate(boolean recursive)
Description copied from class:NodeCreates a copy of this node. 
- 
getComponentNodeListeners
public ListenerList<ComponentNodeListener> getComponentNodeListeners()
 
 - 
 
 -