From 1b0124237cbc666219ec85a6acefbd57d1e00a9d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 5 Apr 2018 14:28:10 +0100 Subject: [PATCH] JAL-2944 combo box to pick which viewer to load structures into --- src/jalview/jbgui/GStructureChooser.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java index 9bcaa5a..9c7ba6d 100644 --- a/src/jalview/jbgui/GStructureChooser.java +++ b/src/jalview/jbgui/GStructureChooser.java @@ -29,6 +29,7 @@ import jalview.fts.service.pdb.PDBFTSRestClient; import jalview.gui.AlignmentPanel; import jalview.gui.Desktop; import jalview.gui.JvSwingUtils; +import jalview.gui.StructureViewer; import jalview.util.MessageManager; import java.awt.BorderLayout; @@ -70,6 +71,8 @@ import javax.swing.event.DocumentListener; import javax.swing.event.InternalFrameEvent; import javax.swing.table.TableColumn; +import net.miginfocom.swing.MigLayout; + @SuppressWarnings("serial") /** * GUI layout for structure chooser @@ -108,7 +111,7 @@ public abstract class GStructureChooser extends JPanel protected JTextField txt_search = new JTextField(14); - private JPanel pnl_actions = new JPanel(); + private JPanel pnl_actions = new JPanel(new MigLayout()); private JPanel pnl_main = new JPanel(); @@ -165,6 +168,8 @@ public abstract class GStructureChooser extends JPanel protected static final String VIEWS_ENTER_ID = "VIEWS_ENTER_ID"; + protected JComboBox targetView = new JComboBox(); + /** * 'cached' structure view */ @@ -514,6 +519,8 @@ public abstract class GStructureChooser extends JPanel chk_invertFilter.addItemListener(this); + targetView.setVisible(false); + pnl_actions.add(targetView,"wrap"); pnl_actions.add(chk_rememberSettings); pnl_actions.add(btn_view); pnl_actions.add(btn_cancel); -- 1.7.10.2