void handleAction(final int index, final long when, final int modifiers) { final List l = (List) target; WToolkit.executeOnEventHandlerThread( l, new Runnable() { public void run() { l.select(index); postEvent( new ActionEvent( target, ActionEvent.ACTION_PERFORMED, l.getItem(index), when, modifiers)); } }); }
void handleListChanged(final int index) { final List l = (List) target; WToolkit.executeOnEventHandlerThread( l, new Runnable() { public void run() { postEvent( new ItemEvent( l, ItemEvent.ITEM_STATE_CHANGED, new Integer(index), isSelected(index) ? ItemEvent.SELECTED : ItemEvent.DESELECTED)); } }); }
/* * Called from Windows in response to WM_VSCROLL/WM_HSCROLL message */ private void postScrollEvent(int orient, int type, int pos, boolean isAdjusting) { Runnable adjustor = new Adjustor(orient, type, pos, isAdjusting); WToolkit.executeOnEventHandlerThread(new ScrollEvent(target, adjustor)); }