+ private MainFrameApplication( final Phylogeny[] phys, final Configuration config ) {
+ _configuration = config;
+ if ( _configuration == null ) {
+ throw new IllegalArgumentException( "configuration is null" );
+ }
+ setVisible( false );
+ setOptions( Options.createInstance( _configuration ) );
+ _mainpanel = new MainPanel( _configuration, this );
+ _open_filechooser = null;
+ _open_filechooser_for_species_tree = null;
+ _save_filechooser = null;
+ _writetopdf_filechooser = null;
+ _writetographics_filechooser = null;
+ _msa_filechooser = null;
+ _seqs_filechooser = null;
+ _values_filechooser = null;
+ _jmenubar = new JMenuBar();
+ buildFileMenu();
+ buildTypeMenu();
+ _contentpane = getContentPane();
+ _contentpane.setLayout( new BorderLayout() );
+ _contentpane.add( _mainpanel, BorderLayout.CENTER );
+ // App is this big
+ setSize( MainFrameApplication.FRAME_X_SIZE, MainFrameApplication.FRAME_Y_SIZE );
+ // The window listener
+ setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
+ addWindowListener( new WindowAdapter() {
+
+ @Override
+ public void windowClosing( final WindowEvent e ) {
+ exit();
+ }
+ } );
+ // setVisible( true );
+ if ( ( phys != null ) && ( phys.length > 0 ) ) {
+ AptxUtil.addPhylogeniesToTabs( phys, "", null, _configuration, _mainpanel );
+ validate();
+ getMainPanel().getControlPanel().showWholeAll();
+ getMainPanel().getControlPanel().showWhole();
+ }
+ //activateSaveAllIfNeeded();
+ // ...and its children
+ _contentpane.repaint();
+ }
+