JAL-1643 modified jalviewFileChooser to retain default behaviour on other non-mac...
authorCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 4 Feb 2015 06:04:47 +0000 (06:04 +0000)
committerCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 4 Feb 2015 06:04:47 +0000 (06:04 +0000)
src/jalview/io/JalviewFileChooser.java

index f0e0cb1..fe1a90e 100755 (executable)
@@ -22,6 +22,7 @@
 package jalview.io;
 
 import jalview.util.MessageManager;
+import jalview.util.Platform;
 
 import java.awt.Component;
 import java.awt.Dimension;
@@ -301,10 +302,15 @@ public class JalviewFileChooser extends JFileChooser
       layout.putConstraint(SpringLayout.NORTH, scroller, 5,
               SpringLayout.NORTH, this);
 
-      // scroller.setPreferredSize(new Dimension(130, 200));
-
+      if (new Platform().isAMac())
+      {
+        scroller.setPreferredSize(new Dimension(500, 100));
+      }
+      else
+      {
+        scroller.setPreferredSize(new Dimension(130, 200));
+      }
 
-      scroller.setPreferredSize(new Dimension(500, 100));
       this.add(scroller);
 
       javax.swing.SwingUtilities.invokeLater(new Runnable()