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()
           
 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)
           
 
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.

Note: Using this signature will cause an entry to be added in the application context's resource cache if one does not already exist.

Parameters:
iconURL - The location of the icon to set.

setIcon

public void setIcon(String iconName)
Sets the list item's icon by resource name.

Note: Using this signature will cause an entry to be added in the application context's resource cache if one does not already exist.

Parameters:
iconName - The resource name of the icon to set.

getText

public String getText()

setText

public void setText(String text)