MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / eventCallWait

Method eventCallWait

ij/src/main/java/ij/macro/Functions.java:3589–3600  ·  view source on GitHub ↗
(Runnable run)

Source from the content-addressed store, hash-verified

3587 }
3588
3589 @AstroImageJ(reason = "Ensure actions that effect the GUI occur on the proper thread to prevent blocking the macro")
3590 private void eventCallWait(Runnable run) {
3591 try {
3592 if (SwingUtilities.isEventDispatchThread()) {
3593 run.run();
3594 } else {
3595 SwingUtilities.invokeAndWait(run);
3596 }
3597 } catch (InterruptedException | InvocationTargetException e) {
3598 throw new RuntimeException(e);
3599 }
3600 }
3601
3602 void setBatchMode() {
3603 boolean enterBatchMode = false;

Callers 3

openMethod · 0.95
closeMethod · 0.95
printMethod · 0.95

Calls 1

runMethod · 0.65

Tested by

no test coverage detected