Interface List
access this type via: ui.List (provides, requires or uses)
--- extends:XYMouseObject
A graphical list, allowing a user to click on items shown in the list. This widget would usually be used together with a ScrollPane to support scrolling.
Events
selectItem()
fileDrop(String path)
Functions
List()
void addItem(char name[])
void updateItem(int index, char name[])
void deleteItem(int index)
void clear()
void setWidth(int w)
void filter(int indices[])
char[] getSelectedItem()
int getSelectedIndex()
void setSelectedIndex(int index)
Events
selectItem This event is fired when a user clicks on an item in the list.
fileDrop This event is fired when a file is dropped on the list.
List()
Instantiate a new list widget.
void addItem(char name[])
Add an item to the list. Items are displayed in the order they are added.
void updateItem(int index, char name[])
Update the name of an item in the list.
void deleteItem(int index)
Delete an item in the list.
void clear()
Remove all items from the list.
void setWidth(int w)
Set the desired width of the list (note tht its height is automatically calculated based on how many items are in the list).
void filter(int indices[])
Filter the set of items shown, by only showing those at the given index positions.
char[] getSelectedItem()
Get the name of the list item that has been selected.
int getSelectedIndex()
Get the index of the list item that has been selected.
void setSelectedIndex(int index)
Set the index of the list item that shows as selected.