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