From 49f245495c2c3747bd3db8ff137f7acfec49d768 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 5 Feb 2018 16:39:20 +0000 Subject: [PATCH] JAL-2780 JAL-2781 programmatically select structures for retrieval via Structure Chooser GUI --- src/jalview/gui/StructureChooser.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index 452677e..6e73724 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -53,6 +53,7 @@ import java.util.Vector; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JLabel; +import javax.swing.JTable; import javax.swing.table.AbstractTableModel; /** @@ -727,6 +728,32 @@ public class StructureChooser extends GStructureChooser } + public void selectStructure(String...pdbids) + { + FilterOption selectedFilterOpt = ((FilterOption) cmb_filterOption + .getSelectedItem()); + String currentView = selectedFilterOpt.getView(); + JTable restable = (currentView == VIEWS_FILTER) ? getResultTable() + : tbl_local_pdb; + + if (currentView == VIEWS_FILTER) + { + + int pdbIdColIndex = restable.getColumn("PDB Id") + .getModelIndex(); + for (int r = 0; r < restable.getRowCount(); r++) + { + for (int p=0;p