All Packages Class Hierarchy This Package Previous Next Index
Class tropo.awt.TRChoice
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Choice
|
+----tropo.awt.TRChoice
- public class TRChoice
- extends Choice
A simple extension to the Choice widget that so that you can associate
user data with each item in the list.
-
TRChoice()
-
-
TRChoice(String[])
- Convenience - add all the passed items.
-
addItem(String, Object)
- Add an item to this choice, with user data.
-
getSelectedUserData()
- Get the selected item's user data.
-
getUserData(int)
- Get the user data at position index.
-
getUserData(String)
- Get the user data for the specified item.
-
remove(int)
- Remove the item and user data at position index.
-
remove(String)
- Remove an item from the list.
-
removeAll()
- Remove all items and user data from the list.
TRChoice
public TRChoice()
TRChoice
public TRChoice(String items[])
- Convenience - add all the passed items.
addItem
public void addItem(String item,
Object userData)
- Add an item to this choice, with user data.
- Parameters:
- item - the item to add to this choice
- userData - the associated data
removeAll
public void removeAll()
- Remove all items and user data from the list.
- Overrides:
- removeAll in class Choice
remove
public void remove(String item)
- Remove an item from the list.
- Parameters:
- item - the actual item to remove
- Overrides:
- remove in class Choice
remove
public void remove(int index)
- Remove the item and user data at position index.
- Parameters:
- index - the item's position
- Overrides:
- remove in class Choice
getUserData
public Object getUserData(int index)
- Get the user data at position index.
- Parameters:
- index - the position in the list of the user data
- Returns:
- the associated user data
getUserData
public Object getUserData(String item)
- Get the user data for the specified item.
- Parameters:
- item - the string that's associated with the user data
- Returns:
- the associated user data
getSelectedUserData
public Object getSelectedUserData()
- Get the selected item's user data.
- Returns:
- the associated user data
All Packages Class Hierarchy This Package Previous Next Index