org.apache.pivot.wtk.content
Class ListItem

java.lang.Object
  extended by org.apache.pivot.wtk.content.ListItem

public class ListItem
extends Object

Default list item implementation.


Constructor Summary
ListItem()
           
ListItem(Image icon)
           
ListItem(Image icon, String text)
           
ListItem(String text)
           
 
Method Summary
 Image getIcon()
           
 String getText()
           
 Object getUserData()
           
 void setIcon(Image icon)
           
 void setIcon(String iconName)
          Sets the list item's icon by resource name.
 void setIcon(URL iconURL)
          Sets the list item's icon by URL.
 void setText(String text)
           
 void setUserData(Object userData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListItem

public ListItem()

ListItem

public ListItem(Image icon)

ListItem

public ListItem(String text)

ListItem

public ListItem(Image icon,
                String text)
Method Detail

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)