From: hansonr Date: Wed, 3 Apr 2019 23:51:20 +0000 (-0500) Subject: removing early SplitPane SwingJS hack X-Git-Tag: Release_2_11_4_0~45^2~18^2~177 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f581eb9573ca4300f481067955acde3dc32426f5;p=jalview.git removing early SplitPane SwingJS hack --- diff --git a/src/jalview/jbgui/GSplitFrame.java b/src/jalview/jbgui/GSplitFrame.java index 353c494..a75760d 100644 --- a/src/jalview/jbgui/GSplitFrame.java +++ b/src/jalview/jbgui/GSplitFrame.java @@ -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); } /**