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.core.GFTSPanel;
30 import jalview.fts.service.pdb.PDBFTSPanel;
31 import jalview.fts.service.uniprot.UniprotFTSPanel;
32 import jalview.io.FileFormatI;
33 import jalview.io.gff.SequenceOntologyI;
34 import jalview.util.DBRefUtils;
35 import jalview.util.MessageManager;
36 import jalview.util.Platform;
37 import jalview.ws.seqfetcher.DbSourceProxy;
39 import java.awt.BorderLayout;
41 import java.awt.event.ActionEvent;
42 import java.awt.event.ActionListener;
43 import java.awt.event.KeyAdapter;
44 import java.awt.event.KeyEvent;
45 import java.util.ArrayList;
46 import java.util.Arrays;
47 import java.util.Collections;
48 import java.util.Iterator;
49 import java.util.List;
51 import javax.swing.JButton;
52 import javax.swing.JCheckBox;
53 import javax.swing.JInternalFrame;
54 import javax.swing.JLabel;
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 JButton back = new JButton();
83 JPanel jPanel1 = new JPanel();
85 JTextArea textArea = new JTextArea();
87 JScrollPane jScrollPane1 = new JScrollPane();
89 JPanel jPanel2 = new JPanel();
91 JPanel jPanel3 = new JPanel();
93 JPanel jPanel4 = new JPanel();
95 BorderLayout borderLayout1 = new BorderLayout();
97 BorderLayout borderLayout2 = new BorderLayout();
99 BorderLayout borderLayout3 = new BorderLayout();
101 JInternalFrame frame;
103 IProgressIndicator guiWindow;
105 AlignFrame alignFrame;
109 final String noDbSelected = "-- Select Database --";
111 private static jalview.ws.SequenceFetcher sfetch = null;
113 private static boolean _initingFetcher = false;
115 private static Thread initingThread = null;
117 public JTextArea getTextArea()
123 * Blocking method that initialises and returns the shared instance of the
124 * SequenceFetcher client
127 * - where the initialisation delay message should be shown
128 * @return the singleton instance of the sequence fetcher client
130 public static jalview.ws.SequenceFetcher getSequenceFetcherSingleton(
131 final IProgressIndicator guiWindow)
133 if (_initingFetcher && initingThread != null && initingThread.isAlive())
135 if (guiWindow != null)
137 guiWindow.setProgressBar(
138 MessageManager.getString(
139 "status.waiting_sequence_database_fetchers_init"),
140 Thread.currentThread().hashCode());
142 // initting happening on another thread - so wait around to see if it
144 while (_initingFetcher && initingThread != null
145 && initingThread.isAlive())
150 } catch (Exception e)
155 if (guiWindow != null)
157 guiWindow.setProgressBar(
158 MessageManager.getString(
159 "status.waiting_sequence_database_fetchers_init"),
160 Thread.currentThread().hashCode());
165 _initingFetcher = true;
166 initingThread = Thread.currentThread();
168 * give a visual indication that sequence fetcher construction is occuring
170 if (guiWindow != null)
172 guiWindow.setProgressBar(
173 MessageManager.getString(
174 "status.init_sequence_database_fetchers"),
175 Thread.currentThread().hashCode());
178 jalview.ws.SequenceFetcher sf = new jalview.ws.SequenceFetcher();
179 if (guiWindow != null)
181 guiWindow.setProgressBar(null, Thread.currentThread().hashCode());
184 _initingFetcher = false;
185 initingThread = null;
190 private IProgressIndicator progressIndicator;
192 private volatile boolean _isConstructing = false;
194 private List<AlignFrame> newAlframes = null;
196 public SequenceFetcher(IProgressIndicator guiIndic)
198 this(guiIndic, null, null);
201 public SequenceFetcher(IProgressIndicator guiIndic,
202 final String selectedDb, final String queryString)
204 this._isConstructing = true;
205 this.progressIndicator = guiIndic;
206 final SequenceFetcher us = this;
207 // launch initialiser thread
208 Thread sf = new Thread(new Runnable()
214 if (getSequenceFetcherSingleton(progressIndicator) != null)
216 us.initGui(progressIndicator, selectedDb, queryString);
217 us._isConstructing = false;
221 javax.swing.SwingUtilities.invokeLater(new Runnable()
226 JvOptionPane.showInternalMessageDialog(Desktop.desktop,
227 MessageManager.getString(
228 "warn.couldnt_create_sequence_fetcher_client"),
229 MessageManager.getString(
230 "label.couldnt_create_sequence_fetcher"),
231 JvOptionPane.ERROR_MESSAGE);
235 // raise warning dialog
243 * blocking call which creates a new sequence fetcher panel, configures it and
244 * presses the OK button with the given database and query.
249 public static List<AlignFrame> fetchAndShow(String database, String query)
251 final SequenceFetcher sf = new SequenceFetcher(Desktop.instance,
253 while (sf._isConstructing)
258 } catch (Exception q)
260 return Collections.emptyList();
263 sf.newAlframes = new ArrayList<>();
265 return sf.newAlframes;
268 private class DatabaseAuthority extends DefaultMutableTreeNode
273 private class DatabaseSource extends DefaultMutableTreeNode
279 * initialise the database and query for this fetcher panel
282 * - string that should correspond to a sequence fetcher
284 * - string that will be entered in the query dialog
285 * @return true if UI was configured with valid database and query string
287 protected boolean setInitialQuery(String selectedDb, String queryString)
289 if (selectedDb == null || selectedDb.trim().length() == 0)
295 List<DbSourceProxy> sp = sfetch.getSourceProxy(selectedDb);
296 for (DbSourceProxy sourcep : sp)
298 if (sourcep.getTier() == 0)
300 database.selection = Arrays
301 .asList(new DbSourceProxy[]
306 if (database.selection == null || database.selection.size() == 0)
309 "Ignoring fetch parameter db='" + selectedDb + "'");
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)
371 ? MessageManager.getString("label.new_sequence_fetcher")
373 .getString("label.additional_sequence_fetcher"));
376 GFTSPanel parentFTSframe = null;
378 * change the buttons so they fit with the FTS panel.
380 public void embedWithFTSPanel(GFTSPanel toClose)
382 back.setVisible(true);
383 parentFTSframe = toClose;
385 private void jbInit() throws Exception
387 this.setLayout(borderLayout2);
389 database.setFont(JvSwingUtils.getLabelFont());
390 dbeg.setFont(new java.awt.Font("Verdana", Font.BOLD, 11));
391 jLabel1.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
392 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
393 jLabel1.setText(MessageManager
394 .getString("label.separate_multiple_accession_ids"));
396 replacePunctuation.setHorizontalAlignment(SwingConstants.CENTER);
398 .setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
399 replacePunctuation.setText(
400 MessageManager.getString("label.replace_commas_semicolons"));
401 ok.setText(MessageManager.getString("action.ok"));
402 ok.addActionListener(new ActionListener()
405 public void actionPerformed(ActionEvent e)
407 ok_actionPerformed();
410 clear.setText(MessageManager.getString("action.clear"));
411 clear.addActionListener(new ActionListener()
414 public void actionPerformed(ActionEvent e)
416 clear_actionPerformed();
420 example.setText(MessageManager.getString("label.example"));
421 example.addActionListener(new ActionListener()
424 public void actionPerformed(ActionEvent e)
426 example_actionPerformed();
429 close.setText(MessageManager.getString("action.cancel"));
430 close.addActionListener(new ActionListener()
433 public void actionPerformed(ActionEvent e)
435 close_actionPerformed(e);
438 back.setText(MessageManager.getString("action.back"));
439 back.addActionListener(new ActionListener()
442 public void actionPerformed(ActionEvent e)
444 parentFTSframe.btn_back_ActionPerformed();
447 // back not visible unless embedded
448 back.setVisible(false);
449 textArea.setFont(JvSwingUtils.getLabelFont());
450 textArea.setLineWrap(true);
451 textArea.addKeyListener(new KeyAdapter()
454 public void keyPressed(KeyEvent e)
456 if (e.getKeyCode() == KeyEvent.VK_ENTER)
458 ok_actionPerformed();
462 jPanel3.setLayout(borderLayout1);
463 borderLayout1.setVgap(5);
465 jPanel1.add(example);
469 jPanel2.setLayout(borderLayout3);
470 databaseButt = /*database.getDatabaseSelectorButton();
471 final JButton viewdbs =*/new JButton(
472 MessageManager.getString("action.select_ddbb"));
473 databaseButt.addActionListener(new ActionListener()
477 public void actionPerformed(ActionEvent arg0)
480 database.showDialog();
483 databaseButt.setFont(JvSwingUtils.getLabelFont());
484 database.addActionListener(new ActionListener()
487 public void actionPerformed(ActionEvent e)
489 String currentSelection = database.getSelectedItem();
490 if (currentSelection == null)
492 close_actionPerformed(null);
497 if ("pdb".equalsIgnoreCase(currentSelection))
501 else if ("uniprot".equalsIgnoreCase(currentSelection))
503 uniprotSourceAction();
509 database.action = -1;
514 jPanel2.add(databaseButt, java.awt.BorderLayout.NORTH);
515 jPanel2.add(dbeg, java.awt.BorderLayout.CENTER);
516 JPanel jPanel2a = new JPanel(new BorderLayout());
517 jPanel2a.add(jLabel1, java.awt.BorderLayout.NORTH);
518 jPanel2a.add(replacePunctuation, java.awt.BorderLayout.SOUTH);
519 jPanel2.add(jPanel2a, java.awt.BorderLayout.SOUTH);
520 // jPanel2.setPreferredSize(new Dimension())
521 jPanel3.add(jScrollPane1, java.awt.BorderLayout.CENTER);
522 this.add(jPanel1, java.awt.BorderLayout.SOUTH);
523 this.add(jPanel3, java.awt.BorderLayout.CENTER);
524 this.add(jPanel2, java.awt.BorderLayout.NORTH);
525 jScrollPane1.getViewport().add(textArea);
528 private void pdbSourceAction()
530 databaseButt.setText(database.getSelectedItem());
531 new PDBFTSPanel(this);
535 private void uniprotSourceAction()
537 databaseButt.setText(database.getSelectedItem());
538 new UniprotFTSPanel(this);
542 private void otherSourceAction()
546 databaseButt.setText(database.getSelectedItem()
547 + (database.getSelectedSources().size() > 1 ? " (and "
548 + database.getSelectedSources().size() + " others)"
550 String eq = database.getExampleQueries();
551 dbeg.setText(MessageManager.formatMessage("label.example_query_param",
554 // TODO this should be a property of the SequenceFetcher whether commas are and
555 // colons are allowed in the IDs...
557 boolean enablePunct = !(eq != null && eq.indexOf(",") > -1);
558 replacePunctuation.setEnabled(enablePunct);
560 } catch (Exception ex)
563 replacePunctuation.setEnabled(true);
568 protected void example_actionPerformed()
570 DbSourceProxy db = null;
573 textArea.setText(database.getExampleQueries());
574 } catch (Exception ex)
580 protected void clear_actionPerformed()
582 textArea.setText("");
586 public void close_actionPerformed(ActionEvent e)
590 frame.setClosed(true);
591 if (parentFTSframe!=null)
593 parentFTSframe.btn_cancel_ActionPerformed();
595 } catch (Exception ex)
600 public void ok_actionPerformed()
602 databaseButt.setEnabled(false);
603 example.setEnabled(false);
604 textArea.setEnabled(false);
605 ok.setEnabled(false);
606 close.setEnabled(false);
607 back.setEnabled(false);
608 Thread worker = new Thread(this);
612 private void resetDialog()
614 databaseButt.setEnabled(true);
615 example.setEnabled(true);
616 textArea.setEnabled(true);
618 close.setEnabled(true);
619 back.setEnabled(parentFTSframe != null);
626 if (!database.hasSelection())
628 error += "Please select the source database\n";
630 // TODO: make this transformation more configurable
631 com.stevesoft.pat.Regex empty;
632 if (replacePunctuation.isEnabled() && replacePunctuation.isSelected())
634 empty = new com.stevesoft.pat.Regex(
635 // replace commas and spaces with a semicolon
636 "(\\s|[,; ])+", ";");
640 // just turn spaces and semicolons into single semicolons
641 empty = new com.stevesoft.pat.Regex("(\\s|[; ])+", ";");
643 textArea.setText(empty.replaceAll(textArea.getText()));
644 // see if there's anthing to search with
645 if (!new com.stevesoft.pat.Regex("[A-Za-z0-9_.]")
646 .search(textArea.getText()))
648 error += "Please enter a (semi-colon separated list of) database id(s)";
650 if (error.length() > 0)
652 showErrorMessage(error);
656 // TODO: Refactor to GUI independent code and write tests.
657 // indicate if successive sources should be merged into one alignment.
658 boolean addToLast = false;
659 List<String> aresultq = new ArrayList<>();
660 List<String> presultTitle = new ArrayList<>();
661 List<AlignmentI> presult = new ArrayList<>();
662 List<AlignmentI> aresult = new ArrayList<>();
663 Iterator<DbSourceProxy> proxies = database.getSelectedSources()
666 List<String> nextFetch = Arrays
667 .asList(qries = textArea.getText().split(";"));
668 Iterator<String> en = Arrays.asList(new String[0]).iterator();
669 int nqueries = qries.length;
671 FeatureSettingsModelI preferredFeatureColours = null;
672 while (proxies.hasNext() && (en.hasNext() || nextFetch.size() > 0))
674 if (!en.hasNext() && nextFetch.size() > 0)
676 en = nextFetch.iterator();
677 nqueries = nextFetch.size();
678 // save the remaining queries in the original array
679 qries = nextFetch.toArray(new String[nqueries]);
680 nextFetch = new ArrayList<>();
683 DbSourceProxy proxy = proxies.next();
687 guiWindow.setProgressBar(MessageManager.formatMessage(
688 "status.fetching_sequence_queries_from", new String[]
689 { Integer.valueOf(nqueries).toString(),
690 proxy.getDbName() }),
691 Thread.currentThread().hashCode());
692 if (proxy.getMaximumQueryCount() == 1)
695 * proxy only handles one accession id at a time
699 String acc = en.next();
700 if (!fetchSingleAccession(proxy, acc, aresultq, aresult))
709 * proxy can fetch multiple accessions at one time
711 fetchMultipleAccessions(proxy, en, aresultq, aresult, nextFetch);
713 } catch (Exception e)
715 showErrorMessage("Error retrieving " + textArea.getText() + " from "
716 + database.getSelectedItem());
718 // +="Couldn't retrieve sequences from "+database.getSelectedItem();
719 System.err.println("Retrieval failed for source ='"
720 + database.getSelectedItem() + "' and query\n'"
721 + textArea.getText() + "'\n");
723 } catch (OutOfMemoryError e)
725 showErrorMessage("Out of Memory when retrieving "
726 + textArea.getText() + " from " + database.getSelectedItem()
727 + "\nPlease see the Jalview FAQ for instructions for increasing the memory available to Jalview.\n");
731 showErrorMessage("Serious Error retrieving " + textArea.getText()
732 + " from " + database.getSelectedItem());
736 // Stack results ready for opening in alignment windows
737 if (aresult != null && aresult.size() > 0)
739 FeatureSettingsModelI proxyColourScheme = proxy
740 .getFeatureColourScheme();
741 if (proxyColourScheme != null)
743 preferredFeatureColours = proxyColourScheme;
746 AlignmentI ar = null;
747 if (proxy.isAlignmentSource())
750 // new window for each result
751 while (aresult.size() > 0)
753 presult.add(aresult.remove(0));
755 aresultq.remove(0) + " " + getDefaultRetrievalTitle());
761 if (addToLast && presult.size() > 0)
763 ar = presult.remove(presult.size() - 1);
764 titl = presultTitle.remove(presultTitle.size() - 1);
766 // concatenate all results in one window
767 while (aresult.size() > 0)
771 ar = aresult.remove(0);
775 ar.append(aresult.remove(0));
780 presultTitle.add(titl);
783 guiWindow.setProgressBar(
784 MessageManager.getString("status.finshed_querying"),
785 Thread.currentThread().hashCode());
791 .getString("status.parsing_results")
792 : MessageManager.getString("status.processing"),
793 Thread.currentThread().hashCode());
795 while (presult.size() > 0)
797 parseResult(presult.remove(0), presultTitle.remove(0), null,
798 preferredFeatureColours);
800 // only remove visual delay after we finished parsing.
801 guiWindow.setProgressBar(null, Thread.currentThread().hashCode());
802 if (nextFetch.size() > 0)
804 StringBuffer sb = new StringBuffer();
805 sb.append("Didn't retrieve the following "
806 + (nextFetch.size() == 1 ? "query"
807 : nextFetch.size() + " queries")
809 int l = sb.length(), lr = 0;
810 for (String s : nextFetch)
812 if (l != sb.length())
816 if (lr - sb.length() > 40)
822 showErrorMessage(sb.toString());
828 * Tries to fetch one or more accession ids from the database proxy
832 * the queries to fetch
834 * a successful queries list to add to
836 * a list of retrieved alignments to add to
838 * failed queries are added to this list
841 void fetchMultipleAccessions(DbSourceProxy proxy,
842 Iterator<String> accessions, List<String> aresultq,
843 List<AlignmentI> aresult, List<String> nextFetch) throws Exception
845 StringBuilder multiacc = new StringBuilder();
846 List<String> tosend = new ArrayList<>();
847 while (accessions.hasNext())
849 String nel = accessions.next();
851 multiacc.append(nel);
852 if (accessions.hasNext())
854 multiacc.append(proxy.getAccessionSeparator());
860 String query = multiacc.toString();
861 AlignmentI rslt = proxy.getSequenceRecords(query);
862 if (rslt == null || rslt.getHeight() == 0)
864 // no results - pass on all queries to next source
865 nextFetch.addAll(tosend);
871 if (tosend.size() > 1)
873 checkResultForQueries(rslt, tosend, nextFetch, proxy);
876 } catch (OutOfMemoryError oome)
878 new OOMWarning("fetching " + multiacc + " from "
879 + database.getSelectedItem(), oome, this);
884 * Query for a single accession id via the database proxy
889 * a list of successful queries to add to
891 * a list of retrieved alignments to add to
892 * @return true if the fetch was successful, else false
894 boolean fetchSingleAccession(DbSourceProxy proxy, String accession,
895 List<String> aresultq, List<AlignmentI> aresult)
897 boolean success = false;
904 // give the server a chance to breathe
906 } catch (Exception e)
912 AlignmentI indres = null;
915 indres = proxy.getSequenceRecords(accession);
916 } catch (OutOfMemoryError oome)
919 "fetching " + accession + " from " + proxy.getDbName(),
924 aresultq.add(accession);
928 } catch (Exception e)
930 Cache.log.info("Error retrieving " + accession + " from "
931 + proxy.getDbName(), e);
937 * Checks which of the queries were successfully retrieved by searching the
938 * DBRefs of the retrieved sequences for a match. Any not found are added to
939 * the 'nextFetch' list.
946 void checkResultForQueries(AlignmentI rslt, List<String> queries,
947 List<String> nextFetch, DbSourceProxy proxy)
949 SequenceI[] rs = rslt.getSequencesArray();
951 for (String q : queries)
953 DBRefEntry dbr = new DBRefEntry();
954 dbr.setSource(proxy.getDbSource());
955 dbr.setVersion(null);
956 String accId = proxy.getAccessionIdFromQuery(q);
957 dbr.setAccessionId(accId);
958 boolean rfound = false;
959 for (int r = 0; r < rs.length; r++)
963 List<DBRefEntry> found = DBRefUtils.searchRefs(rs[r].getDBRefs(),
965 if (!found.isEmpty())
981 * @return a standard title for any results retrieved using the currently
982 * selected source and settings
984 public String getDefaultRetrievalTitle()
986 return "Retrieved from " + database.getSelectedItem();
989 AlignmentI parseResult(AlignmentI al, String title,
990 FileFormatI currentFileFormat,
991 FeatureSettingsModelI preferredFeatureColours)
994 if (al != null && al.getHeight() > 0)
998 title = getDefaultRetrievalTitle();
1000 if (alignFrame == null)
1002 AlignFrame af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
1003 AlignFrame.DEFAULT_HEIGHT);
1004 if (currentFileFormat != null)
1006 af.currentFileFormat = currentFileFormat; // WHAT IS THE DEFAULT
1008 // NON-FormatAdapter Sourced
1012 SequenceFeature[] sfs = null;
1013 List<SequenceI> alsqs;
1014 synchronized (alsqs = al.getSequences())
1016 for (SequenceI sq : alsqs)
1018 if (sq.getFeatures().hasFeatures())
1020 af.setShowSeqFeatures(true);
1026 af.getViewport().applyFeaturesStyle(preferredFeatureColours);
1027 if (Cache.getDefault("HIDE_INTRONS", true))
1029 af.hideFeatureColumns(SequenceOntologyI.EXON, false);
1031 if (newAlframes != null)
1033 newAlframes.add(af);
1035 Desktop.addInternalFrame(af, title, AlignFrame.DEFAULT_WIDTH,
1036 AlignFrame.DEFAULT_HEIGHT);
1038 af.setStatus(MessageManager
1039 .getString("label.successfully_pasted_alignment_file"));
1043 af.setMaximum(Cache.getDefault("SHOW_FULLSCREEN", false));
1044 } catch (Exception ex)
1050 alignFrame.viewport.addAlignment(al, title);
1056 void showErrorMessage(final String error)
1059 javax.swing.SwingUtilities.invokeLater(new Runnable()
1064 JvOptionPane.showInternalMessageDialog(Desktop.desktop, error,
1065 MessageManager.getString("label.error_retrieving_data"),
1066 JvOptionPane.WARNING_MESSAGE);
1071 public IProgressIndicator getProgressIndicator()
1073 return progressIndicator;
1076 public void setProgressIndicator(IProgressIndicator progressIndicator)
1078 this.progressIndicator = progressIndicator;
1082 * Make this panel visible (after a selection has been made in the database
1087 frame.setVisible(true);
1091 * Hide this panel (on clicking the database button to open the database
1096 frame.setVisible(false);
1099 public void setDatabaseChooserVisible(boolean b)
1101 databaseButt.setVisible(b);