public void run() { customResultAvailable(result); } });
/** * Called when the result is available. * @param result The result. */ final public void resultAvailable(final E result) { // Hack!!! When triggered from shutdown hook, swing might be terminated // and invokeLater has no effect (grrr). if(!SReflect.HAS_GUI || SwingUtilities.isEventDispatchThread())// || Starter.isShutdown()) // if(SwingUtilities.isEventDispatchThread()) { customResultAvailable(result); } else { SwingUtilities.invokeLater(new Runnable() { public void run() { customResultAvailable(result); } }); } }