boolean () { if (!myExecuteInDispatchThread || myModalityStateComponent == ANY_COMPONENT) { return true; } ModalityState current = ModalityState.current(); ModalityState modalityState = getModalityState(); return !current.dominates(modalityState); }