@Override
public void actionPerformed(ActionEvent e)
{
- promptForTDBFetch();
+ promptForTDBFetch(false);
}
});
updateCurrentView();
}
- private void promptForTDBFetch()
+ /**
+ * raises dialog for Uniprot fetch followed by 3D beacons search
+ * @param ignoreGui - when true, don't ask, just fetch
+ */
+ public void promptForTDBFetch(boolean ignoreGui)
{
final long progressId = System.currentTimeMillis();
// redo initial discovery - this time with 3d beacons
// Executors.
previousWantedFields=null;
+ lastSelected=(FilterOption) cmb_filterOption.getSelectedItem();
+ cmb_filterOption.setSelectedItem(null);
+ cachedPDBExists=false; // reset to initial
initialStructureDiscovery();
if (!isStructuresDiscovered())
{
btn_queryTDB.setToolTipText(MessageManager.getString("status.no_structures_discovered_from_3d_beacons"));
btn_queryTDB.setEnabled(false);
} else {
+ cmb_filterOption.setSelectedIndex(0); // select 'best'
btn_queryTDB.setVisible(false);
progressBar.setProgressBar(null, progressId);
}
}
};
};
+ if (ignoreGui)
+ {
+ Executors.defaultThreadFactory().newThread(discoverCanonicalDBrefs).start();
+ return;
+ }
// need cancel and no to result in the discoverPDB action - mocked is
- // 'cancel'
+ // 'cancel' TODO: mock should be OK
JvOptionPane.newOptionDialog(this)
.setResponseHandler(JvOptionPane.OK_OPTION,
discoverCanonicalDBrefs)