}
public void setOptions(Object[] options, Object current) {
if (item == null)
return;
PopupList list = (PopupList) item;
list.removeAll();
if (options != null && options.length > 0) {
int index = selectedIndex != null ? selectedIndex : 0;
for (int i = 0; i < options.length; i++) {
Object option = options[i];
if (option.equals(current))
index = i;
ListEntry entry = null;
if (option instanceof ListEntry) {
entry = (ListEntry) option;
entry = list.add(entry);
} else {
entry = new ListEntry(list);
// Simplify names for art items
String name = option instanceof com.scriptographer.ai.Item
? ((com.scriptographer.ai.Item) option).getName()