Merge branch 'releases/Release_2_11_3_Branch'
[jalview.git] / src / jalview / jbgui / GSplitFrame.java
index a40e260..4d531be 100644 (file)
@@ -20,8 +20,6 @@
  */
 package jalview.jbgui;
 
-import jalview.util.Platform;
-
 import java.awt.Component;
 import java.awt.MouseInfo;
 import java.awt.Point;
@@ -31,6 +29,8 @@ import javax.swing.JInternalFrame;
 import javax.swing.JSplitPane;
 import javax.swing.plaf.basic.BasicInternalFrameUI;
 
+import jalview.util.Platform;
+
 public class GSplitFrame extends JInternalFrame
 {
   protected static final int DIVIDER_SIZE = 5;
@@ -57,6 +57,8 @@ public class GSplitFrame extends JInternalFrame
    */
   public GSplitFrame(GAlignFrame top, GAlignFrame bottom)
   {
+    setFrameIcon(null);
+    setName("jalview-splitframe");
     this.topFrame = top;
     this.bottomFrame = bottom;
 
@@ -79,24 +81,17 @@ public class GSplitFrame extends JInternalFrame
      * project
      */
     int topFrameHeight = topFrame.getHeight();
-    /**
-     * TODO SplitFrame.setDividerLocation
-     * 
-     * @j2sNative
-     */
+    splitPane.setDividerSize(DIVIDER_SIZE);
+    if (topFrameHeight == 0)
+    {
+      setRelativeDividerLocation(0.5d); // as a proportion
+    }
+    else
     {
-      splitPane.setDividerSize(DIVIDER_SIZE);
-      if (topFrameHeight == 0)
-      {
-        setRelativeDividerLocation(0.5d); // as a proportion
-      }
-      else
-      {
-        int dividerPosition = topFrameHeight + DIVIDER_SIZE / 2;
-        splitPane.setDividerLocation(dividerPosition); // absolute position
-      }
-      splitPane.setResizeWeight(0.5d);
+      int dividerPosition = topFrameHeight + DIVIDER_SIZE / 2;
+      splitPane.setDividerLocation(dividerPosition); // absolute position
     }
+    splitPane.setResizeWeight(0.5d);
     add(splitPane);
   }
 
@@ -118,13 +113,8 @@ public class GSplitFrame extends JInternalFrame
     }
     else
     {
-      /**
-       * @j2sNative
-       */
-      {
-        ((BasicInternalFrameUI) topFrame.getUI()).setNorthPane(null);
-        ((BasicInternalFrameUI) bottomFrame.getUI()).setNorthPane(null);
-      }
+      ((BasicInternalFrameUI) topFrame.getUI()).setNorthPane(null);
+      ((BasicInternalFrameUI) bottomFrame.getUI()).setNorthPane(null);
     }
   }
 
@@ -212,12 +202,7 @@ public class GSplitFrame extends JInternalFrame
   public void setRelativeDividerLocation(double r)
   {
     this.dividerRatio = r;
-    /**
-     * @j2sNative
-     */
-    {
-      splitPane.setDividerLocation(r);
-    }
+    splitPane.setDividerLocation(r);
   }
 
   /**
@@ -227,12 +212,7 @@ public class GSplitFrame extends JInternalFrame
    */
   protected void setDividerLocation(int p)
   {
-    /**
-     * @j2sNative
-     */
-    {
-      splitPane.setDividerLocation(p);
-    }
+    splitPane.setDividerLocation(p);
   }
 
   /**