if (data.equals("HORIZONTAL") || data.equals("VERTICAL")) {
Orientation axis = Orientation.valueOf(data);
Scrollable scroll = (Scrollable) control;
scroll.setScrollPosition(axis, (int) state);
} else if (control instanceof ListWidget) {
ListWidget list = (ListWidget) control;
boolean dblclick = false;
if (data.equals("click") || data.equals("doubleclick") || data.equals("selected")) {
int item = (int) state;
if (data.equals("doubleclick")) {
dblclick = true;
}
list.setSelection(item);
list.onSelected(item, dblclick);
}
}
}
}
}