|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pivot.wtk.text.Node
org.apache.pivot.wtk.text.ImageNode
public class ImageNode
Node representing an image.
| Constructor Summary | |
|---|---|
ImageNode()
|
|
ImageNode(Image image)
|
|
ImageNode(ImageNode imageNode)
|
|
ImageNode(String image)
|
|
ImageNode(URL image)
|
|
| Method Summary | |
|---|---|
Node |
duplicate(boolean recursive)
Creates a copy of this node. |
char |
getCharacterAt(int offset)
Returns the character at the given offset. |
int |
getCharacterCount()
Returns the number of characters in this node. |
Image |
getImage()
|
ListenerList<ImageNodeListener> |
getImageNodeListeners()
|
Node |
getRange(int offset,
int characterCount)
Returns a range from the node. |
void |
insertRange(Node range,
int offset)
Inserts a range into the node. |
Node |
removeRange(int offset,
int span)
Removes a range from the node. |
void |
setImage(Image image)
|
void |
setImage(String imageName)
Sets the image node's icon by resource name. |
void |
setImage(URL imageURL)
Sets the image node's current image by URL. |
| Methods inherited from class org.apache.pivot.wtk.text.Node |
|---|
getDocumentOffset, getDocumentSpan, getNodeListeners, getOffset, getParent, nodeInserted, nodesRemoved, rangeInserted, rangeRemoved, replaceRange, setOffset, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImageNode()
public ImageNode(ImageNode imageNode)
public ImageNode(Image image)
public ImageNode(URL image)
public ImageNode(String image)
| Method Detail |
|---|
public Image getImage()
public void setImage(Image image)
public void setImage(URL imageURL)
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.
imageURL - The location of the image to set.public void setImage(String imageName)
imageName - The resource name of the image to set.setImage(URL)public char getCharacterAt(int offset)
Node
getCharacterAt in class Nodepublic int getCharacterCount()
Node
getCharacterCount in class Node
public void insertRange(Node range,
int offset)
Node
insertRange in class Node
public Node removeRange(int offset,
int span)
Node
removeRange in class Node
public Node getRange(int offset,
int characterCount)
Node
getRange in class Nodepublic Node duplicate(boolean recursive)
Node
duplicate in class Nodepublic ListenerList<ImageNodeListener> getImageNodeListeners()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||