- try\r
- {\r
- af.setMaximum(Preferences.showFullscreen);\r
- }\r
- catch (Exception ex)\r
- {\r
- }\r
- }\r
- else\r
- {\r
- JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
- "Couldn't open file.\n" +\r
- "Formats currently supported are\n" +\r
- "Fasta, MSF, Clustal, BLC, PIR, MSP, and PFAM" // JBPNote - message should be generated through FormatAdapter!\r
- , "Error loading file", JOptionPane.WARNING_MESSAGE);\r
- }\r
- }\r
+\r
+ public void inputSequence_actionPerformed(ActionEvent e)\r
+ {\r
+ new SequenceFetcher(null);\r
+ }\r
+\r
+ JPanel progressPanel;\r
+\r
+ public void startLoading(final String fileName)\r
+ {\r
+ if (fileLoadingCount == 0)\r
+ {\r
+ progressPanel = new JPanel(new BorderLayout());\r
+ JProgressBar progressBar = new JProgressBar();\r
+ progressBar.setIndeterminate(true);\r
+\r
+ progressPanel.add(new JLabel("Loading File: " + fileName + " "),\r
+ BorderLayout.WEST);\r
+\r
+ progressPanel.add(progressBar, BorderLayout.CENTER);\r
+\r
+ instance.getContentPane().add(progressPanel, BorderLayout.SOUTH);\r
+ }\r
+ fileLoadingCount++;\r
+ validate();\r
+ }\r
+\r
+ public void stopLoading()\r
+ {\r
+ fileLoadingCount--;\r
+ if (fileLoadingCount < 1)\r
+ {\r
+ if(progressPanel!=null)\r
+ {\r
+ this.getContentPane().remove(progressPanel);\r
+ progressPanel = null;\r