コード例 #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);
       }
     }
   }
 }