/** This closes the IGV window. */ public static void stopGUI() { if (!IGV.hasInstance()) { return; } IGV.getMainFrame().setVisible(false); IGV.getMainFrame().dispose(); IGV.destroyInstance(); }
@Before public void setUp() throws Exception { igv.newSession(); IGV.getMainFrame().requestFocus(); TestUtils.resetPrefsFile(); TestUtils.resetTestUserDefinedGenomes(); IGV.getInstance().getContentPane().getCommandBar().refreshGenomeListComboBox(); }
public final void doExitApplication() { try { IGV.getInstance().saveStateForExit(); Frame mainFrame = IGV.getMainFrame(); // Hide and close the application mainFrame.setVisible(false); mainFrame.dispose(); } finally { System.exit(0); } }
/** * Load a gui with the specified genome file. No genome is loaded if null * * @param genomeFile * @return * @throws IOException */ protected static IGV startGUI(String genomeFile) throws IOException { Globals.setHeadless(false); IGV igv; // If IGV is already open, we get the instance. if (IGV.hasInstance()) { igv = IGV.getInstance(); IGV.getMainFrame().setVisible(true); System.out.println("Using old IGV"); } else { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Main.open(frame); System.out.println("Started new IGV"); igv = IGV.getInstance(); assertTrue(IGV.getInstance().waitForNotify(1000)); } if (genomeFile != null) { igv.loadGenome(genomeFile, null); genome = igv.getGenomeManager().getCurrentGenome(); } return igv; }
public void showAboutDialog() { (new AboutDialog(IGV.getMainFrame(), true)).setVisible(true); }