}
}
private void setSelectItem(int index, boolean firstItem) {
swingWait();
FireableMouseClickEvent event = new FireableMouseClickEvent(getComponent());
Rectangle r = (Rectangle) eventQueueRunner.invoke(getList(), "getCellBounds", new Object[] { Integer.valueOf(index),
Integer.valueOf(index) }, new Class[] { Integer.TYPE, Integer.TYPE });
if (r == null) {
throw new ComponentException("Could not find cellBounds for list : '" + getMComponentName() + "' for index " + index,
finder.getScriptModel(), windowMonitor);
}
Point p = new Point((int) r.getCenterX(), (int) r.getCenterY());
eventQueueRunner.invoke(getList(), "ensureIndexIsVisible", new Object[] { Integer.valueOf(index) },
new Class[] { Integer.TYPE });
swingWait();
if (firstItem)
event.fire(p, 1);
else
event.fire(p, 1, OSUtils.MOUSE_MENU_MASK);
swingWait();
}