예제 #1
0
 public void handleEvent(Event e) {
   if (e.type == SWT.Traverse) {
     e.doit = false;
   } else if (e.type == SWT.KeyDown) {
     if (!isModal()) {
       resetTimerTask(false);
       callCommandAction(getCommand(0));
     } else if (e.keyCode == SWT.ARROW_DOWN) {
       Point p = eswtScrolledText.getOrigin();
       eswtScrolledText.setOrigin(p.x, p.y + Config.ALERT_TEXT_SCROLLING_DELTA);
     } else if (e.keyCode == SWT.ARROW_UP) {
       Point p = eswtScrolledText.getOrigin();
       eswtScrolledText.setOrigin(p.x, p.y - Config.ALERT_TEXT_SCROLLING_DELTA);
     }
   } else if (e.type == SWT.MouseUp) {
     if (!isModal()) {
       resetTimerTask(false);
       callCommandAction(getCommand(0));
     }
   }
 }
 public void handleEvent(Event e) {
   MessageBox m = new MessageBox(shell, SWT.OK);
   m.setMessage(e.toString());
   m.open();
 }