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;
205 private boolean _isConstructing=false;
207 private List<AlignFrame> newAlframes = null;
209 public SequenceFetcher(IProgressIndicator guiIndic)
211 this(guiIndic, null, null);
214 public SequenceFetcher(IProgressIndicator guiIndic,
215 final String selectedDb, final String queryString)
217 this._isConstructing=true;
218 this.progressIndicator = guiIndic;
219 final SequenceFetcher us = this;
220 // launch initialiser thread
221 Thread sf = new Thread(new Runnable()
227 if (getSequenceFetcherSingleton(progressIndicator) != null)
229 us.initGui(progressIndicator, selectedDb, queryString);
230 us._isConstructing=false;
234 javax.swing.SwingUtilities.invokeLater(new Runnable()
240 .showInternalMessageDialog(
243 .getString("warn.couldnt_create_sequence_fetcher_client"),
245 .getString("label.couldnt_create_sequence_fetcher"),
246 JOptionPane.ERROR_MESSAGE);
250 // raise warning dialog
257 * blocking call which creates a new sequence fetcher panel, configures it and presses the OK button with the given database and query.
261 public static List<AlignFrame> fetchAndShow(String database, String query)
263 final SequenceFetcher sf = new SequenceFetcher(Desktop.instance, database, query);
264 while (sf._isConstructing)
266 try { Thread.sleep(50);
267 } catch (Exception q)
269 return Collections.EMPTY_LIST;
272 sf.newAlframes = new ArrayList<AlignFrame>();
274 return sf.newAlframes;
277 private class DatabaseAuthority extends DefaultMutableTreeNode
282 private class DatabaseSource extends DefaultMutableTreeNode
288 * initialise the database and query for this fetcher panel
291 * - string that should correspond to a sequence fetcher
293 * - string that will be entered in the query dialog
294 * @return true if UI was configured with valid database and query string
296 protected boolean setInitialQuery(String selectedDb, String queryString)
298 if (selectedDb == null || selectedDb.trim().length() == 0)
304 List<DbSourceProxy> sp = sfetch.getSourceProxy(selectedDb);
305 if (sp == null || sp.size() != 1)
307 System.err.println("Ignoring fetch parameter db='" + selectedDb
311 database.selection = sp;
312 textArea.setText(queryString);
313 } catch (Exception q)
315 System.err.println("Ignoring fetch parameter db='" + selectedDb
316 + "' and query='" + queryString + "'");
323 * called by thread spawned by constructor
329 private void initGui(IProgressIndicator guiWindow, String selectedDb,
332 this.guiWindow = guiWindow;
333 if (guiWindow instanceof AlignFrame)
335 alignFrame = (AlignFrame) guiWindow;
337 database = new JDatabaseTree(sfetch);
342 * configure the UI with any query parameters we were called with
344 if (!setInitialQuery(selectedDb, queryString))
347 * none provided, so show the database chooser
349 database.waitForInput();
351 } catch (Exception ex)
353 ex.printStackTrace();
356 frame = new JInternalFrame();
357 frame.setContentPane(this);
358 if (Platform.isAMac())
360 Desktop.addInternalFrame(frame, getFrameTitle(), false, 400, 240);
364 Desktop.addInternalFrame(frame, getFrameTitle(), false, 400, 180);
368 private String getFrameTitle()
370 return ((alignFrame == null) ? MessageManager
371 .getString("label.new_sequence_fetcher") : MessageManager
372 .getString("label.additional_sequence_fetcher"));
375 private void jbInit() throws Exception
377 this.setLayout(borderLayout2);
379 database.setFont(JvSwingUtils.getLabelFont());
380 dbeg.setFont(new java.awt.Font("Verdana", Font.BOLD, 11));
381 jLabel1.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
382 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
383 jLabel1.setText(MessageManager
384 .getString("label.separate_multiple_accession_ids"));
386 replacePunctuation.setHorizontalAlignment(SwingConstants.CENTER);
388 .setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
389 replacePunctuation.setText(MessageManager
390 .getString("label.replace_commas_semicolons"));
391 ok.setText(MessageManager.getString("action.ok"));
392 ok.addActionListener(new ActionListener()
395 public void actionPerformed(ActionEvent e)
397 ok_actionPerformed();
400 clear.setText(MessageManager.getString("action.clear"));
401 clear.addActionListener(new ActionListener()
404 public void actionPerformed(ActionEvent e)
406 clear_actionPerformed();
410 example.setText(MessageManager.getString("label.example"));
411 example.addActionListener(new ActionListener()
414 public void actionPerformed(ActionEvent e)
416 example_actionPerformed();
419 close.setText(MessageManager.getString("action.close"));
420 close.addActionListener(new ActionListener()
423 public void actionPerformed(ActionEvent e)
425 close_actionPerformed(e);
428 textArea.setFont(JvSwingUtils.getLabelFont());
429 textArea.setLineWrap(true);
430 textArea.addKeyListener(new KeyAdapter()
433 public void keyPressed(KeyEvent e)
435 if (e.getKeyCode() == KeyEvent.VK_ENTER)
437 ok_actionPerformed();
441 jPanel3.setLayout(borderLayout1);
442 borderLayout1.setVgap(5);
444 jPanel1.add(example);
447 jPanel3.add(jPanel2, java.awt.BorderLayout.CENTER);
448 jPanel2.setLayout(borderLayout3);
449 databaseButt = /*database.getDatabaseSelectorButton();
450 final JButton viewdbs =*/new JButton(
451 MessageManager.getString("action.select_ddbb"));
452 databaseButt.addActionListener(new ActionListener()
456 public void actionPerformed(ActionEvent arg0)
459 database.showDialog();
462 databaseButt.setFont(JvSwingUtils.getLabelFont());
463 database.addActionListener(new ActionListener()
466 public void actionPerformed(ActionEvent e)
469 String currentSelection = database.getSelectedItem();
470 if (currentSelection == null)
472 close_actionPerformed(null);
477 if (currentSelection.equalsIgnoreCase("pdb")
478 && (database.action == KeyEvent.VK_ENTER || ((debounceTrap % 2) == 0)))
482 else if (currentSelection.equalsIgnoreCase("uniprot")
483 && (database.action == KeyEvent.VK_ENTER || ((debounceTrap % 2) == 0)))
485 uniprotSourceAction();
491 database.action = -1;
496 jPanel2.add(databaseButt, java.awt.BorderLayout.NORTH);
497 jPanel2.add(dbeg, java.awt.BorderLayout.CENTER);
498 JPanel jPanel2a = new JPanel(new BorderLayout());
499 jPanel2a.add(jLabel1, java.awt.BorderLayout.NORTH);
500 jPanel2a.add(replacePunctuation, java.awt.BorderLayout.SOUTH);
501 jPanel2.add(jPanel2a, java.awt.BorderLayout.SOUTH);
502 // jPanel2.setPreferredSize(new Dimension())
503 jPanel3.add(jScrollPane1, java.awt.BorderLayout.CENTER);
504 this.add(jPanel1, java.awt.BorderLayout.SOUTH);
505 this.add(jPanel3, java.awt.BorderLayout.CENTER);
506 this.add(jPanel2, java.awt.BorderLayout.NORTH);
507 jScrollPane1.getViewport().add(textArea);
510 private void pdbSourceAction()
512 databaseButt.setText(database.getSelectedItem());
513 new PDBFTSPanel(this);
517 private void uniprotSourceAction()
519 databaseButt.setText(database.getSelectedItem());
520 new UniprotFTSPanel(this);
523 private void otherSourceAction()
527 databaseButt.setText(database.getSelectedItem()
528 + (database.getSelectedSources().size() > 1 ? " (and "
529 + database.getSelectedSources().size() + " others)"
531 String eq = database.getExampleQueries();
532 dbeg.setText(MessageManager.formatMessage(
533 "label.example_query_param", new String[] { eq }));
534 boolean enablePunct = !(eq != null && eq.indexOf(",") > -1);
535 for (DbSourceProxy dbs : database.getSelectedSources())
537 if (dbs instanceof jalview.ws.dbsources.das.datamodel.DasSequenceSource)
543 replacePunctuation.setEnabled(enablePunct);
545 } catch (Exception ex)
548 replacePunctuation.setEnabled(true);
553 protected void example_actionPerformed()
555 DbSourceProxy db = null;
558 textArea.setText(database.getExampleQueries());
559 } catch (Exception ex)
565 protected void clear_actionPerformed()
567 textArea.setText("");
571 public void close_actionPerformed(ActionEvent e)
575 frame.setClosed(true);
576 } catch (Exception ex)
581 public void ok_actionPerformed()
583 databaseButt.setEnabled(false);
584 example.setEnabled(false);
585 textArea.setEnabled(false);
586 ok.setEnabled(false);
587 close.setEnabled(false);
589 Thread worker = new Thread(this);
593 private void resetDialog()
595 databaseButt.setEnabled(true);
596 example.setEnabled(true);
597 textArea.setEnabled(true);
599 close.setEnabled(true);
606 if (!database.hasSelection())
608 error += "Please select the source database\n";
610 // TODO: make this transformation more configurable
611 com.stevesoft.pat.Regex empty;
612 if (replacePunctuation.isEnabled() && replacePunctuation.isSelected())
614 empty = new com.stevesoft.pat.Regex(
615 // replace commas and spaces with a semicolon
616 "(\\s|[,; ])+", ";");
620 // just turn spaces and semicolons into single semicolons
621 empty = new com.stevesoft.pat.Regex("(\\s|[; ])+", ";");
623 textArea.setText(empty.replaceAll(textArea.getText()));
624 // see if there's anthing to search with
625 if (!new com.stevesoft.pat.Regex("[A-Za-z0-9_.]").search(textArea
628 error += "Please enter a (semi-colon separated list of) database id(s)";
630 if (error.length() > 0)
632 showErrorMessage(error);
636 // TODO: Refactor to GUI independent code and write tests.
637 // indicate if successive sources should be merged into one alignment.
638 boolean addToLast = false;
639 List<String> aresultq = new ArrayList<String>();
640 List<String> presultTitle = new ArrayList<String>();
641 List<AlignmentI> presult = new ArrayList<AlignmentI>();
642 List<AlignmentI> aresult = new ArrayList<AlignmentI>();
643 Iterator<DbSourceProxy> proxies = database.getSelectedSources()
646 List<String> nextFetch = Arrays.asList(qries = textArea.getText()
648 Iterator<String> en = Arrays.asList(new String[0]).iterator();
649 int nqueries = qries.length;
651 FeatureSettingsModelI preferredFeatureColours = null;
652 while (proxies.hasNext() && (en.hasNext() || nextFetch.size() > 0))
654 if (!en.hasNext() && nextFetch.size() > 0)
656 en = nextFetch.iterator();
657 nqueries = nextFetch.size();
658 // save the remaining queries in the original array
659 qries = nextFetch.toArray(new String[nqueries]);
660 nextFetch = new ArrayList<String>();
663 DbSourceProxy proxy = proxies.next();
668 .setProgressBar(MessageManager.formatMessage(
669 "status.fetching_sequence_queries_from",
671 Integer.valueOf(nqueries).toString(),
672 proxy.getDbName() }), Thread.currentThread()
674 if (proxy.getMaximumQueryCount() == 1)
677 * proxy only handles one accession id at a time
681 String acc = en.next();
682 if (!fetchSingleAccession(proxy, acc, aresultq, aresult))
691 * proxy can fetch multiple accessions at one time
693 fetchMultipleAccessions(proxy, en, aresultq, aresult, nextFetch);
695 } catch (Exception e)
697 showErrorMessage("Error retrieving " + textArea.getText()
698 + " from " + database.getSelectedItem());
700 // +="Couldn't retrieve sequences from "+database.getSelectedItem();
701 System.err.println("Retrieval failed for source ='"
702 + database.getSelectedItem() + "' and query\n'"
703 + textArea.getText() + "'\n");
705 } catch (OutOfMemoryError e)
707 showErrorMessage("Out of Memory when retrieving "
710 + database.getSelectedItem()
711 + "\nPlease see the Jalview FAQ for instructions for increasing the memory available to Jalview.\n");
715 showErrorMessage("Serious Error retrieving " + textArea.getText()
716 + " from " + database.getSelectedItem());
720 // Stack results ready for opening in alignment windows
721 if (aresult != null && aresult.size() > 0)
723 FeatureSettingsModelI proxyColourScheme = proxy
724 .getFeatureColourScheme();
725 if (proxyColourScheme != null)
727 preferredFeatureColours = proxyColourScheme;
730 AlignmentI ar = null;
731 if (proxy.isAlignmentSource())
734 // new window for each result
735 while (aresult.size() > 0)
737 presult.add(aresult.remove(0));
738 presultTitle.add(aresultq.remove(0) + " "
739 + getDefaultRetrievalTitle());
745 if (addToLast && presult.size() > 0)
747 ar = presult.remove(presult.size() - 1);
748 titl = presultTitle.remove(presultTitle.size() - 1);
750 // concatenate all results in one window
751 while (aresult.size() > 0)
755 ar = aresult.remove(0);
759 ar.append(aresult.remove(0));
764 presultTitle.add(titl);
767 guiWindow.setProgressBar(MessageManager
768 .getString("status.finshed_querying"), Thread.currentThread()
771 guiWindow.setProgressBar(
772 (presult.size() > 0) ? MessageManager
773 .getString("status.parsing_results") : MessageManager
774 .getString("status.processing"), Thread.currentThread()
777 while (presult.size() > 0)
779 parseResult(presult.remove(0), presultTitle.remove(0), null,
780 preferredFeatureColours);
782 // only remove visual delay after we finished parsing.
783 guiWindow.setProgressBar(null, Thread.currentThread().hashCode());
784 if (nextFetch.size() > 0)
786 StringBuffer sb = new StringBuffer();
787 sb.append("Didn't retrieve the following "
788 + (nextFetch.size() == 1 ? "query" : nextFetch.size()
789 + " queries") + ": \n");
790 int l = sb.length(), lr = 0;
791 for (String s : nextFetch)
793 if (l != sb.length())
797 if (lr - sb.length() > 40)
803 showErrorMessage(sb.toString());
809 * Tries to fetch one or more accession ids from the database proxy
813 * the queries to fetch
815 * a successful queries list to add to
817 * a list of retrieved alignments to add to
819 * failed queries are added to this list
822 void fetchMultipleAccessions(DbSourceProxy proxy,
823 Iterator<String> accessions, List<String> aresultq,
824 List<AlignmentI> aresult, List<String> nextFetch)
827 StringBuilder multiacc = new StringBuilder();
828 List<String> tosend = new ArrayList<String>();
829 while (accessions.hasNext())
831 String nel = accessions.next();
833 multiacc.append(nel);
834 if (accessions.hasNext())
836 multiacc.append(proxy.getAccessionSeparator());
842 String query = multiacc.toString();
843 AlignmentI rslt = proxy.getSequenceRecords(query);
844 if (rslt == null || rslt.getHeight() == 0)
846 // no results - pass on all queries to next source
847 nextFetch.addAll(tosend);
853 if (tosend.size() > 1)
855 checkResultForQueries(rslt, tosend, nextFetch, proxy);
858 } catch (OutOfMemoryError oome)
860 new OOMWarning("fetching " + multiacc + " from "
861 + database.getSelectedItem(), oome, this);
866 * Query for a single accession id via the database proxy
871 * a list of successful queries to add to
873 * a list of retrieved alignments to add to
874 * @return true if the fetch was successful, else false
876 boolean fetchSingleAccession(DbSourceProxy proxy, String accession,
877 List<String> aresultq, List<AlignmentI> aresult)
879 boolean success = false;
886 // give the server a chance to breathe
888 } catch (Exception e)
894 AlignmentI indres = null;
897 indres = proxy.getSequenceRecords(accession);
898 } catch (OutOfMemoryError oome)
900 new OOMWarning("fetching " + accession + " from "
901 + proxy.getDbName(), oome, this);
905 aresultq.add(accession);
909 } catch (Exception e)
912 "Error retrieving " + accession
913 + " from " + proxy.getDbName(), e);
919 * Checks which of the queries were successfully retrieved by searching the
920 * DBRefs of the retrieved sequences for a match. Any not found are added to
921 * the 'nextFetch' list.
928 void checkResultForQueries(AlignmentI rslt, List<String> queries,
929 List<String> nextFetch, DbSourceProxy proxy)
931 SequenceI[] rs = rslt.getSequencesArray();
933 for (String q : queries)
935 DBRefEntry dbr = new DBRefEntry();
936 dbr.setSource(proxy.getDbSource());
937 dbr.setVersion(null);
938 String accId = proxy.getAccessionIdFromQuery(q);
939 dbr.setAccessionId(accId);
940 boolean rfound = false;
941 for (int r = 0; r < rs.length; r++)
945 List<DBRefEntry> found = DBRefUtils.searchRefs(rs[r].getDBRefs(),
947 if (!found.isEmpty())
963 * @return a standard title for any results retrieved using the currently
964 * selected source and settings
966 public String getDefaultRetrievalTitle()
968 return "Retrieved from " + database.getSelectedItem();
971 AlignmentI parseResult(AlignmentI al, String title,
972 String currentFileFormat,
973 FeatureSettingsModelI preferredFeatureColours)
976 if (al != null && al.getHeight() > 0)
980 title = getDefaultRetrievalTitle();
982 if (alignFrame == null)
984 AlignFrame af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
985 AlignFrame.DEFAULT_HEIGHT);
986 if (currentFileFormat != null)
988 af.currentFileFormat = currentFileFormat; // WHAT IS THE DEFAULT
990 // NON-FormatAdapter Sourced
994 SequenceFeature[] sfs = null;
995 List<SequenceI> alsqs;
996 synchronized (alsqs = al.getSequences())
998 for (SequenceI sq : alsqs)
1000 if ((sfs = sq.getSequenceFeatures()) != null)
1004 af.setShowSeqFeatures(true);
1012 if (preferredFeatureColours != null)
1014 af.getViewport().applyFeaturesStyle(preferredFeatureColours);
1016 if (Cache.getDefault("HIDE_INTRONS", true))
1018 af.hideFeatureColumns(SequenceOntologyI.EXON, false);
1020 if (newAlframes != null)
1022 newAlframes.add(af);
1024 Desktop.addInternalFrame(af, title, AlignFrame.DEFAULT_WIDTH,
1025 AlignFrame.DEFAULT_HEIGHT);
1027 af.statusBar.setText(MessageManager
1028 .getString("label.successfully_pasted_alignment_file"));
1032 af.setMaximum(Cache.getDefault("SHOW_FULLSCREEN",
1034 } catch (Exception ex)
1040 alignFrame.viewport.addAlignment(al, title);
1046 void showErrorMessage(final String error)
1049 javax.swing.SwingUtilities.invokeLater(new Runnable()
1054 JOptionPane.showInternalMessageDialog(Desktop.desktop, error,
1055 MessageManager.getString("label.error_retrieving_data"),
1056 JOptionPane.WARNING_MESSAGE);
1061 public IProgressIndicator getProgressIndicator()
1063 return progressIndicator;
1066 public void setProgressIndicator(IProgressIndicator progressIndicator)
1068 this.progressIndicator = progressIndicator;
1072 * Make this panel visible (after a selection has been made in the database
1077 frame.setVisible(true);
1081 * Hide this panel (on clicking the database button to open the database
1086 frame.setVisible(false);