From: hansonr Date: Wed, 25 Jul 2018 07:11:13 +0000 (-0500) Subject: JAL-3026 Java 8 upgrade and JTabbedPane X-Git-Tag: Release_2_11_4_0~45^2~18^2~502 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=625884eca41794778f0a67af80a98138ce785756;p=jalview.git JAL-3026 Java 8 upgrade and JTabbedPane --- diff --git a/src/jalview/fts/core/GFTSPanel.java b/src/jalview/fts/core/GFTSPanel.java index 57bad5d..b0ab8c6 100644 --- a/src/jalview/fts/core/GFTSPanel.java +++ b/src/jalview/fts/core/GFTSPanel.java @@ -89,7 +89,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI protected JInternalFrame mainFrame = new JInternalFrame( getFTSFrameTitle()); - protected JTabbedPane tabs = jalview.jbgui.swing.JTabbedPane.createTabbedPane(); + protected JTabbedPane tabs = jalview.jbgui.GDesktop.createTabbedPane(); protected IProgressIndicator progressIndicator; @@ -132,7 +132,7 @@ public abstract class GFTSPanel extends JPanel implements GFTSPanelI protected JLabel lbl_blank = new JLabel(balnkPlaceholderImage); - private JTabbedPane tabbedPane = jalview.jbgui.swing.JTabbedPane.createTabbedPane(); + private JTabbedPane tabbedPane = jalview.jbgui.GDesktop.createTabbedPane(); private JPanel pnl_actions = new JPanel(); diff --git a/src/jalview/gui/WebserviceInfo.java b/src/jalview/gui/WebserviceInfo.java index 598c4af..ca45407 100644 --- a/src/jalview/gui/WebserviceInfo.java +++ b/src/jalview/gui/WebserviceInfo.java @@ -216,7 +216,7 @@ public class WebserviceInfo extends GWebserviceInfo // revert to a tabbed pane. JScrollPane firstpane; this.remove(firstpane = (JScrollPane) jobPanes.get(0)); - subjobs = jalview.jbgui.swing.JTabbedPane.createTabbedPane(); + subjobs = jalview.jbgui.GDesktop.createTabbedPane(); this.add(subjobs, BorderLayout.CENTER); subjobs.add(firstpane); subjobs.setTitleAt(0, firstpane.getName()); diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java index 5ac592b..4d8272b 100755 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@ -295,7 +295,7 @@ public class GPreferences extends JPanel */ private void jbInit() throws Exception { - final JTabbedPane tabbedPane = jalview.jbgui.swing.JTabbedPane.createTabbedPane(); + final JTabbedPane tabbedPane = jalview.jbgui.GDesktop.createTabbedPane(); this.setLayout(new BorderLayout()); JPanel okCancelPanel = initOkCancelPanel(); this.add(tabbedPane, BorderLayout.CENTER); diff --git a/src/jalview/jbgui/GRestServiceEditorPane.java b/src/jalview/jbgui/GRestServiceEditorPane.java index 0df8192..b5baa2d 100644 --- a/src/jalview/jbgui/GRestServiceEditorPane.java +++ b/src/jalview/jbgui/GRestServiceEditorPane.java @@ -98,7 +98,7 @@ public class GRestServiceEditorPane extends JPanel paste.setLayout( new MigLayout("", "[grow 100, fill]", "[][grow 100,fill]")); - panels = jalview.jbgui.swing.JTabbedPane.createTabbedPane(); + panels = jalview.jbgui.GDesktop.createTabbedPane(); panels.addTab(details.getName(), details); panels.addTab(inputs.getName(), inputs); panels.addTab(paste.getName(), paste); diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java index 489dc01..768051f 100644 --- a/src/jalview/jbgui/GStructureChooser.java +++ b/src/jalview/jbgui/GStructureChooser.java @@ -157,7 +157,7 @@ public abstract class GStructureChooser extends JPanel protected JTable tbl_local_pdb = new JTable(); - protected JTabbedPane pnl_filter = jalview.jbgui.swing.JTabbedPane.createTabbedPane(); + protected JTabbedPane pnl_filter = jalview.jbgui.GDesktop.createTabbedPane(); protected FTSDataColumnPreferences pdbDocFieldPrefs = new FTSDataColumnPreferences( PreferenceSource.STRUCTURE_CHOOSER, @@ -255,6 +255,7 @@ public abstract class GStructureChooser extends JPanel mainFrame.pack(); } catch (Exception e) { + System.out.println(e); // for JavaScript TypeError e.printStackTrace(); } } diff --git a/src/jalview/jbgui/swing/JTabbedPane.java b/src/jalview/jbgui/swing/JTabbedPane.java index b1c0bd8..0955e39 100644 --- a/src/jalview/jbgui/swing/JTabbedPane.java +++ b/src/jalview/jbgui/swing/JTabbedPane.java @@ -23,20 +23,8 @@ import javajs.util.Lst; public class JTabbedPane extends JPanel { - @SuppressWarnings("unused") - public static javax.swing.JTabbedPane createTabbedPane() - { - // BH 2018 coercing jalview.jbgui.swing.JTabbedPane() for now - if (/** @j2sNative false && */ - true) - { - // Java - return new javax.swing.JTabbedPane(); - } - // JavaScript - return (javax.swing.JTabbedPane) (Object) new jalview.jbgui.swing.JTabbedPane(); - } - + // no longer necessary + private JPanel pagePanel; private JComboBox tabs; diff --git a/swingjs/SwingJS-site.zip b/swingjs/SwingJS-site.zip index 75ddf93..5265f00 100644 Binary files a/swingjs/SwingJS-site.zip and b/swingjs/SwingJS-site.zip differ diff --git a/swingjs/ver/3.2.1/SwingJS-site.zip b/swingjs/ver/3.2.1/SwingJS-site.zip index 75ddf93..5265f00 100644 Binary files a/swingjs/ver/3.2.1/SwingJS-site.zip and b/swingjs/ver/3.2.1/SwingJS-site.zip differ