Exemple #1
0
  /** This closes the IGV window. */
  public static void stopGUI() {
    if (!IGV.hasInstance()) {
      return;
    }

    IGV.getMainFrame().setVisible(false);
    IGV.getMainFrame().dispose();
    IGV.destroyInstance();
  }
Exemple #2
0
  @Before
  public void setUp() throws Exception {
    igv.newSession();
    IGV.getMainFrame().requestFocus();

    TestUtils.resetPrefsFile();
    TestUtils.resetTestUserDefinedGenomes();
    IGV.getInstance().getContentPane().getCommandBar().refreshGenomeListComboBox();
  }
Exemple #3
0
  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);
    }
  }
Exemple #4
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;
 }
Exemple #5
0
 public void showAboutDialog() {
   (new AboutDialog(IGV.getMainFrame(), true)).setVisible(true);
 }