import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
+import jalview.api.structures.JalviewStructureDisplayI;
import jalview.bin.Cache;
import jalview.bin.Jalview;
import jalview.gui.ImageExporter.ImageWriterI;
storeLastKnownDimensions("JALVIEW_RSS_WINDOW_", jvnews.getBounds());
}
+ // Frames should all close automatically. Keeping external
+ // viewers open should already be decided by user.
closeAll_actionPerformed(null);
// check for aborted quit
{
// TODO show a progress bar while closing?
JInternalFrame[] frames = desktop.getAllFrames();
- boolean quitting = QuitHandler.quitting();
for (int i = 0; i < frames.length; i++)
{
try
{
frames[i].setClosed(true);
- // check for cancelled quit
- if (quitting && QuitHandler.quitCancelled())
- {
- return;
- }
} catch (java.beans.PropertyVetoException ex)
{
}
}
}
+ public int structureViewersStillRunningCount()
+ {
+ int count = 0;
+ JInternalFrame[] frames = desktop.getAllFrames();
+ for (int i = 0; i < frames.length; i++)
+ {
+ if (frames[i] != null
+ && frames[i] instanceof JalviewStructureDisplayI)
+ {
+ if (((JalviewStructureDisplayI) frames[i]).stillRunning())
+ count++;
+ }
+ }
+ return count;
+ }
+
@Override
public void raiseRelated_actionPerformed(ActionEvent e)
{