X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FDesktop.java;h=b901ae416c8311664b4e692863820d7f4862d7dc;hb=refs%2Fheads%2Fpatch%2FJAL-4196_structure_viewer_synchronising;hp=99c394b8fdb6b874b39065ede8940ed97222c2d7;hpb=0f72eae506d32d20f11908522330d49889818f10;p=jalview.git diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 99c394b..b901ae4 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -3627,4 +3627,24 @@ public class Desktop extends jalview.jbgui.GDesktop Desktop.instance = null; } } + + /** + * checks if any progress bars are being displayed in any of the windows managed by the desktop + * @return + */ + public boolean operationsAreInProgress() + { + JInternalFrame[] frames = getAllFrames(); + for (JInternalFrame frame:frames) + { + if (frame instanceof IProgressIndicator) + { + if (((IProgressIndicator)frame).operationInProgress()) + { + return true; + } + } + } + return operationInProgress(); + } }