X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGSplitFrame.java;h=a75760da69a17e78bfb5730cd84f4cfe75b58a69;hb=915c9e36bbe05968b0b128667803387f322d9f29;hp=0549f17da8a909b893afc49b3a8a4edbb4353c65;hpb=4c091bec21e4aec8e1784d757d9d466382e61e25;p=jalview.git diff --git a/src/jalview/jbgui/GSplitFrame.java b/src/jalview/jbgui/GSplitFrame.java index 0549f17..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); } @@ -109,7 +103,7 @@ public class GSplitFrame extends JInternalFrame */ protected void hideTitleBars() { - if (Platform.isAMac()) + if (Platform.isAMacAndNotJS()) { // this saves some space - but doesn't hide the title bar topFrame.putClientProperty("JInternalFrame.isPalette", true); @@ -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); } /**