X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGSplitFrame.java;h=4d531bed4caf87f523b9d4af17e5bbd7a95bff27;hb=refs%2Fheads%2Ffeature%2FJAL-4274_configurable_bitmap_export_preferences;hp=353c494a090636143d86005d28298016100b2435;hpb=8fa69554edf6aeb278b4a4afd8e2b60264fdccd8;p=jalview.git diff --git a/src/jalview/jbgui/GSplitFrame.java b/src/jalview/jbgui/GSplitFrame.java index 353c494..4d531be 100644 --- a/src/jalview/jbgui/GSplitFrame.java +++ b/src/jalview/jbgui/GSplitFrame.java @@ -20,8 +20,6 @@ */ package jalview.jbgui; -import jalview.util.Platform; - import java.awt.Component; import java.awt.MouseInfo; import java.awt.Point; @@ -31,6 +29,8 @@ import javax.swing.JInternalFrame; import javax.swing.JSplitPane; import javax.swing.plaf.basic.BasicInternalFrameUI; +import jalview.util.Platform; + public class GSplitFrame extends JInternalFrame { protected static final int DIVIDER_SIZE = 5; @@ -57,6 +57,7 @@ public class GSplitFrame extends JInternalFrame */ public GSplitFrame(GAlignFrame top, GAlignFrame bottom) { + setFrameIcon(null); setName("jalview-splitframe"); this.topFrame = top; this.bottomFrame = bottom; @@ -80,24 +81,17 @@ public class GSplitFrame extends JInternalFrame * project */ int topFrameHeight = topFrame.getHeight(); - /** - * TODO SplitFrame.setDividerLocation - * - * @j2sNative - */ + splitPane.setDividerSize(DIVIDER_SIZE); + if (topFrameHeight == 0) + { + setRelativeDividerLocation(0.5d); // as a proportion + } + else { - 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); + int dividerPosition = topFrameHeight + DIVIDER_SIZE / 2; + splitPane.setDividerLocation(dividerPosition); // absolute position } + splitPane.setResizeWeight(0.5d); add(splitPane); } @@ -119,8 +113,8 @@ public class GSplitFrame extends JInternalFrame } else { - ((BasicInternalFrameUI) topFrame.getUI()).setNorthPane(null); - ((BasicInternalFrameUI) bottomFrame.getUI()).setNorthPane(null); + ((BasicInternalFrameUI) topFrame.getUI()).setNorthPane(null); + ((BasicInternalFrameUI) bottomFrame.getUI()).setNorthPane(null); } } @@ -208,15 +202,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 +212,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); } /**