예제 #1
0
 @Override
 public void dispatchEvent(Event event) {
   if (hasListeners()) {
     for (EventListener listener : listeners) {
       listener.onEvent(this, event);
     }
   }
 }
예제 #2
0
 @Override
 public void onEvent(EventDispatcher dispatcher, Event event) {
   if (event.getBubble()) {
     if (hasListeners()) {
       for (EventListener listener : listeners) {
         listener.onEvent(dispatcher, event);
       }
     }
   }
 }