Fork of java 8 ProgressMonitor to allow modal dialog.