changed Mainframe from JFrame to JInternalFrame
[jalview.git] / forester / java / src / org / forester / archaeopteryx / MainFrameApplication.java
index 780dcc3..51bb251 100644 (file)
@@ -57,6 +57,8 @@ import javax.swing.UnsupportedLookAndFeelException;
 import javax.swing.WindowConstants;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
+import javax.swing.event.InternalFrameAdapter;
+import javax.swing.event.InternalFrameEvent;
 
 import org.forester.analysis.TaxonomyDataManager;
 import org.forester.archaeopteryx.Options.CLADOGRAM_TYPE;
@@ -77,7 +79,6 @@ import org.forester.io.parsers.nhx.NHXParser;
 import org.forester.io.parsers.nhx.NHXParser.TAXONOMY_EXTRACTION;
 import org.forester.io.parsers.phyloxml.PhyloXmlDataFormatException;
 import org.forester.io.parsers.phyloxml.PhyloXmlParser;
-import org.forester.io.parsers.phyloxml.PhyloXmlUtil;
 import org.forester.io.parsers.tol.TolParser;
 import org.forester.io.parsers.util.ParserUtils;
 import org.forester.io.writers.SequenceWriter;
@@ -103,8 +104,8 @@ import org.forester.util.ForesterUtil;
 
 public final class MainFrameApplication extends MainFrame {
 
-    private final static int             FRAME_X_SIZE                    = 800;
-    private final static int             FRAME_Y_SIZE                    = 800;
+    private final static int             FRAME_X_SIZE                    = 900;
+    private final static int             FRAME_Y_SIZE                    = 900;
     // Filters for the file-open dialog (classes defined in this file)
     private static final long            serialVersionUID                = -799735726778865234L;
     private static final boolean         PREPROCESS_TREES                = false;
@@ -162,10 +163,10 @@ public final class MainFrameApplication extends MainFrame {
         setSize( MainFrameApplication.FRAME_X_SIZE, MainFrameApplication.FRAME_Y_SIZE );
         // The window listener
         setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
-        addWindowListener( new WindowAdapter() {
+        addInternalFrameListener( new InternalFrameAdapter() {
 
             @Override
-            public void windowClosing( final WindowEvent e ) {
+            public void internalFrameClosing (final InternalFrameEvent e ) {
                 exit();
             }
         } );
@@ -303,10 +304,10 @@ public final class MainFrameApplication extends MainFrame {
         //        } );
         // The window listener
         setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
-        addWindowListener( new WindowAdapter() {
+        addInternalFrameListener( new InternalFrameAdapter() {
 
             @Override
-            public void windowClosing( final WindowEvent e ) {
+            public void internalFrameClosing( final InternalFrameEvent e ) {
                 if ( isUnsavedDataPresent() ) {
                     final int r = JOptionPane.showConfirmDialog( null,
                                                                  "Exit despite potentially unsaved changes?",
@@ -516,7 +517,7 @@ public final class MainFrameApplication extends MainFrame {
                     msa = FastaParser.parseMsa( is );
                 }
                 else {
-                    msa = GeneralMsaParser.parse( is );
+                    msa = GeneralMsaParser.parseMsa( is );
                 }
             }
             catch ( final MsaFormatException e ) {