X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGSplitFrame.java;h=ed715c88e9751aa3a5acb9612375761503e84b19;hb=a83adb45bdf9554e270921b4baad94defd314b36;hp=26a404b64c0014a0311931ad1e3c59501db63545;hpb=838e4f91d4a53dd315640dbc9ff6ef7a815ee576;p=jalview.git diff --git a/src/jalview/jbgui/GSplitFrame.java b/src/jalview/jbgui/GSplitFrame.java index 26a404b..ed715c8 100644 --- a/src/jalview/jbgui/GSplitFrame.java +++ b/src/jalview/jbgui/GSplitFrame.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -20,6 +20,7 @@ */ package jalview.jbgui; +import jalview.bin.Jalview; import jalview.util.Platform; import java.awt.Component; @@ -57,6 +58,7 @@ public class GSplitFrame extends JInternalFrame */ public GSplitFrame(GAlignFrame top, GAlignFrame bottom) { + setName(Jalview.getAppID("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); @@ -111,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); } } @@ -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)