JAL-3829 open web page for 3d beacons structure by right-clicking and selecting pop...
[jalview.git] / src / jalview / gui / structurechooser / ThreeDBStructureChooserQuerySource.java
index 5a7f7d5..cdf456c 100644 (file)
@@ -550,4 +550,20 @@ public class ThreeDBStructureChooserQuerySource
     return upResponse;
   }
 
+  public TDB_FTSData getFTSDataFor(JTable restable, int selectedRow,
+          Collection<FTSData> discoveredStructuresSet)
+  {
+    int idColumnIndex = restable.getColumn("Model id").getModelIndex();
+    
+    String modelId = (String) restable.getValueAt(selectedRow, idColumnIndex);
+    for (FTSData row:discoveredStructuresSet)
+    {
+      if (row instanceof TDB_FTSData && ((TDB_FTSData)row).getModelId().equals(modelId))
+      {
+        return ((TDB_FTSData)row);
+      }
+    }
+    return null;
+  }
+
 }
\ No newline at end of file