code: public void setEventStack(EventStack eventStack) {
          if (this.eventStack == null) {
              this.eventStack = eventStack;
              this.cause = eventStack.peek();
          }
      }
docs: Sets the EventStack which is used while this event is dispatched. This
  method will be called by the {@link SequentialEventProvider} right
  before dispatching this event. The stack is only set once, subsequent
  calls will have no effect.
  
  @param eventStack The current event stack.