removing early SplitPane SwingJS hack
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Wed, 3 Apr 2019 23:51:20 +0000 (18:51 -0500)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Wed, 3 Apr 2019 23:51:20 +0000 (18:51 -0500)
src/jalview/jbgui/GSplitFrame.java

index 353c494..a75760d 100644 (file)
@@ -80,24 +80,17 @@ public class GSplitFrame extends JInternalFrame
      * project
      */
     int topFrameHeight = topFrame.getHeight();
-    /**
-     * TODO SplitFrame.setDividerLocation
-     * 
-     * @j2sNative
-     */
+    splitPane.setDividerSize(DIVIDER_SIZE);
+    if (topFrameHeight == 0)
     {
-      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);
+      setRelativeDividerLocation(0.5d); // as a proportion
     }
+    else
+    {
+      int dividerPosition = topFrameHeight + DIVIDER_SIZE / 2;
+      splitPane.setDividerLocation(dividerPosition); // absolute position
+    }
+    splitPane.setResizeWeight(0.5d);
     add(splitPane);
   }
 
@@ -208,15 +201,7 @@ public class GSplitFrame extends JInternalFrame
   public void setRelativeDividerLocation(double r)
   {
     this.dividerRatio = r;
-    /**
-     * 
-     * BH need for this? - NOT setting the location?
-     * 
-     * @j2sNative
-     */
-    {
-      splitPane.setDividerLocation(r);
-    }
+    splitPane.setDividerLocation(r);
   }
 
   /**
@@ -226,14 +211,7 @@ public class GSplitFrame extends JInternalFrame
    */
   protected void setDividerLocation(int p)
   {
-    /**
-     * BH: Why are we not setting the location?
-     * 
-     * @j2sNative
-     */
-    {
-      splitPane.setDividerLocation(p);
-    }
+    splitPane.setDividerLocation(p);
   }
 
   /**