X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fjbgui%2FGSplitFrame.java;h=a75760da69a17e78bfb5730cd84f4cfe75b58a69;hb=584ab9644955bec02d96448361b8aac5b9542599;hp=a40e260c31a6803c4cf4626b3f330c346fc44a3e;hpb=f5d6c0018555b2c453c2c0354c84cd5d2d81e3b9;p=jalview.git diff --git a/src/jalview/jbgui/GSplitFrame.java b/src/jalview/jbgui/GSplitFrame.java index a40e260..a75760d 100644 --- a/src/jalview/jbgui/GSplitFrame.java +++ b/src/jalview/jbgui/GSplitFrame.java @@ -57,6 +57,7 @@ public class GSplitFrame extends JInternalFrame */ public GSplitFrame(GAlignFrame top, GAlignFrame bottom) { + setName("jalview-splitframe"); this.topFrame = top; this.bottomFrame = bottom; @@ -79,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); } @@ -118,13 +112,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 +201,7 @@ public class GSplitFrame extends JInternalFrame public void setRelativeDividerLocation(double r) { this.dividerRatio = r; - /** - * @j2sNative - */ - { - splitPane.setDividerLocation(r); - } + splitPane.setDividerLocation(r); } /** @@ -227,12 +211,7 @@ public class GSplitFrame extends JInternalFrame */ protected void setDividerLocation(int p) { - /** - * @j2sNative - */ - { - splitPane.setDividerLocation(p); - } + splitPane.setDividerLocation(p); } /**