Ejemplo n.º 1
0
  private void flushPending() {
    for (Request each : myPendingRequests) {
      _add(each);
    }

    myPendingRequests.clear();
  }
Ejemplo n.º 2
0
  private void _addRequest(final Runnable request, long delayMillis, ModalityState modalityState) {
    synchronized (LOCK) {
      LOG.assertTrue(!myDisposed, "Already disposed");
      final Request requestToSchedule = new Request(request, modalityState, delayMillis);

      if (myActivationComponent == null || myActivationComponent.isShowing()) {
        _add(requestToSchedule);
      } else {
        if (!myPendingRequests.contains(requestToSchedule)) {
          myPendingRequests.add(requestToSchedule);
        }
      }
    }
  }