{
private static final String AUTOSUPERIMPOSE = "AUTOSUPERIMPOSE";
- /**
- * transient combo box choice for initiating 3db fetch
- */
- private static final String VIEWS_QUERYING_TDB = "QUERY_3DB";
-
private SequenceI selectedSequence;
private SequenceI[] selectedSequences;
}
chk_superpose.setSelected(Cache.getDefault(AUTOSUPERIMPOSE, true));
+ btn_queryTDB.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ promptForTDBFetch();
+ }
+ });
Executors.defaultThreadFactory().newThread(new Runnable()
{
@Override
public void run()
{
- progressBar.setProgressBar("status.searching_3d_beacons", progressId);
+ mainFrame.setEnabled(false);
+ cmb_filterOption.setEnabled(false);
+ progressBar.setProgressBar(MessageManager.getString("status.searching_3d_beacons"), progressId);
// TODO: warn if no accessions discovered
populateSeqsWithoutSourceDBRef();
// redo initial discovery - this time with 3d beacons
initialStructureDiscovery();
if (!isStructuresDiscovered())
{
- progressBar.setProgressBar("status.no_structures_discovered_from_3d_beacons", progressId);
+ progressBar.setProgressBar(MessageManager.getString("status.no_structures_discovered_from_3d_beacons"), progressId);
+ btn_queryTDB.setToolTipText(MessageManager.getString("status.no_structures_discovered_from_3d_beacons"));
+ btn_queryTDB.setEnabled(false);
} else {
+ btn_queryTDB.setVisible(false);
progressBar.setProgressBar(null, progressId);
}
+ mainFrame.setEnabled(true);
+ cmb_filterOption.setEnabled(true);
}
};
"-", VIEWS_FROM_FILE, false, null));
if (canQueryTDB && notQueriedTDBYet)
{
- FilterOption queryTDBOption = new FilterOption(
- MessageManager.getString("label.search_3dbeacons"), "-",
- VIEWS_QUERYING_TDB, false, null);
- cmb_filterOption.addItem(queryTDBOption);
+ btn_queryTDB.setVisible(true);
}
if (cachedPDBExist)
FilterOption selectedFilterOpt = ((FilterOption) cmb_filterOption
.getSelectedItem());
- // first check if we need to rebuild dialog
- if (selectedFilterOpt.getView() == VIEWS_QUERYING_TDB)
- {
- promptForTDBFetch();
- return;
- }
if (lastSelected == selectedFilterOpt)
{
// don't need to do anything, probably