X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FDesktop.java;h=9e84407a1102969321bec06ebdb1d4a1fb6a9e2c;hb=ced9774e6ac645ef1b231e560fcf5f70a4e44263;hp=5f45dc1fbff0e07f175b3bf516a2d4992d2f7393;hpb=f27f81a74bbe1be141d23df8aba578515e3179a2;p=jalview.git diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 5f45dc1..9e84407 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -169,6 +169,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements private static final int THREE = 3; + private static AlignFrame currentAlignFrame; + public static jalview.ws.jws1.Discoverer discoverer; public static Object[] jalviewClipboard; @@ -1022,6 +1024,13 @@ public class Desktop extends jalview.jbgui.GDesktop implements { new FileLoader().LoadFile(viewport, choice, FormatAdapter.FILE, format); + // viewport.setShowSequenceFeatures(JSONFile.isSeqFeaturesEnabled()); + // AlignFrame af = viewport.getAlignPanel().alignFrame; + // if (af != null) + // { + // af.changeColour(JSONFile.getColourScheme()); + // af.setMenusForViewport(); + // } } else { @@ -1157,7 +1166,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements { dialogExecutor.shutdownNow(); } - + closeAll_actionPerformed(null); System.exit(0); } @@ -1476,9 +1485,6 @@ public class Desktop extends jalview.jbgui.GDesktop implements final java.io.File choice = chooser.getSelectedFile(); setProjectFile(choice); - // TODO or move inside the new Thread? - saveChimeraSessions(choice.getAbsolutePath()); - new Thread(new Runnable() { public void run() @@ -1516,32 +1522,6 @@ public class Desktop extends jalview.jbgui.GDesktop implements } } - /** - * Request any open, linked Chimera sessions to save their state. - * - * @param jalviewProjectFilename - * the filename of the Jalview project; Chimera session files should - * be given distinct, but obviously related, names. - */ - public void saveChimeraSessions(String jalviewProjectFilename) - { - int i = 0; - for (JInternalFrame frame : getAllFrames()) - { - if (frame instanceof ChimeraViewFrame) - { - /* - * Construct a filename for the Chimera session by append _chimera.py - * to the Jalview project file name. - */ - String chimeraPath = jalviewProjectFilename + "_chimera_" + i - + ".py"; - ((ChimeraViewFrame) frame).saveSession(chimeraPath); - i++; - } - } - } - private void setProjectFile(File choice) { this.projectFile = choice; @@ -2513,7 +2493,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements public void registerHandler(final long id, final IProgressIndicatorHandler handler) { - if (progressBarHandlers == null || !progressBars.contains(new Long(id))) + if (progressBarHandlers == null + || !progressBars.containsKey(new Long(id))) { throw new Error( MessageManager @@ -3073,4 +3054,16 @@ public class Desktop extends jalview.jbgui.GDesktop implements myTopFrame.setDisplayedView(myTopFrame.alignPanel); } + + // public static AlignFrame getCurrentAlignFrame() + // { + // return currentAlignFrame; + // } + // + // public static void setCurrentAlignFrame(AlignFrame currentAlignFrame) + // { + // Desktop.currentAlignFrame = currentAlignFrame; + // } + + }