database.addItem("EMBL");\r
database.addItem("EMBLCDS");\r
database.addItem("PDB");\r
+ database.addItem("PFAM");\r
\r
try\r
{\r
\r
private String getFrameTitle()\r
{\r
- return ( (alignFrame == null) ? "New " : "Additional ") +\r
- "Sequence Fetcher (WSDBfetch@EBI)";\r
+ return ( (alignFrame == null) ? "New " : "Additional ") + "Sequence Fetcher";\r
}\r
\r
private void jbInit()\r
\r
public void ok_actionPerformed(ActionEvent e)\r
{\r
- frame.setTitle("Sequence Fetcher (WSDBfetch@EBI) - Fetching Sequence...");\r
database.setEnabled(false);\r
textfield.setEnabled(false);\r
ok.setEnabled(false);\r
textfield.setEnabled(true);\r
ok.setEnabled(true);\r
close.setEnabled(true);\r
- frame.setTitle(getFrameTitle());\r
}\r
\r
public void run()\r
if (result.length()>0)\r
parseResult(result.toString());\r
}\r
+ else if( database.getSelectedItem().equals("PFAM"))\r
+ {\r
+ try{\r
+ result.append(new FastaFile(\r
+ "http://www.sanger.ac.uk/cgi-bin/Pfam/getalignment.pl?format=fal&acc="\r
+ + textfield.getText().toUpperCase(), "URL").print()\r
+ );\r
+\r
+ if(result.length()>0)\r
+ parseResult( result.toString() );\r
+\r
+ }catch(java.io.IOException ex)\r
+ { result = null; }\r
+ }\r
\r
if (result == null || result.length() == 0)\r
showErrorMessage("Error retrieving " + textfield.getText()\r
+ " from " + database.getSelectedItem());\r
- else\r
- textfield.setText("");\r
+\r
resetDialog();\r
+ return;\r
}\r
\r
void getUniprotFile(String id)\r
\r
void showErrorMessage(String error)\r
{\r
+ resetDialog();\r
JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
error, "Error Retrieving Data",\r
JOptionPane.WARNING_MESSAGE);\r
+ return;\r
}\r
}\r
\r