private static Thread initingThread = null;
- int x = 0;
+ int debounceTrap = 0;
/**
* Blocking method that initialises and returns the shared instance of the
* SequenceFetcher client
@Override
public void actionPerformed(ActionEvent e)
{
- x++;
+ debounceTrap++;
String currentSelection = database.getSelectedItem();
if (!currentSelection.equalsIgnoreCase("pdb"))
{
otherSourceAction();
}
- if (currentSelection.equalsIgnoreCase("pdb") && ((x % 2) == 0))
+ if (currentSelection.equalsIgnoreCase("pdb") && ((debounceTrap % 2) == 0))
{
- frame.dispose();
- new EBIFetchPanel();
+ pdbSourceAction();
}
}
}
- private void hideX()
+ private void pdbSourceAction()
{
- this.setVisible(false);
+ databaseButt.setText(database.getSelectedItem());
+ new EBIFetchPanel(this);
+ frame.dispose();
}
+
private void otherSourceAction()
{
try