Package org.apache.pivot.wtk.text
Class ImageNode
- java.lang.Object
- 
- org.apache.pivot.wtk.text.Node
- 
- org.apache.pivot.wtk.text.ImageNode
 
 
- 
- 
Method SummaryAll 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()ImagegetImage()ListenerList<ImageNodeListener>getImageNodeListeners()NodegetRange(int offset, int characterCount)Returns a range from the node.voidinsertRange(Node range, int offset)Inserts a range into the node.NoderemoveRange(int offset, int span)Removes a range from the node.voidsetImage(java.lang.String imageName)Sets the image node's icon by resource name.voidsetImage(java.net.URL imageURL)Sets the image node's current image by URL.voidsetImage(Image image)- 
Methods inherited from class org.apache.pivot.wtk.text.NodegetDocumentOffset, getDocumentSpan, getNodeListeners, getOffset, getParagraph, getParent, getUserData, nodeInserted, nodesRemoved, rangeInserted, rangeRemoved, replaceRange, setOffset, setParent, setUserData
 
- 
 
- 
- 
- 
Method Detail- 
getImagepublic Image getImage() 
 - 
setImagepublic void setImage(Image image) 
 - 
setImagepublic void setImage(java.net.URL imageURL) Sets the image node's current image by URL.If the icon already exists in the application context resource cache, the cached value will be used. Otherwise, the icon will be loaded synchronously and added to the cache. - Parameters:
- imageURL- The location of the image to set.
 
 - 
setImagepublic void setImage(java.lang.String imageName) Sets the image node's icon by resource name.- Parameters:
- imageName- The resource name of the image to set.
- See Also:
- setImage(URL),- ImageUtils.findByName(String,String)
 
 - 
getCharacterspublic java.lang.CharSequence getCharacters() - Specified by:
- getCharactersin class- Node
- Returns:
- The character sequence in this node.
 
 - 
getCharacterAtpublic char getCharacterAt(int offset) - Specified by:
- getCharacterAtin class- Node
- Parameters:
- offset- Offset relative to this node.
- Returns:
- The character at the given offset.
 
 - 
getCharacterCountpublic int getCharacterCount() - Specified by:
- getCharacterCountin class- Node
- 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 class- Node
- 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 class- Node
- 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.
 
 - 
getRangepublic Node getRange(int offset, int characterCount) Description copied from class:NodeReturns a range from the node.
 - 
duplicatepublic Node duplicate(boolean recursive) Description copied from class:NodeCreates a copy of this node.
 - 
getImageNodeListenerspublic ListenerList<ImageNodeListener> getImageNodeListeners() 
 
- 
 
-