+ delayAndEnableActionButtons();
+
+ }
+
+ private void disableActionButtons()
+ {
+ btn_ok.setEnabled(false);
+ btn_back.setEnabled(false);
+ btn_cancel.setEnabled(false);
+ }
+
+ private void delayAndEnableActionButtons()
+ {
+ new Thread()
+ {
+ @Override
+ public void run()
+ {
+ try
+ {
+ Thread.sleep(1500);
+ } catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ btn_ok.setEnabled(true);
+ btn_back.setEnabled(true);
+ btn_cancel.setEnabled(true);
+ }
+ }.start();
+ }
+
+ public static String getPDBIdwithSpecifiedChain(String pdbId,
+ String searchTerm)
+ {
+ String pdbIdWithChainCode = "";
+ if (searchTerm.contains(";"))
+ {
+ String[] foundTerms = searchTerm.split(";");
+ for (String foundTerm : foundTerms)
+ {
+ if (foundTerm.contains(pdbId))
+ {
+ pdbIdWithChainCode = foundTerm;
+ }
+ }
+ }
+ else if (searchTerm.contains(pdbId))
+ {
+ pdbIdWithChainCode = searchTerm;
+ }
+ else
+ {
+ pdbIdWithChainCode = pdbId;
+ }
+ return pdbIdWithChainCode;