org.apache.pivot.wtk.content
Class ListItem
java.lang.Object
org.apache.pivot.wtk.content.ListItem
public class ListItem
- extends Object
Default list item implementation.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListItem
public ListItem()
ListItem
public ListItem(Image icon)
ListItem
public ListItem(String text)
ListItem
public ListItem(Image icon,
String text)
getIcon
public Image getIcon()
setIcon
public void setIcon(Image icon)
setIcon
public void setIcon(URL iconURL)
- Sets the list item's icon 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:
iconURL
- The location of the icon to set.
setIcon
public void setIcon(String iconName)
- Sets the list item's icon by resource name.
- Parameters:
iconName
- The resource name of the icon to set.- See Also:
setIcon(URL)
getText
public String getText()
setText
public void setText(String text)
getUserData
public Object getUserData()
setUserData
public void setUserData(Object userData)