code: protected void enqueueEvent(Object event, EventHandler handler) {
      eventsToDispatch.get().offer(new EventWithHandler(event, handler));
    }
docs: Queue the {@code event} for dispatch during {@link #dispatchQueuedEvents()}. Events are queued in-order of
  occurrence so they can be dispatched in the same order.