* @noreference This method is not intended to be referenced by clients.
*/
public void handleEvent (Event e) {
switch (e.type) {
case SWT.Activate: {
((ShellListener) eventListener).shellActivated(new ShellEvent(e));
break;
}
case SWT.Arm: {
((ArmListener) eventListener).widgetArmed (new ArmEvent (e));
break;
}
case SWT.Close: {
/* Fields set by Decorations */
ShellEvent event = new ShellEvent (e);
((ShellListener) eventListener).shellClosed(event);
e.doit = event.doit;
break;
}
case SWT.Collapse: {
if (eventListener instanceof TreeListener) {
((TreeListener) eventListener).treeCollapsed(new TreeEvent(e));
} else {
((ExpandListener) eventListener).itemCollapsed(new ExpandEvent(e));
}
break;
}
case SWT.Deactivate: {
((ShellListener) eventListener).shellDeactivated(new ShellEvent(e));
break;
}
case SWT.Deiconify: {
((ShellListener) eventListener).shellDeiconified(new ShellEvent(e));
break;
}
case SWT.DefaultSelection: {
((SelectionListener)eventListener).widgetDefaultSelected(new SelectionEvent(e));
break;
}
case SWT.Dispose: {
((DisposeListener) eventListener).widgetDisposed(new DisposeEvent(e));
break;
}
case SWT.DragDetect: {
((DragDetectListener) eventListener).dragDetected(new DragDetectEvent(e));
break;
}
case SWT.Expand: {
if (eventListener instanceof TreeListener) {
((TreeListener) eventListener).treeExpanded(new TreeEvent(e));
} else {
((ExpandListener) eventListener).itemExpanded(new ExpandEvent(e));
}
break;
}
case SWT.FocusIn: {
((FocusListener) eventListener).focusGained(new FocusEvent(e));
break;
}
case SWT.FocusOut: {
((FocusListener) eventListener).focusLost(new FocusEvent(e));
break;
}
case SWT.Gesture: {
GestureEvent event = new GestureEvent(e);
((GestureListener)eventListener).gesture(event);
e.doit = event.doit;
break;
}
case SWT.Help: {
((HelpListener) eventListener).helpRequested (new HelpEvent (e));
break;
}
case SWT.Hide: {
((MenuListener) eventListener).menuHidden(new MenuEvent(e));
break;
}
case SWT.Iconify: {
((ShellListener) eventListener).shellIconified(new ShellEvent(e));
break;
}
case SWT.KeyDown: {
/* Fields set by Control */
KeyEvent event = new KeyEvent(e);