2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 import jalview.api.FeatureSettingsModelI;
24 import jalview.bin.Cache;
25 import jalview.datamodel.AlignmentI;
26 import jalview.datamodel.DBRefEntry;
27 import jalview.datamodel.SequenceFeature;
28 import jalview.datamodel.SequenceI;
29 import jalview.fts.service.pdb.PDBFTSPanel;
30 import jalview.fts.service.uniprot.UniprotFTSPanel;
31 import jalview.io.gff.SequenceOntologyI;
32 import jalview.util.DBRefUtils;
33 import jalview.util.MessageManager;
34 import jalview.util.Platform;
35 import jalview.ws.dbsources.das.api.DasSourceRegistryI;
36 import jalview.ws.seqfetcher.DbSourceProxy;
38 import java.awt.BorderLayout;
40 import java.awt.event.ActionEvent;
41 import java.awt.event.ActionListener;
42 import java.awt.event.KeyAdapter;
43 import java.awt.event.KeyEvent;
44 import java.util.ArrayList;
45 import java.util.Arrays;
46 import java.util.Collections;
47 import java.util.Iterator;
48 import java.util.List;
50 import javax.swing.JButton;
51 import javax.swing.JCheckBox;
52 import javax.swing.JInternalFrame;
53 import javax.swing.JLabel;
54 import javax.swing.JOptionPane;
55 import javax.swing.JPanel;
56 import javax.swing.JScrollPane;
57 import javax.swing.JTextArea;
58 import javax.swing.SwingConstants;
59 import javax.swing.tree.DefaultMutableTreeNode;
61 public class SequenceFetcher extends JPanel implements Runnable
63 JLabel dbeg = new JLabel();
65 JDatabaseTree database;
69 JLabel jLabel1 = new JLabel();
71 JCheckBox replacePunctuation = new JCheckBox();
73 JButton ok = new JButton();
75 JButton clear = new JButton();
77 JButton example = new JButton();
79 JButton close = new JButton();
81 JPanel jPanel1 = new JPanel();
83 JTextArea textArea = new JTextArea();
85 JScrollPane jScrollPane1 = new JScrollPane();
87 JPanel jPanel2 = new JPanel();
89 JPanel jPanel3 = new JPanel();
91 JPanel jPanel4 = new JPanel();
93 BorderLayout borderLayout1 = new BorderLayout();
95 BorderLayout borderLayout2 = new BorderLayout();
97 BorderLayout borderLayout3 = new BorderLayout();
101 IProgressIndicator guiWindow;
103 AlignFrame alignFrame;
107 final String noDbSelected = "-- Select Database --";
109 private static jalview.ws.SequenceFetcher sfetch = null;
111 private static long lastDasSourceRegistry = -3;
113 private static DasSourceRegistryI dasRegistry = null;
115 private static boolean _initingFetcher = false;
117 private static Thread initingThread = null;
119 int debounceTrap = 0;
121 public JTextArea getTextArea()
127 * Blocking method that initialises and returns the shared instance of the
128 * SequenceFetcher client
131 * - where the initialisation delay message should be shown
132 * @return the singleton instance of the sequence fetcher client
134 public static jalview.ws.SequenceFetcher getSequenceFetcherSingleton(
135 final IProgressIndicator guiWindow)
137 if (_initingFetcher && initingThread != null && initingThread.isAlive())
139 if (guiWindow != null)
144 .getString("status.waiting_sequence_database_fetchers_init"),
145 Thread.currentThread().hashCode());
147 // initting happening on another thread - so wait around to see if it
149 while (_initingFetcher && initingThread != null
150 && initingThread.isAlive())
155 } catch (Exception e)
160 if (guiWindow != null)
165 .getString("status.waiting_sequence_database_fetchers_init"),
166 Thread.currentThread().hashCode());
170 || dasRegistry != Cache.getDasSourceRegistry()
171 || lastDasSourceRegistry != (Cache.getDasSourceRegistry()
172 .getDasRegistryURL() + Cache
173 .getDasSourceRegistry().getLocalSourceString())
176 _initingFetcher = true;
177 initingThread = Thread.currentThread();
179 * give a visual indication that sequence fetcher construction is occuring
181 if (guiWindow != null)
183 guiWindow.setProgressBar(MessageManager
184 .getString("status.init_sequence_database_fetchers"),
185 Thread.currentThread().hashCode());
187 dasRegistry = Cache.getDasSourceRegistry();
188 dasRegistry.refreshSources();
190 jalview.ws.SequenceFetcher sf = new jalview.ws.SequenceFetcher();
191 if (guiWindow != null)
193 guiWindow.setProgressBar(null, Thread.currentThread().hashCode());
195 lastDasSourceRegistry = (dasRegistry.getDasRegistryURL() + dasRegistry
196 .getLocalSourceString()).hashCode();
198 _initingFetcher = false;
199 initingThread = null;
204 private IProgressIndicator progressIndicator;
206 private volatile boolean _isConstructing = false;
208 private List<AlignFrame> newAlframes = null;
210 public SequenceFetcher(IProgressIndicator guiIndic)
212 this(guiIndic, null, null);
215 public SequenceFetcher(IProgressIndicator guiIndic,
216 final String selectedDb, final String queryString)
218 this._isConstructing=true;
219 this.progressIndicator = guiIndic;
220 final SequenceFetcher us = this;
221 // launch initialiser thread
222 Thread sf = new Thread(new Runnable()
228 if (getSequenceFetcherSingleton(progressIndicator) != null)
230 us.initGui(progressIndicator, selectedDb, queryString);
231 us._isConstructing=false;
235 javax.swing.SwingUtilities.invokeLater(new Runnable()
241 .showInternalMessageDialog(
244 .getString("warn.couldnt_create_sequence_fetcher_client"),
246 .getString("label.couldnt_create_sequence_fetcher"),
247 JOptionPane.ERROR_MESSAGE);
251 // raise warning dialog
258 * blocking call which creates a new sequence fetcher panel, configures it and presses the OK button with the given database and query.
262 public static List<AlignFrame> fetchAndShow(String database, String query)
264 final SequenceFetcher sf = new SequenceFetcher(Desktop.instance, database, query);
265 while (sf._isConstructing)
267 try { Thread.sleep(50);
268 } catch (Exception q)
270 return Collections.emptyList();
273 sf.newAlframes = new ArrayList<AlignFrame>();
275 return sf.newAlframes;
278 private class DatabaseAuthority extends DefaultMutableTreeNode
283 private class DatabaseSource extends DefaultMutableTreeNode
289 * initialise the database and query for this fetcher panel
292 * - string that should correspond to a sequence fetcher
294 * - string that will be entered in the query dialog
295 * @return true if UI was configured with valid database and query string
297 protected boolean setInitialQuery(String selectedDb, String queryString)
299 if (selectedDb == null || selectedDb.trim().length() == 0)
305 List<DbSourceProxy> sp = sfetch.getSourceProxy(selectedDb);
306 if (sp == null || sp.size() != 1)
308 System.err.println("Ignoring fetch parameter db='" + selectedDb
312 database.selection = sp;
313 textArea.setText(queryString);
314 } catch (Exception q)
316 System.err.println("Ignoring fetch parameter db='" + selectedDb
317 + "' and query='" + queryString + "'");
324 * called by thread spawned by constructor
330 private void initGui(IProgressIndicator guiWindow, String selectedDb,
333 this.guiWindow = guiWindow;
334 if (guiWindow instanceof AlignFrame)
336 alignFrame = (AlignFrame) guiWindow;
338 database = new JDatabaseTree(sfetch);
343 * configure the UI with any query parameters we were called with
345 if (!setInitialQuery(selectedDb, queryString))
348 * none provided, so show the database chooser
350 database.waitForInput();
352 } catch (Exception ex)
354 ex.printStackTrace();
357 frame = new JInternalFrame();
358 frame.setContentPane(this);
359 if (Platform.isAMac())
361 Desktop.addInternalFrame(frame, getFrameTitle(), false, 400, 240);
365 Desktop.addInternalFrame(frame, getFrameTitle(), false, 400, 180);
369 private String getFrameTitle()
371 return ((alignFrame == null) ? MessageManager
372 .getString("label.new_sequence_fetcher") : MessageManager
373 .getString("label.additional_sequence_fetcher"));
376 private void jbInit() throws Exception
378 this.setLayout(borderLayout2);
380 database.setFont(JvSwingUtils.getLabelFont());
381 dbeg.setFont(new java.awt.Font("Verdana", Font.BOLD, 11));
382 jLabel1.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
383 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
384 jLabel1.setText(MessageManager
385 .getString("label.separate_multiple_accession_ids"));
387 replacePunctuation.setHorizontalAlignment(SwingConstants.CENTER);
389 .setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
390 replacePunctuation.setText(MessageManager
391 .getString("label.replace_commas_semicolons"));
392 ok.setText(MessageManager.getString("action.ok"));
393 ok.addActionListener(new ActionListener()
396 public void actionPerformed(ActionEvent e)
398 ok_actionPerformed();
401 clear.setText(MessageManager.getString("action.clear"));
402 clear.addActionListener(new ActionListener()
405 public void actionPerformed(ActionEvent e)
407 clear_actionPerformed();
411 example.setText(MessageManager.getString("label.example"));
412 example.addActionListener(new ActionListener()
415 public void actionPerformed(ActionEvent e)
417 example_actionPerformed();
420 close.setText(MessageManager.getString("action.close"));
421 close.addActionListener(new ActionListener()
424 public void actionPerformed(ActionEvent e)
426 close_actionPerformed(e);
429 textArea.setFont(JvSwingUtils.getLabelFont());
430 textArea.setLineWrap(true);
431 textArea.addKeyListener(new KeyAdapter()
434 public void keyPressed(KeyEvent e)
436 if (e.getKeyCode() == KeyEvent.VK_ENTER)
438 ok_actionPerformed();
442 jPanel3.setLayout(borderLayout1);
443 borderLayout1.setVgap(5);
445 jPanel1.add(example);
448 jPanel3.add(jPanel2, java.awt.BorderLayout.CENTER);
449 jPanel2.setLayout(borderLayout3);
450 databaseButt = /*database.getDatabaseSelectorButton();
451 final JButton viewdbs =*/new JButton(
452 MessageManager.getString("action.select_ddbb"));
453 databaseButt.addActionListener(new ActionListener()
457 public void actionPerformed(ActionEvent arg0)
460 database.showDialog();
463 databaseButt.setFont(JvSwingUtils.getLabelFont());
464 database.addActionListener(new ActionListener()
467 public void actionPerformed(ActionEvent e)
470 String currentSelection = database.getSelectedItem();
471 if (currentSelection == null)
473 close_actionPerformed(null);
478 if (currentSelection.equalsIgnoreCase("pdb")
479 && (database.action == KeyEvent.VK_ENTER || ((debounceTrap % 2) == 0)))
483 else if (currentSelection.equalsIgnoreCase("uniprot")
484 && (database.action == KeyEvent.VK_ENTER || ((debounceTrap % 2) == 0)))
486 uniprotSourceAction();
492 database.action = -1;
497 jPanel2.add(databaseButt, java.awt.BorderLayout.NORTH);
498 jPanel2.add(dbeg, java.awt.BorderLayout.CENTER);
499 JPanel jPanel2a = new JPanel(new BorderLayout());
500 jPanel2a.add(jLabel1, java.awt.BorderLayout.NORTH);
501 jPanel2a.add(replacePunctuation, java.awt.BorderLayout.SOUTH);
502 jPanel2.add(jPanel2a, java.awt.BorderLayout.SOUTH);
503 // jPanel2.setPreferredSize(new Dimension())
504 jPanel3.add(jScrollPane1, java.awt.BorderLayout.CENTER);
505 this.add(jPanel1, java.awt.BorderLayout.SOUTH);
506 this.add(jPanel3, java.awt.BorderLayout.CENTER);
507 this.add(jPanel2, java.awt.BorderLayout.NORTH);
508 jScrollPane1.getViewport().add(textArea);
511 private void pdbSourceAction()
513 databaseButt.setText(database.getSelectedItem());
514 new PDBFTSPanel(this);
518 private void uniprotSourceAction()
520 databaseButt.setText(database.getSelectedItem());
521 new UniprotFTSPanel(this);
524 private void otherSourceAction()
528 databaseButt.setText(database.getSelectedItem()
529 + (database.getSelectedSources().size() > 1 ? " (and "
530 + database.getSelectedSources().size() + " others)"
532 String eq = database.getExampleQueries();
533 dbeg.setText(MessageManager.formatMessage(
534 "label.example_query_param", new String[] { eq }));
535 boolean enablePunct = !(eq != null && eq.indexOf(",") > -1);
536 for (DbSourceProxy dbs : database.getSelectedSources())
538 if (dbs instanceof jalview.ws.dbsources.das.datamodel.DasSequenceSource)
544 replacePunctuation.setEnabled(enablePunct);
546 } catch (Exception ex)
549 replacePunctuation.setEnabled(true);
554 protected void example_actionPerformed()
556 DbSourceProxy db = null;
559 textArea.setText(database.getExampleQueries());
560 } catch (Exception ex)
566 protected void clear_actionPerformed()
568 textArea.setText("");
572 public void close_actionPerformed(ActionEvent e)
576 frame.setClosed(true);
577 } catch (Exception ex)
582 public void ok_actionPerformed()
584 databaseButt.setEnabled(false);
585 example.setEnabled(false);
586 textArea.setEnabled(false);
587 ok.setEnabled(false);
588 close.setEnabled(false);
590 Thread worker = new Thread(this);
594 private void resetDialog()
596 databaseButt.setEnabled(true);
597 example.setEnabled(true);
598 textArea.setEnabled(true);
600 close.setEnabled(true);
607 if (!database.hasSelection())
609 error += "Please select the source database\n";
611 // TODO: make this transformation more configurable
612 com.stevesoft.pat.Regex empty;
613 if (replacePunctuation.isEnabled() && replacePunctuation.isSelected())
615 empty = new com.stevesoft.pat.Regex(
616 // replace commas and spaces with a semicolon
617 "(\\s|[,; ])+", ";");
621 // just turn spaces and semicolons into single semicolons
622 empty = new com.stevesoft.pat.Regex("(\\s|[; ])+", ";");
624 textArea.setText(empty.replaceAll(textArea.getText()));
625 // see if there's anthing to search with
626 if (!new com.stevesoft.pat.Regex("[A-Za-z0-9_.]").search(textArea
629 error += "Please enter a (semi-colon separated list of) database id(s)";
631 if (error.length() > 0)
633 showErrorMessage(error);
637 // TODO: Refactor to GUI independent code and write tests.
638 // indicate if successive sources should be merged into one alignment.
639 boolean addToLast = false;
640 List<String> aresultq = new ArrayList<String>();
641 List<String> presultTitle = new ArrayList<String>();
642 List<AlignmentI> presult = new ArrayList<AlignmentI>();
643 List<AlignmentI> aresult = new ArrayList<AlignmentI>();
644 Iterator<DbSourceProxy> proxies = database.getSelectedSources()
647 List<String> nextFetch = Arrays.asList(qries = textArea.getText()
649 Iterator<String> en = Arrays.asList(new String[0]).iterator();
650 int nqueries = qries.length;
652 FeatureSettingsModelI preferredFeatureColours = null;
653 while (proxies.hasNext() && (en.hasNext() || nextFetch.size() > 0))
655 if (!en.hasNext() && nextFetch.size() > 0)
657 en = nextFetch.iterator();
658 nqueries = nextFetch.size();
659 // save the remaining queries in the original array
660 qries = nextFetch.toArray(new String[nqueries]);
661 nextFetch = new ArrayList<String>();
664 DbSourceProxy proxy = proxies.next();
669 .setProgressBar(MessageManager.formatMessage(
670 "status.fetching_sequence_queries_from",
672 Integer.valueOf(nqueries).toString(),
673 proxy.getDbName() }), Thread.currentThread()
675 if (proxy.getMaximumQueryCount() == 1)
678 * proxy only handles one accession id at a time
682 String acc = en.next();
683 if (!fetchSingleAccession(proxy, acc, aresultq, aresult))
692 * proxy can fetch multiple accessions at one time
694 fetchMultipleAccessions(proxy, en, aresultq, aresult, nextFetch);
696 } catch (Exception e)
698 showErrorMessage("Error retrieving " + textArea.getText()
699 + " from " + database.getSelectedItem());
701 // +="Couldn't retrieve sequences from "+database.getSelectedItem();
702 System.err.println("Retrieval failed for source ='"
703 + database.getSelectedItem() + "' and query\n'"
704 + textArea.getText() + "'\n");
706 } catch (OutOfMemoryError e)
708 showErrorMessage("Out of Memory when retrieving "
711 + database.getSelectedItem()
712 + "\nPlease see the Jalview FAQ for instructions for increasing the memory available to Jalview.\n");
716 showErrorMessage("Serious Error retrieving " + textArea.getText()
717 + " from " + database.getSelectedItem());
721 // Stack results ready for opening in alignment windows
722 if (aresult != null && aresult.size() > 0)
724 FeatureSettingsModelI proxyColourScheme = proxy
725 .getFeatureColourScheme();
726 if (proxyColourScheme != null)
728 preferredFeatureColours = proxyColourScheme;
731 AlignmentI ar = null;
732 if (proxy.isAlignmentSource())
735 // new window for each result
736 while (aresult.size() > 0)
738 presult.add(aresult.remove(0));
739 presultTitle.add(aresultq.remove(0) + " "
740 + getDefaultRetrievalTitle());
746 if (addToLast && presult.size() > 0)
748 ar = presult.remove(presult.size() - 1);
749 titl = presultTitle.remove(presultTitle.size() - 1);
751 // concatenate all results in one window
752 while (aresult.size() > 0)
756 ar = aresult.remove(0);
760 ar.append(aresult.remove(0));
765 presultTitle.add(titl);
768 guiWindow.setProgressBar(MessageManager
769 .getString("status.finshed_querying"), Thread.currentThread()
772 guiWindow.setProgressBar(
773 (presult.size() > 0) ? MessageManager
774 .getString("status.parsing_results") : MessageManager
775 .getString("status.processing"), Thread.currentThread()
778 while (presult.size() > 0)
780 parseResult(presult.remove(0), presultTitle.remove(0), null,
781 preferredFeatureColours);
783 // only remove visual delay after we finished parsing.
784 guiWindow.setProgressBar(null, Thread.currentThread().hashCode());
785 if (nextFetch.size() > 0)
787 StringBuffer sb = new StringBuffer();
788 sb.append("Didn't retrieve the following "
789 + (nextFetch.size() == 1 ? "query" : nextFetch.size()
790 + " queries") + ": \n");
791 int l = sb.length(), lr = 0;
792 for (String s : nextFetch)
794 if (l != sb.length())
798 if (lr - sb.length() > 40)
804 showErrorMessage(sb.toString());
810 * Tries to fetch one or more accession ids from the database proxy
814 * the queries to fetch
816 * a successful queries list to add to
818 * a list of retrieved alignments to add to
820 * failed queries are added to this list
823 void fetchMultipleAccessions(DbSourceProxy proxy,
824 Iterator<String> accessions, List<String> aresultq,
825 List<AlignmentI> aresult, List<String> nextFetch)
828 StringBuilder multiacc = new StringBuilder();
829 List<String> tosend = new ArrayList<String>();
830 while (accessions.hasNext())
832 String nel = accessions.next();
834 multiacc.append(nel);
835 if (accessions.hasNext())
837 multiacc.append(proxy.getAccessionSeparator());
843 String query = multiacc.toString();
844 AlignmentI rslt = proxy.getSequenceRecords(query);
845 if (rslt == null || rslt.getHeight() == 0)
847 // no results - pass on all queries to next source
848 nextFetch.addAll(tosend);
854 if (tosend.size() > 1)
856 checkResultForQueries(rslt, tosend, nextFetch, proxy);
859 } catch (OutOfMemoryError oome)
861 new OOMWarning("fetching " + multiacc + " from "
862 + database.getSelectedItem(), oome, this);
867 * Query for a single accession id via the database proxy
872 * a list of successful queries to add to
874 * a list of retrieved alignments to add to
875 * @return true if the fetch was successful, else false
877 boolean fetchSingleAccession(DbSourceProxy proxy, String accession,
878 List<String> aresultq, List<AlignmentI> aresult)
880 boolean success = false;
887 // give the server a chance to breathe
889 } catch (Exception e)
895 AlignmentI indres = null;
898 indres = proxy.getSequenceRecords(accession);
899 } catch (OutOfMemoryError oome)
901 new OOMWarning("fetching " + accession + " from "
902 + proxy.getDbName(), oome, this);
906 aresultq.add(accession);
910 } catch (Exception e)
913 "Error retrieving " + accession
914 + " from " + proxy.getDbName(), e);
920 * Checks which of the queries were successfully retrieved by searching the
921 * DBRefs of the retrieved sequences for a match. Any not found are added to
922 * the 'nextFetch' list.
929 void checkResultForQueries(AlignmentI rslt, List<String> queries,
930 List<String> nextFetch, DbSourceProxy proxy)
932 SequenceI[] rs = rslt.getSequencesArray();
934 for (String q : queries)
936 DBRefEntry dbr = new DBRefEntry();
937 dbr.setSource(proxy.getDbSource());
938 dbr.setVersion(null);
939 String accId = proxy.getAccessionIdFromQuery(q);
940 dbr.setAccessionId(accId);
941 boolean rfound = false;
942 for (int r = 0; r < rs.length; r++)
946 List<DBRefEntry> found = DBRefUtils.searchRefs(rs[r].getDBRefs(),
948 if (!found.isEmpty())
964 * @return a standard title for any results retrieved using the currently
965 * selected source and settings
967 public String getDefaultRetrievalTitle()
969 return "Retrieved from " + database.getSelectedItem();
972 AlignmentI parseResult(AlignmentI al, String title,
973 String currentFileFormat,
974 FeatureSettingsModelI preferredFeatureColours)
977 if (al != null && al.getHeight() > 0)
981 title = getDefaultRetrievalTitle();
983 if (alignFrame == null)
985 AlignFrame af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
986 AlignFrame.DEFAULT_HEIGHT);
987 if (currentFileFormat != null)
989 af.currentFileFormat = currentFileFormat; // WHAT IS THE DEFAULT
991 // NON-FormatAdapter Sourced
995 SequenceFeature[] sfs = null;
996 List<SequenceI> alsqs;
997 synchronized (alsqs = al.getSequences())
999 for (SequenceI sq : alsqs)
1001 if ((sfs = sq.getSequenceFeatures()) != null)
1005 af.setShowSeqFeatures(true);
1013 if (preferredFeatureColours != null)
1015 af.getViewport().applyFeaturesStyle(preferredFeatureColours);
1017 if (Cache.getDefault("HIDE_INTRONS", true))
1019 af.hideFeatureColumns(SequenceOntologyI.EXON, false);
1021 if (newAlframes != null)
1023 newAlframes.add(af);
1025 Desktop.addInternalFrame(af, title, AlignFrame.DEFAULT_WIDTH,
1026 AlignFrame.DEFAULT_HEIGHT);
1028 af.statusBar.setText(MessageManager
1029 .getString("label.successfully_pasted_alignment_file"));
1033 af.setMaximum(Cache.getDefault("SHOW_FULLSCREEN",
1035 } catch (Exception ex)
1041 alignFrame.viewport.addAlignment(al, title);
1047 void showErrorMessage(final String error)
1050 javax.swing.SwingUtilities.invokeLater(new Runnable()
1055 JOptionPane.showInternalMessageDialog(Desktop.desktop, error,
1056 MessageManager.getString("label.error_retrieving_data"),
1057 JOptionPane.WARNING_MESSAGE);
1062 public IProgressIndicator getProgressIndicator()
1064 return progressIndicator;
1067 public void setProgressIndicator(IProgressIndicator progressIndicator)
1069 this.progressIndicator = progressIndicator;
1073 * Make this panel visible (after a selection has been made in the database
1078 frame.setVisible(true);
1082 * Hide this panel (on clicking the database button to open the database
1087 frame.setVisible(false);