From: Jim Procter Date: Mon, 5 Feb 2018 16:39:20 +0000 (+0000) Subject: JAL-2780 JAL-2781 programmatically select structures for retrieval via Structure... X-Git-Tag: Release_2_10_4~68^2~38 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=49f245495c2c3747bd3db8ff137f7acfec49d768;p=jalview.git JAL-2780 JAL-2781 programmatically select structures for retrieval via Structure Chooser GUI --- 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