public void run() { customFinished(); } });
/** * Declare that the future is finished. * This method is only called for intermediate futures, * i.e. when this method is called it is guaranteed that the * intermediateResultAvailable method was called for all * intermediate results before. */ public void finished() { // 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()) { customFinished(); } else { SwingUtilities.invokeLater(new Runnable() { public void run() { customFinished(); } }); } }