JAL-2944 combo box to pick which viewer to load structures into
authorJim Procter <jprocter@issues.jalview.org>
Thu, 5 Apr 2018 13:28:10 +0000 (14:28 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 5 Apr 2018 13:28:10 +0000 (14:28 +0100)
src/jalview/jbgui/GStructureChooser.java

index 9bcaa5a..9c7ba6d 100644 (file)
@@ -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<StructureViewer> 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);