From f581eb9573ca4300f481067955acde3dc32426f5 Mon Sep 17 00:00:00 2001 From: hansonr Date: Wed, 3 Apr 2019 18:51:20 -0500 Subject: [PATCH] removing early SplitPane SwingJS hack --- src/jalview/jbgui/GSplitFrame.java | 44 +++++++++--------------------------- 1 file changed, 11 insertions(+), 33 deletions(-) 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); } /** -- 1.7.10.2