JAL-3032 make JS properties conditional on Jalview.isJS()
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 26 Nov 2018 10:44:56 +0000 (10:44 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 26 Nov 2018 10:44:56 +0000 (10:44 +0000)
src/jalview/gui/Desktop.java

index 12359d0..701d778 100644 (file)
@@ -376,9 +376,12 @@ public class Desktop extends jalview.jbgui.GDesktop
     
     // BH 2018 - just an experiment to try unclipped JInternalFrames. 
     // Must set for all three to be active:
-    getRootPane().putClientProperty("swingjs.overflow.hidden", "false");
-    ((JComponent)getContentPane()).putClientProperty("swingjs.overflow.hidden", "false");
-    desktop.putClientProperty("swingjs.overflow.hidden", "false");
+       if (Jalview.isJS()) 
+       {
+         getRootPane().putClientProperty("swingjs.overflow.hidden", "false");
+         ((JComponent) getContentPane()).putClientProperty("swingjs.overflow.hidden", "false");
+         desktop.putClientProperty("swingjs.overflow.hidden", "false");
+       }
     
     getContentPane().add(desktop, BorderLayout.CENTER);
     desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);