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.SequenceI;
28 import jalview.fts.core.GFTSPanel;
29 import jalview.fts.service.pdb.PDBFTSPanel;
30 import jalview.fts.service.uniprot.UniprotFTSPanel;
31 import jalview.io.FileFormatI;
32 import jalview.io.gff.SequenceOntologyI;
33 import jalview.util.DBRefUtils;
34 import jalview.util.MessageManager;
35 import jalview.util.Platform;
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.JPanel;
55 import javax.swing.JScrollPane;
56 import javax.swing.JTextArea;
57 import javax.swing.SwingConstants;
58 import javax.swing.tree.DefaultMutableTreeNode;
60 public class SequenceFetcher extends JPanel implements Runnable
62 JLabel dbeg = new JLabel();
64 JDatabaseTree database;
68 JLabel jLabel1 = new JLabel();
70 JCheckBox replacePunctuation = new JCheckBox();
72 JButton ok = new JButton();
74 JButton clear = new JButton();
76 JButton example = new JButton();
78 JButton close = new JButton();
80 JButton back = new JButton();
82 JPanel jPanel1 = new JPanel();
84 JTextArea textArea = new JTextArea();
86 JScrollPane jScrollPane1 = new JScrollPane();
88 JPanel jPanel2 = new JPanel();
90 JPanel jPanel3 = new JPanel();
92 JPanel jPanel4 = new JPanel();
94 BorderLayout borderLayout1 = new BorderLayout();
96 BorderLayout borderLayout2 = new BorderLayout();
98 BorderLayout borderLayout3 = new BorderLayout();
100 JInternalFrame frame;
102 IProgressIndicator guiWindow;
104 AlignFrame alignFrame;
108 final String noDbSelected = "-- Select Database --";
110 private static jalview.ws.SequenceFetcher sfetch = null;
112 private static boolean _initingFetcher = false;
114 private static Thread initingThread = null;
116 public JTextArea getTextArea()
122 * Blocking method that initialises and returns the shared instance of the
123 * SequenceFetcher client
126 * - where the initialisation delay message should be shown
127 * @return the singleton instance of the sequence fetcher client
129 public static jalview.ws.SequenceFetcher getSequenceFetcherSingleton(
130 final IProgressIndicator guiWindow)
132 if (_initingFetcher && initingThread != null && initingThread.isAlive())
134 if (guiWindow != null)
136 guiWindow.setProgressBar(
137 MessageManager.getString(
138 "status.waiting_sequence_database_fetchers_init"),
139 Thread.currentThread().hashCode());
141 // initting happening on another thread - so wait around to see if it
143 while (_initingFetcher && initingThread != null
144 && initingThread.isAlive())
149 } catch (Exception e)
154 if (guiWindow != null)
156 guiWindow.setProgressBar(
157 MessageManager.getString(
158 "status.waiting_sequence_database_fetchers_init"),
159 Thread.currentThread().hashCode());
164 _initingFetcher = true;
165 initingThread = Thread.currentThread();
167 * give a visual indication that sequence fetcher construction is occuring
169 if (guiWindow != null)
171 guiWindow.setProgressBar(
172 MessageManager.getString(
173 "status.init_sequence_database_fetchers"),
174 Thread.currentThread().hashCode());
177 jalview.ws.SequenceFetcher sf = new jalview.ws.SequenceFetcher();
178 if (guiWindow != null)
180 guiWindow.setProgressBar(null, Thread.currentThread().hashCode());
183 _initingFetcher = false;
184 initingThread = null;
189 private IProgressIndicator progressIndicator;
191 private volatile boolean _isConstructing = false;
193 private List<AlignFrame> newAlframes = null;
195 public SequenceFetcher(IProgressIndicator guiIndic)
197 this(guiIndic, null, null);
200 public SequenceFetcher(IProgressIndicator guiIndic,
201 final String selectedDb, final String queryString)
203 this._isConstructing = true;
204 this.progressIndicator = guiIndic;
205 final SequenceFetcher us = this;
206 // launch initialiser thread
207 Thread sf = new Thread(new Runnable()
213 if (getSequenceFetcherSingleton(progressIndicator) != null)
215 us.initGui(progressIndicator, selectedDb, queryString);
216 us._isConstructing = false;
220 javax.swing.SwingUtilities.invokeLater(new Runnable()
225 JvOptionPane.showInternalMessageDialog(Desktop.desktop,
226 MessageManager.getString(
227 "warn.couldnt_create_sequence_fetcher_client"),
228 MessageManager.getString(
229 "label.couldnt_create_sequence_fetcher"),
230 JvOptionPane.ERROR_MESSAGE);
234 // raise warning dialog
242 * blocking call which creates a new sequence fetcher panel, configures it and
243 * presses the OK button with the given database and query.
248 public static List<AlignFrame> fetchAndShow(String database, String query)
250 final SequenceFetcher sf = new SequenceFetcher(Desktop.instance,
252 while (sf._isConstructing)
257 } catch (Exception q)
259 return Collections.emptyList();
262 sf.newAlframes = new ArrayList<>();
264 return sf.newAlframes;
267 private class DatabaseAuthority extends DefaultMutableTreeNode
272 private class DatabaseSource extends DefaultMutableTreeNode
278 * initialise the database and query for this fetcher panel
281 * - string that should correspond to a sequence fetcher
283 * - string that will be entered in the query dialog
284 * @return true if UI was configured with valid database and query string
286 protected boolean setInitialQuery(String selectedDb, String queryString)
288 if (selectedDb == null || selectedDb.trim().length() == 0)
294 List<DbSourceProxy> sp = sfetch.getSourceProxy(selectedDb);
295 for (DbSourceProxy sourcep : sp)
297 if (sourcep.getTier() == 0)
299 database.selection = Arrays
300 .asList(new DbSourceProxy[]
305 if (database.selection == null || database.selection.size() == 0)
308 "Ignoring fetch parameter db='" + selectedDb + "'");
311 textArea.setText(queryString);
312 } catch (Exception q)
314 System.err.println("Ignoring fetch parameter db='" + selectedDb
315 + "' and query='" + queryString + "'");
322 * called by thread spawned by constructor
328 private void initGui(IProgressIndicator guiWindow, String selectedDb,
331 this.guiWindow = guiWindow;
332 if (guiWindow instanceof AlignFrame)
334 alignFrame = (AlignFrame) guiWindow;
336 database = new JDatabaseTree(sfetch);
341 * configure the UI with any query parameters we were called with
343 if (!setInitialQuery(selectedDb, queryString))
346 * none provided, so show the database chooser
348 database.waitForInput();
350 } catch (Exception ex)
352 ex.printStackTrace();
355 frame = new JInternalFrame();
356 frame.setContentPane(this);
357 if (Platform.isAMac())
359 Desktop.addInternalFrame(frame, getFrameTitle(), false, 400, 240);
363 Desktop.addInternalFrame(frame, getFrameTitle(), false, 400, 180);
367 private String getFrameTitle()
369 return ((alignFrame == null)
370 ? MessageManager.getString("label.new_sequence_fetcher")
372 .getString("label.additional_sequence_fetcher"));
375 GFTSPanel parentFTSframe = null;
377 * change the buttons so they fit with the FTS panel.
379 public void embedWithFTSPanel(GFTSPanel toClose)
381 back.setVisible(true);
382 parentFTSframe = toClose;
384 private void jbInit() throws Exception
386 this.setLayout(borderLayout2);
388 database.setFont(JvSwingUtils.getLabelFont());
389 dbeg.setFont(new java.awt.Font("Verdana", Font.BOLD, 11));
390 jLabel1.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
391 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
392 jLabel1.setText(MessageManager
393 .getString("label.separate_multiple_accession_ids"));
395 replacePunctuation.setHorizontalAlignment(SwingConstants.CENTER);
397 .setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
398 replacePunctuation.setText(
399 MessageManager.getString("label.replace_commas_semicolons"));
400 ok.setText(MessageManager.getString("action.ok"));
401 ok.addActionListener(new ActionListener()
404 public void actionPerformed(ActionEvent e)
406 ok_actionPerformed();
409 clear.setText(MessageManager.getString("action.clear"));
410 clear.addActionListener(new ActionListener()
413 public void actionPerformed(ActionEvent e)
415 clear_actionPerformed();
419 example.setText(MessageManager.getString("label.example"));
420 example.addActionListener(new ActionListener()
423 public void actionPerformed(ActionEvent e)
425 example_actionPerformed();
428 close.setText(MessageManager.getString("action.cancel"));
429 close.addActionListener(new ActionListener()
432 public void actionPerformed(ActionEvent e)
434 close_actionPerformed(e);
437 back.setText(MessageManager.getString("action.back"));
438 back.addActionListener(new ActionListener()
441 public void actionPerformed(ActionEvent e)
443 parentFTSframe.btn_back_ActionPerformed();
446 // back not visible unless embedded
447 back.setVisible(false);
448 textArea.setFont(JvSwingUtils.getLabelFont());
449 textArea.setLineWrap(true);
450 textArea.addKeyListener(new KeyAdapter()
453 public void keyPressed(KeyEvent e)
455 if (e.getKeyCode() == KeyEvent.VK_ENTER)
457 ok_actionPerformed();
461 jPanel3.setLayout(borderLayout1);
462 borderLayout1.setVgap(5);
464 jPanel1.add(example);
468 jPanel2.setLayout(borderLayout3);
469 databaseButt = /*database.getDatabaseSelectorButton();
470 final JButton viewdbs =*/new JButton(
471 MessageManager.getString("action.select_ddbb"));
472 databaseButt.addActionListener(new ActionListener()
476 public void actionPerformed(ActionEvent arg0)
479 database.showDialog();
482 databaseButt.setFont(JvSwingUtils.getLabelFont());
483 database.addActionListener(new ActionListener()
486 public void actionPerformed(ActionEvent e)
488 String currentSelection = database.getSelectedItem();
489 if (currentSelection == null)
491 close_actionPerformed(null);
496 if ("pdb".equalsIgnoreCase(currentSelection))
500 else if ("uniprot".equalsIgnoreCase(currentSelection))
502 uniprotSourceAction();
508 database.action = -1;
513 jPanel2.add(databaseButt, java.awt.BorderLayout.NORTH);
514 jPanel2.add(dbeg, java.awt.BorderLayout.CENTER);
515 JPanel jPanel2a = new JPanel(new BorderLayout());
516 jPanel2a.add(jLabel1, java.awt.BorderLayout.NORTH);
517 jPanel2a.add(replacePunctuation, java.awt.BorderLayout.SOUTH);
518 jPanel2.add(jPanel2a, java.awt.BorderLayout.SOUTH);
519 // jPanel2.setPreferredSize(new Dimension())
520 jPanel3.add(jScrollPane1, java.awt.BorderLayout.CENTER);
521 this.add(jPanel1, java.awt.BorderLayout.SOUTH);
522 this.add(jPanel3, java.awt.BorderLayout.CENTER);
523 this.add(jPanel2, java.awt.BorderLayout.NORTH);
524 jScrollPane1.getViewport().add(textArea);
527 private void pdbSourceAction()
529 databaseButt.setText(database.getSelectedItem());
530 new PDBFTSPanel(this);
534 private void uniprotSourceAction()
536 databaseButt.setText(database.getSelectedItem());
537 new UniprotFTSPanel(this);
541 private void otherSourceAction()
545 databaseButt.setText(database.getSelectedItem()
546 + (database.getSelectedSources().size() > 1 ? " (and "
547 + database.getSelectedSources().size() + " others)"
549 String eq = database.getExampleQueries();
550 dbeg.setText(MessageManager.formatMessage("label.example_query_param",
553 // TODO this should be a property of the SequenceFetcher whether commas are and
554 // colons are allowed in the IDs...
556 boolean enablePunct = !(eq != null && eq.indexOf(",") > -1);
557 replacePunctuation.setEnabled(enablePunct);
559 } catch (Exception ex)
562 replacePunctuation.setEnabled(true);
567 protected void example_actionPerformed()
569 DbSourceProxy db = null;
572 textArea.setText(database.getExampleQueries());
573 } catch (Exception ex)
579 protected void clear_actionPerformed()
581 textArea.setText("");
585 public void close_actionPerformed(ActionEvent e)
589 frame.setClosed(true);
590 if (parentFTSframe!=null)
592 parentFTSframe.btn_cancel_ActionPerformed();
594 } catch (Exception ex)
599 public void ok_actionPerformed()
601 databaseButt.setEnabled(false);
602 example.setEnabled(false);
603 textArea.setEnabled(false);
604 ok.setEnabled(false);
605 close.setEnabled(false);
606 back.setEnabled(false);
607 Thread worker = new Thread(this);
611 private void resetDialog()
613 databaseButt.setEnabled(true);
614 example.setEnabled(true);
615 textArea.setEnabled(true);
617 close.setEnabled(true);
618 back.setEnabled(parentFTSframe != null);
625 if (!database.hasSelection())
627 error += "Please select the source database\n";
629 // TODO: make this transformation more configurable
630 com.stevesoft.pat.Regex empty;
631 if (replacePunctuation.isEnabled() && replacePunctuation.isSelected())
633 empty = new com.stevesoft.pat.Regex(
634 // replace commas and spaces with a semicolon
635 "(\\s|[,; ])+", ";");
639 // just turn spaces and semicolons into single semicolons
640 empty = new com.stevesoft.pat.Regex("(\\s|[; ])+", ";");
642 textArea.setText(empty.replaceAll(textArea.getText()));
643 // see if there's anthing to search with
644 if (!new com.stevesoft.pat.Regex("[A-Za-z0-9_.]")
645 .search(textArea.getText()))
647 error += "Please enter a (semi-colon separated list of) database id(s)";
649 if (error.length() > 0)
651 showErrorMessage(error);
655 // TODO: Refactor to GUI independent code and write tests.
656 // indicate if successive sources should be merged into one alignment.
657 boolean addToLast = false;
658 List<String> aresultq = new ArrayList<>();
659 List<String> presultTitle = new ArrayList<>();
660 List<AlignmentI> presult = new ArrayList<>();
661 List<AlignmentI> aresult = new ArrayList<>();
662 Iterator<DbSourceProxy> proxies = database.getSelectedSources()
665 List<String> nextFetch = Arrays
666 .asList(qries = textArea.getText().split(";"));
667 Iterator<String> en = Arrays.asList(new String[0]).iterator();
668 int nqueries = qries.length;
670 FeatureSettingsModelI preferredFeatureColours = null;
671 while (proxies.hasNext() && (en.hasNext() || nextFetch.size() > 0))
673 if (!en.hasNext() && nextFetch.size() > 0)
675 en = nextFetch.iterator();
676 nqueries = nextFetch.size();
677 // save the remaining queries in the original array
678 qries = nextFetch.toArray(new String[nqueries]);
679 nextFetch = new ArrayList<>();
682 DbSourceProxy proxy = proxies.next();
686 guiWindow.setProgressBar(MessageManager.formatMessage(
687 "status.fetching_sequence_queries_from", new String[]
688 { Integer.valueOf(nqueries).toString(),
689 proxy.getDbName() }),
690 Thread.currentThread().hashCode());
691 if (proxy.getMaximumQueryCount() == 1)
694 * proxy only handles one accession id at a time
698 String acc = en.next();
699 if (!fetchSingleAccession(proxy, acc, aresultq, aresult))
708 * proxy can fetch multiple accessions at one time
710 fetchMultipleAccessions(proxy, en, aresultq, aresult, nextFetch);
712 } catch (Exception e)
714 showErrorMessage("Error retrieving " + textArea.getText() + " from "
715 + database.getSelectedItem());
717 // +="Couldn't retrieve sequences from "+database.getSelectedItem();
718 System.err.println("Retrieval failed for source ='"
719 + database.getSelectedItem() + "' and query\n'"
720 + textArea.getText() + "'\n");
722 } catch (OutOfMemoryError e)
724 showErrorMessage("Out of Memory when retrieving "
725 + textArea.getText() + " from " + database.getSelectedItem()
726 + "\nPlease see the Jalview FAQ for instructions for increasing the memory available to Jalview.\n");
730 showErrorMessage("Serious Error retrieving " + textArea.getText()
731 + " from " + database.getSelectedItem());
735 // Stack results ready for opening in alignment windows
736 if (aresult != null && aresult.size() > 0)
738 FeatureSettingsModelI proxyColourScheme = proxy
739 .getFeatureColourScheme();
740 if (proxyColourScheme != null)
742 preferredFeatureColours = proxyColourScheme;
745 AlignmentI ar = null;
746 if (proxy.isAlignmentSource())
749 // new window for each result
750 while (aresult.size() > 0)
752 presult.add(aresult.remove(0));
754 aresultq.remove(0) + " " + getDefaultRetrievalTitle());
760 if (addToLast && presult.size() > 0)
762 ar = presult.remove(presult.size() - 1);
763 titl = presultTitle.remove(presultTitle.size() - 1);
765 // concatenate all results in one window
766 while (aresult.size() > 0)
770 ar = aresult.remove(0);
774 ar.append(aresult.remove(0));
779 presultTitle.add(titl);
782 guiWindow.setProgressBar(
783 MessageManager.getString("status.finshed_querying"),
784 Thread.currentThread().hashCode());
790 .getString("status.parsing_results")
791 : MessageManager.getString("status.processing"),
792 Thread.currentThread().hashCode());
794 while (presult.size() > 0)
796 parseResult(presult.remove(0), presultTitle.remove(0), null,
797 preferredFeatureColours);
799 // only remove visual delay after we finished parsing.
800 guiWindow.setProgressBar(null, Thread.currentThread().hashCode());
801 if (nextFetch.size() > 0)
803 StringBuffer sb = new StringBuffer();
804 sb.append("Didn't retrieve the following "
805 + (nextFetch.size() == 1 ? "query"
806 : nextFetch.size() + " queries")
808 int l = sb.length(), lr = 0;
809 for (String s : nextFetch)
811 if (l != sb.length())
815 if (lr - sb.length() > 40)
821 showErrorMessage(sb.toString());
827 * Tries to fetch one or more accession ids from the database proxy
831 * the queries to fetch
833 * a successful queries list to add to
835 * a list of retrieved alignments to add to
837 * failed queries are added to this list
840 void fetchMultipleAccessions(DbSourceProxy proxy,
841 Iterator<String> accessions, List<String> aresultq,
842 List<AlignmentI> aresult, List<String> nextFetch) throws Exception
844 StringBuilder multiacc = new StringBuilder();
845 List<String> tosend = new ArrayList<>();
846 while (accessions.hasNext())
848 String nel = accessions.next();
850 multiacc.append(nel);
851 if (accessions.hasNext())
853 multiacc.append(proxy.getAccessionSeparator());
859 String query = multiacc.toString();
860 AlignmentI rslt = proxy.getSequenceRecords(query);
861 if (rslt == null || rslt.getHeight() == 0)
863 // no results - pass on all queries to next source
864 nextFetch.addAll(tosend);
870 if (tosend.size() > 1)
872 checkResultForQueries(rslt, tosend, nextFetch, proxy);
875 } catch (OutOfMemoryError oome)
877 new OOMWarning("fetching " + multiacc + " from "
878 + database.getSelectedItem(), oome, this);
883 * Query for a single accession id via the database proxy
888 * a list of successful queries to add to
890 * a list of retrieved alignments to add to
891 * @return true if the fetch was successful, else false
893 boolean fetchSingleAccession(DbSourceProxy proxy, String accession,
894 List<String> aresultq, List<AlignmentI> aresult)
896 boolean success = false;
903 // give the server a chance to breathe
905 } catch (Exception e)
911 AlignmentI indres = null;
914 indres = proxy.getSequenceRecords(accession);
915 } catch (OutOfMemoryError oome)
918 "fetching " + accession + " from " + proxy.getDbName(),
923 aresultq.add(accession);
927 } catch (Exception e)
929 Cache.log.info("Error retrieving " + accession + " from "
930 + proxy.getDbName(), e);
936 * Checks which of the queries were successfully retrieved by searching the
937 * DBRefs of the retrieved sequences for a match. Any not found are added to
938 * the 'nextFetch' list.
945 void checkResultForQueries(AlignmentI rslt, List<String> queries,
946 List<String> nextFetch, DbSourceProxy proxy)
948 SequenceI[] rs = rslt.getSequencesArray();
950 for (String q : queries)
952 DBRefEntry dbr = new DBRefEntry();
953 dbr.setSource(proxy.getDbSource());
954 dbr.setVersion(null);
955 String accId = proxy.getAccessionIdFromQuery(q);
956 dbr.setAccessionId(accId);
957 boolean rfound = false;
958 for (int r = 0; r < rs.length; r++)
962 List<DBRefEntry> found = DBRefUtils.searchRefs(rs[r].getDBRefs(),
964 if (!found.isEmpty())
980 * @return a standard title for any results retrieved using the currently
981 * selected source and settings
983 public String getDefaultRetrievalTitle()
985 return "Retrieved from " + database.getSelectedItem();
988 AlignmentI parseResult(AlignmentI al, String title,
989 FileFormatI currentFileFormat,
990 FeatureSettingsModelI preferredFeatureColours)
993 if (al != null && al.getHeight() > 0)
997 title = getDefaultRetrievalTitle();
999 if (alignFrame == null)
1001 AlignFrame af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
1002 AlignFrame.DEFAULT_HEIGHT);
1003 if (currentFileFormat != null)
1005 af.currentFileFormat = currentFileFormat; // WHAT IS THE DEFAULT
1007 // NON-FormatAdapter Sourced
1011 List<SequenceI> alsqs = al.getSequences();
1012 synchronized (alsqs)
1014 for (SequenceI sq : alsqs)
1016 if (sq.getFeatures().hasFeatures())
1018 af.setShowSeqFeatures(true);
1024 if (preferredFeatureColours != null)
1026 af.getViewport().applyFeaturesStyle(preferredFeatureColours);
1028 if (Cache.getDefault("HIDE_INTRONS", true))
1030 af.hideFeatureColumns(SequenceOntologyI.EXON, false);
1032 if (newAlframes != null)
1034 newAlframes.add(af);
1036 Desktop.addInternalFrame(af, title, AlignFrame.DEFAULT_WIDTH,
1037 AlignFrame.DEFAULT_HEIGHT);
1039 af.setStatus(MessageManager
1040 .getString("label.successfully_pasted_alignment_file"));
1044 af.setMaximum(Cache.getDefault("SHOW_FULLSCREEN", false));
1045 } catch (Exception ex)
1051 alignFrame.viewport.addAlignment(al, title);
1057 void showErrorMessage(final String error)
1060 javax.swing.SwingUtilities.invokeLater(new Runnable()
1065 JvOptionPane.showInternalMessageDialog(Desktop.desktop, error,
1066 MessageManager.getString("label.error_retrieving_data"),
1067 JvOptionPane.WARNING_MESSAGE);
1072 public IProgressIndicator getProgressIndicator()
1074 return progressIndicator;
1077 public void setProgressIndicator(IProgressIndicator progressIndicator)
1079 this.progressIndicator = progressIndicator;
1083 * Make this panel visible (after a selection has been made in the database
1088 frame.setVisible(true);
1092 * Hide this panel (on clicking the database button to open the database
1097 frame.setVisible(false);
1100 public void setDatabaseChooserVisible(boolean b)
1102 databaseButt.setVisible(b);