Example #1
0
 public Event sendEvent(final Widget w, final int event) {
   try {
     Event e = createEvent(w);
     sendEventRaw(event, e);
     return e;
   } catch (SecurityException e) {
     TeslaCore.log(e);
   } catch (IllegalArgumentException e) {
     TeslaCore.log(e);
   }
   return null;
 }
Example #2
0
 public Event sendEvent(final Widget w, Event event) {
   if (w.isDisposed()) {
     return null;
   }
   try {
     event.widget = w;
     sendEventRaw(event.type, event);
     return event;
   } catch (SecurityException e) {
     TeslaCore.log(e);
   } catch (IllegalArgumentException e) {
     TeslaCore.log(e);
   }
   return null;
 }
Example #3
0
 public Event sendEvent(final SWTUIElement w, Event event) {
   Widget unwrapWidget = PlayerWrapUtils.unwrapWidget(w);
   if (unwrapWidget.isDisposed()) {
     return null;
   }
   try {
     event.widget = unwrapWidget;
     sendEventRaw(event.type, event);
     return event;
   } catch (SecurityException e) {
     TeslaCore.log(e);
   } catch (IllegalArgumentException e) {
     TeslaCore.log(e);
   }
   return null;
 }
Example #4
0
 public Event sendEvent(final Widget w, final int event, int x, int y, int button) {
   try {
     Event e = createEvent(w);
     e.x = x;
     e.y = y;
     e.button = button;
     e.type = event;
     sendEventRaw(event, e);
     return e;
   } catch (SecurityException e) {
     TeslaCore.log(e);
   } catch (IllegalArgumentException e) {
     TeslaCore.log(e);
   }
   return null;
 }
Example #5
0
 public Event sendEvent(final SWTUIElement w, final int event, int x, int y) {
   if (PlayerWrapUtils.unwrapWidget(w).isDisposed()) {
     return null;
   }
   try {
     Event e = createEvent(w);
     e.x = x;
     e.y = y;
     e.type = event;
     sendEventRaw(event, e);
     return e;
   } catch (SecurityException e) {
     TeslaCore.log(e);
   } catch (IllegalArgumentException e) {
     TeslaCore.log(e);
   }
   return null;
 }
Example #6
0
 public Event sendEvent(final SWTUIElement w, final int event) {
   if (PlayerWrapUtils.unwrapWidget(w).isDisposed()) {
     return null;
   }
   try {
     Event e = createEvent(w);
     sendEventRaw(event, e);
     return e;
   } catch (Throwable e) {
     TeslaCore.log(e);
   }
   return null;
 }
Example #7
0
 public Event sendEvent(final Widget w, final Widget item, final Event event) {
   if (w.isDisposed() || (item != null && item.isDisposed())) {
     return null;
   }
   try {
     event.widget = w;
     event.item = item;
     sendEventRaw(event.type, event);
     return event;
   } catch (Exception e) {
     TeslaCore.log(e);
     return null;
   }
 }