private static Thread initingThread = null;
- int debounceTrap = 0;
-
public JTextArea getTextArea()
{
return textArea;
jPanel1.add(example);
jPanel1.add(clear);
jPanel1.add(close);
- jPanel3.add(jPanel2, java.awt.BorderLayout.CENTER);
jPanel2.setLayout(borderLayout3);
databaseButt = /*database.getDatabaseSelectorButton();
final JButton viewdbs =*/new JButton(
@Override
public void actionPerformed(ActionEvent e)
{
- debounceTrap++;
String currentSelection = database.getSelectedItem();
if (currentSelection == null)
{
showPanel();
- if (currentSelection.equalsIgnoreCase("pdb")
- && (database.action == KeyEvent.VK_ENTER || ((debounceTrap % 2) == 0)))
+ if ("pdb".equalsIgnoreCase(currentSelection))
{
pdbSourceAction();
}
- else if (currentSelection.equalsIgnoreCase("uniprot")
- && (database.action == KeyEvent.VK_ENTER || ((debounceTrap % 2) == 0)))
+ else if ("uniprot".equalsIgnoreCase(currentSelection))
{
uniprotSourceAction();
}
Cache.log.info(
"Error retrieving " + accession
+ " from " + proxy.getDbName(), e);
- } finally
- {
- return success;
}
+ return success;
}
/**
for (String q : queries)
{
- DBRefEntry[] found = null;
DBRefEntry dbr = new DBRefEntry();
dbr.setSource(proxy.getDbSource());
dbr.setVersion(null);
{
if (rs[r] != null)
{
- found = DBRefUtils.searchRefs(rs[r].getDBRefs(), accId);
- if (found != null && found.length > 0)
+ List<DBRefEntry> found = DBRefUtils.searchRefs(rs[r].getDBRefs(),
+ accId);
+ if (!found.isEmpty())
{
rfound = true;
break;