Package eu.bandm.tools.graficUtils
Class SwingExecSync
java.lang.Object
eu.bandm.tools.graficUtils.SwingExecSync
Worker for transparently executing code which accesses
swing resources. The payload code must be defined by overriding
code()
.
A call to run()
executes this code immediately iff the thread is already
the swing event dispatch thread.
Otherwise it is called indirectly/later by SwingUtilities.invokeAndWait(java.lang.Runnable)
.
The payload code can place a calculation result in the buffer result
.-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
result
Auxiliary field by which a result can be passed from the payload code to the caller.
-
-
Constructor Details
-
SwingExecSync
public SwingExecSync()
-
-
Method Details
-
code
public abstract void code()Must be overridden by the concrete payload code we want executed. -
run
-