X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGSplitFrame.java;h=4d531bed4caf87f523b9d4af17e5bbd7a95bff27;hb=dc78f37f49146f6339815e93598159d0c1ddc4c7;hp=7c4dcf38b9cd81feb25509f484c1c888bd8589d2;hpb=c8ae8ef3f6365ea5664930f3139fa4871eb188c2;p=jalview.git diff --git a/src/jalview/jbgui/GSplitFrame.java b/src/jalview/jbgui/GSplitFrame.java index 7c4dcf3..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,8 @@ public class GSplitFrame extends JInternalFrame */ public GSplitFrame(GAlignFrame top, GAlignFrame bottom) { + setFrameIcon(null); + setName("jalview-splitframe"); this.topFrame = top; this.bottomFrame = bottom; @@ -102,7 +104,7 @@ public class GSplitFrame extends JInternalFrame */ protected void hideTitleBars() { - if (new Platform().isAMac()) + if (Platform.isAMacAndNotJS()) { // this saves some space - but doesn't hide the title bar topFrame.putClientProperty("JInternalFrame.isPalette", true); @@ -153,7 +155,8 @@ public class GSplitFrame extends JInternalFrame return false; } Point p = comp.getLocationOnScreen(); - Rectangle r = new Rectangle(p.x, p.y, comp.getWidth(), comp.getHeight()); + Rectangle r = new Rectangle(p.x, p.y, comp.getWidth(), + comp.getHeight()); return r.contains(loc); } @@ -173,8 +176,8 @@ public class GSplitFrame extends JInternalFrame else { this.dividerRatio = splitPane.getDividerLocation() - / (double) (splitPane.getHeight() - splitPane - .getDividerSize()); + / (double) (splitPane.getHeight() + - splitPane.getDividerSize()); } if (alignFrame == this.topFrame)