2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
\r
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
\r
5 * This file is part of Jalview.
\r
7 * Jalview is free software: you can redistribute it and/or
\r
8 * modify it under the terms of the GNU General Public License
\r
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
\r
11 * Jalview is distributed in the hope that it will be useful, but
\r
12 * WITHOUT ANY WARRANTY; without even the implied warranty
\r
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
\r
14 * PURPOSE. See the GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
\r
18 package jalview.gui;
\r
23 import java.awt.event.*;
\r
24 import javax.swing.*;
\r
25 import javax.swing.event.*;
\r
26 import javax.swing.table.*;
\r
28 import org.biojava.dasobert.dasregistry.*;
\r
29 import jalview.jbgui.*;
\r
30 import jalview.util.*;
\r
32 public class DasSourceBrowser extends GDasSourceBrowser implements
\r
33 Runnable, ListSelectionListener
\r
35 static DasSource[] dasSources = null;
\r
37 Hashtable localSources = null;
\r
39 Vector selectedSources;
\r
41 public static String DEFAULT_REGISTRY = "http://www.dasregistry.org/das1/sources/";
\r
44 * true if thread is running and we are talking to DAS registry service
\r
46 public boolean loadingDasSources = false;
\r
48 protected static String getDasRegistryURL()
\r
50 String registry = jalview.bin.Cache.getDefault("DAS_REGISTRY_URL",
\r
53 if (registry.indexOf("/registry/das1/sources/") > -1)
\r
55 jalview.bin.Cache.setProperty(jalview.bin.Cache.DAS_REGISTRY_URL,
\r
57 registry = DEFAULT_REGISTRY;
\r
62 public DasSourceBrowser(FeatureSettings featureSettings)
\r
64 fs = featureSettings;
\r
65 String registry = getDasRegistryURL();
\r
67 registryURL.setText(registry);
\r
69 setSelectedFromProperties();
\r
71 displayFullDetails(null);
\r
72 table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
\r
74 filter1.addListSelectionListener(this);
\r
75 filter2.addListSelectionListener(this);
\r
76 filter3.addListSelectionListener(this);
\r
78 // Ask to be notified of selection changes.
\r
79 ListSelectionModel rowSM = table.getSelectionModel();
\r
80 rowSM.addListSelectionListener(new ListSelectionListener()
\r
82 public void valueChanged(ListSelectionEvent e)
\r
84 ListSelectionModel lsm = (ListSelectionModel) e.getSource();
\r
85 if (!lsm.isSelectionEmpty())
\r
87 int selectedRow = lsm.getMinSelectionIndex();
\r
88 displayFullDetails(table.getValueAt(selectedRow, 0).toString());
\r
93 table.addMouseListener(new MouseAdapter()
\r
95 public void mouseClicked(MouseEvent evt)
\r
97 if (evt.getClickCount() == 2
\r
98 || SwingUtilities.isRightMouseButton(evt))
\r
100 editRemoveLocalSource(evt);
\r
105 if (dasSources != null)
\r
110 FeatureSettings fs = null;
\r
111 public DasSourceBrowser()
\r
116 public void paintComponent(java.awt.Graphics g)
\r
118 if (dasSources == null && !loadingDasSources)
\r
120 Thread worker = new Thread(this);
\r
127 int dSize = dasSources.length;
\r
128 Object[][] data = new Object[dSize][2];
\r
129 for (int i = 0; i < dSize; i++)
\r
131 data[i][0] = dasSources[i].getNickname();
\r
132 data[i][1] = new Boolean(selectedSources.contains(dasSources[i]
\r
136 refreshTableData(data);
\r
137 setCapabilities(dasSources);
\r
139 javax.swing.SwingUtilities.invokeLater(new Runnable()
\r
143 TableSorter sorter = (TableSorter) table.getModel();
\r
144 sorter.setSortingStatus(1, TableSorter.DESCENDING);
\r
145 sorter.setSortingStatus(1, TableSorter.NOT_SORTED);
\r
149 progressBar.setIndeterminate(false);
\r
150 progressBar.setVisible(false);
\r
151 addLocal.setVisible(true);
\r
152 refresh.setVisible(true);
\r
155 public void refreshTableData(Object[][] data)
\r
157 TableSorter sorter = new TableSorter(new DASTableModel(data));
\r
158 sorter.setTableHeader(table.getTableHeader());
\r
159 table.setModel(sorter);
\r
162 void displayFullDetails(String nickName)
\r
165 StringBuffer text = new StringBuffer(
\r
166 "<HTML><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">");
\r
168 if (nickName == null)
\r
170 fullDetails.setText(text + "Select a DAS service from the table"
\r
171 + " to read a full description here.</font></html>");
\r
175 int dSize = dasSources.length;
\r
176 for (int i = 0; i < dSize; i++)
\r
178 if (!dasSources[i].getNickname().equals(nickName))
\r
183 DasSource ds = dasSources[i];
\r
185 text.append("<font color=\"#0000FF\">Id:</font> "
\r
186 + dasSources[i].getId() + "<br>");
\r
187 text.append("<font color=\"#0000FF\">Nickname:</font> "
\r
188 + dasSources[i].getNickname() + "<br>");
\r
189 text.append("<font color=\"#0000FF\">URL:</font> "
\r
190 + dasSources[i].getUrl() + "<br>");
\r
193 .append("<font color=\"#0000FF\">Admin Email:</font> <a href=\"mailto:"
\r
194 + dasSources[i].getAdminemail()
\r
196 + dasSources[i].getAdminemail() + "</a>" + "<br>");
\r
198 text.append("<font color=\"#0000FF\">Registered at:</font> "
\r
199 + dasSources[i].getRegisterDate() + "<br>");
\r
201 text.append("<font color=\"#0000FF\">Last successful test:</font> "
\r
202 + dasSources[i].getLeaseDate() + "<br>");
\r
204 text.append("<font color=\"#0000FF\">Labels:</font> ");
\r
205 for (int s = 0; s < dasSources[i].getLabels().length; s++)
\r
207 text.append(dasSources[i].getLabels()[s]);
\r
208 if (s < dasSources[i].getLabels().length - 1)
\r
214 text.append("<br>");
\r
216 text.append("<font color=\"#0000FF\">Capabilities:</font> ");
\r
217 String[] scap = dasSources[i].getCapabilities();
\r
218 for (int j = 0; j < scap.length; j++)
\r
220 text.append(scap[j]);
\r
221 if (j < scap.length - 1)
\r
226 text.append("<br>");
\r
228 text.append("<font color=\"#0000FF\">Coordinates:</font> ");
\r
229 DasCoordinateSystem[] dcs = ds.getCoordinateSystem();
\r
230 for (int j = 0; j < dcs.length; j++)
\r
232 text.append("(" + dcs[j].getUniqueId() + ") "
\r
233 + dcs[j].getCategory() + ", " + dcs[j].getName());
\r
234 if (dcs[j].getNCBITaxId() != 0)
\r
236 text.append(", " + dcs[j].getNCBITaxId());
\r
238 if (dcs[j].getOrganismName().length() > 0)
\r
240 text.append(", " + dcs[j].getOrganismName());
\r
243 text.append("<br>");
\r
246 text.append("<font color=\"#0000FF\">Description:</font> "
\r
247 + dasSources[i].getDescription() + "<br>");
\r
249 if (dasSources[i].getHelperurl() != null
\r
250 && dasSources[i].getHelperurl().length() > 0)
\r
252 text.append("<font color=\"#0000FF\"><a href=\""
\r
253 + dasSources[i].getHelperurl()
\r
254 + "\">Go to site</a></font<br>");
\r
257 text.append("</font></html>");
\r
262 fullDetails.setText(text.toString());
\r
263 javax.swing.SwingUtilities.invokeLater(new Runnable()
\r
267 fullDetailsScrollpane.getVerticalScrollBar().setValue(0);
\r
274 loadingDasSources = true;
\r
276 addLocal.setVisible(false);
\r
277 refresh.setVisible(false);
\r
278 progressBar.setVisible(true);
\r
279 progressBar.setIndeterminate(true);
\r
280 setParentGuiEnabled(false);
\r
281 // Refresh the source list.
\r
287 setParentGuiEnabled(true);
\r
288 loadingDasSources = false;
\r
292 private void setParentGuiEnabled(boolean b)
\r
296 fs.fetchDAS.setEnabled(b);
\r
297 fs.saveDAS.setEnabled(b);
\r
301 public Vector getSelectedSources()
\r
303 // wait around if we're still loading.
\r
304 while (dasSources == null)
\r
306 if (!loadingDasSources)
\r
308 new Thread(this).start();
\r
312 } catch (Exception e)
\r
316 while (loadingDasSources)
\r
321 } catch (Exception e)
\r
330 Vector selected = new Vector();
\r
331 for (int r = 0; r < selectedSources.size(); r++)
\r
333 for (int i = 0; i < dasSources.length; i++)
\r
335 if (dasSources[i].getNickname()
\r
336 .equals(selectedSources.elementAt(r)))
\r
338 selected.addElement(dasSources[i]);
\r
348 * retrieve das sources from registry and add local source list
\r
352 public DasSource[] getDASSource()
\r
354 if (dasSources == null)
\r
356 dasSources = jalview.ws.DasSequenceFeatureFetcher.getDASSources();
\r
357 appendLocalSources();
\r
363 public void refresh_actionPerformed(ActionEvent e)
\r
365 saveProperties(jalview.bin.Cache.applicationProperties);
\r
367 Thread worker = new Thread(this);
\r
371 private void setCapabilities(DasSource[] sources)
\r
373 Vector authority = new Vector();
\r
374 Vector type = new Vector();
\r
375 Vector label = new Vector();
\r
377 authority.addElement("Any");
\r
378 type.addElement("Any");
\r
379 label.addElement("Any");
\r
381 for (int i = 0; i < sources.length; i++)
\r
383 DasSource ds = sources[i];
\r
385 DasCoordinateSystem[] dcs = ds.getCoordinateSystem();
\r
387 for (int j = 0; j < dcs.length; j++)
\r
389 if (!type.contains(dcs[j].getCategory()))
\r
391 type.addElement(dcs[j].getCategory());
\r
394 if (!authority.contains(dcs[j].getName()))
\r
396 authority.addElement(dcs[j].getName());
\r
400 String[] slabels = ds.getLabels();
\r
401 for (int s = 0; s < slabels.length; s++)
\r
403 if (!label.contains(slabels[s]))
\r
405 label.addElement(slabels[s]);
\r
411 filter1.setListData(authority);
\r
412 filter2.setListData(type);
\r
413 filter3.setListData(label);
\r
415 javax.swing.SwingUtilities.invokeLater(new Runnable()
\r
419 filter1.setSelectedIndex(0);
\r
420 filter2.setSelectedIndex(0);
\r
421 filter3.setSelectedIndex(0);
\r
426 public void amendLocal(boolean newSource)
\r
428 String url = "http://localhost:8080/", nickname = "";
\r
429 boolean seqsrc = false;
\r
432 int selectedRow = table.getSelectionModel().getMinSelectionIndex();
\r
433 nickname = table.getValueAt(selectedRow, 0).toString();
\r
434 url = ((DasSource) localSources.get(nickname)).getUrl();
\r
435 seqsrc = ((DasSource) localSources.get(nickname))
\r
436 .hasCapability("sequence");
\r
439 JTextField nametf = new JTextField(nickname, 40);
\r
440 JTextField urltf = new JTextField(url, 40);
\r
441 JCheckBox seqs = new JCheckBox("Sequence Source");
\r
442 seqs.setSelected(seqsrc);
\r
443 JPanel panel = new JPanel(new BorderLayout());
\r
444 JPanel pane12 = new JPanel(new BorderLayout());
\r
445 pane12.add(new JLabel("Nickname: "), BorderLayout.CENTER);
\r
446 pane12.add(nametf, BorderLayout.EAST);
\r
447 panel.add(pane12, BorderLayout.NORTH);
\r
448 pane12 = new JPanel(new BorderLayout());
\r
449 pane12.add(new JLabel("URL: "), BorderLayout.NORTH);
\r
450 pane12.add(seqs, BorderLayout.SOUTH);
\r
451 pane12.add(urltf, BorderLayout.EAST);
\r
452 panel.add(pane12, BorderLayout.SOUTH);
\r
454 int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
\r
455 panel, "Enter Nickname & URL of Local DAS Source",
\r
456 JOptionPane.OK_CANCEL_OPTION);
\r
458 if (reply != JOptionPane.OK_OPTION)
\r
463 if (!urltf.getText().endsWith("/"))
\r
465 urltf.setText(urltf.getText() + "/");
\r
468 Das1Source local = new Das1Source();
\r
470 local.setUrl(urltf.getText());
\r
471 local.setNickname(nametf.getText());
\r
472 if (seqs.isSelected())
\r
474 local.setCapabilities(new String[]
\r
475 { "features", "sequence" });
\r
477 if (localSources == null)
\r
479 localSources = new Hashtable();
\r
482 localSources.put(local.getNickname(), local);
\r
484 if (!newSource && !nickname.equals(nametf.getText()))
\r
486 localSources.remove(nickname);
\r
489 int size = dasSources.length;
\r
490 int adjust = newSource ? 1 : 0;
\r
492 Object[][] data = new Object[size + adjust][2];
\r
493 for (int i = 0; i < size; i++)
\r
495 if (!newSource && dasSources[i].getNickname().equals(nickname))
\r
497 ((DasSource) dasSources[i]).setNickname(local.getNickname());
\r
498 ((DasSource) dasSources[i]).setUrl(local.getUrl());
\r
499 data[i][0] = local.getNickname();
\r
500 data[i][1] = new Boolean(true);
\r
504 data[i][0] = dasSources[i].getNickname();
\r
505 data[i][1] = new Boolean(selectedSources.contains(dasSources[i]
\r
512 data[size][0] = local.getNickname();
\r
513 data[size][1] = new Boolean(true);
\r
514 selectedSources.add(local.getNickname());
\r
517 DasSource[] tmp = new DasSource[size + adjust];
\r
519 System.arraycopy(dasSources, 0, tmp, 0, size);
\r
528 refreshTableData(data);
\r
530 SwingUtilities.invokeLater(new Runnable()
\r
534 scrollPane.getVerticalScrollBar().setValue(
\r
535 scrollPane.getVerticalScrollBar().getMaximum());
\r
539 displayFullDetails(local.getNickname());
\r
542 public void editRemoveLocalSource(MouseEvent evt)
\r
544 int selectedRow = table.getSelectionModel().getMinSelectionIndex();
\r
545 if (selectedRow == -1)
\r
550 String nickname = table.getValueAt(selectedRow, 0).toString();
\r
552 if (!localSources.containsKey(nickname))
\r
554 JOptionPane.showInternalMessageDialog(Desktop.desktop,
\r
555 "You can only edit or remove local DAS Sources!",
\r
556 "Public DAS source - not editable",
\r
557 JOptionPane.WARNING_MESSAGE);
\r
562 { "Edit", "Remove", "Cancel" };
\r
563 int choice = JOptionPane.showInternalOptionDialog(Desktop.desktop,
\r
564 "Do you want to edit or remove " + nickname + "?",
\r
565 "Edit / Remove Local DAS Source",
\r
566 JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,
\r
567 null, options, options[2]);
\r
575 localSources.remove(nickname);
\r
576 selectedSources.remove(nickname);
\r
577 Object[][] data = new Object[dasSources.length - 1][2];
\r
578 DasSource[] tmp = new DasSource[dasSources.length - 1];
\r
580 for (int i = 0; i < dasSources.length; i++)
\r
582 if (dasSources[i].getNickname().equals(nickname))
\r
588 tmp[index] = dasSources[i];
\r
589 data[index][0] = dasSources[i].getNickname();
\r
590 data[index][1] = new Boolean(selectedSources
\r
591 .contains(dasSources[i].getNickname()));
\r
596 refreshTableData(data);
\r
597 SwingUtilities.invokeLater(new Runnable()
\r
601 scrollPane.getVerticalScrollBar().setValue(
\r
602 scrollPane.getVerticalScrollBar().getMaximum());
\r
610 void appendLocalSources()
\r
612 if (localSources == null)
\r
616 // note - we add all das sources to list so they can be filtered for the
\r
617 // standard fetchDbRefs function
\r
618 int size = dasSources != null ? dasSources.length : 0;
\r
619 int lsize = localSources.size();
\r
621 Object[][] data = new Object[size + lsize][2];
\r
622 for (int i = 0; i < size; i++)
\r
624 data[i][0] = dasSources[i].getNickname();
\r
625 data[i][1] = new Boolean(selectedSources.contains(dasSources[i]
\r
629 DasSource[] tmp = new DasSource[size + lsize];
\r
630 if (dasSources != null)
\r
632 System.arraycopy(dasSources, 0, tmp, 0, size);
\r
635 Enumeration en = localSources.keys();
\r
637 while (en.hasMoreElements())
\r
639 String key = en.nextElement().toString();
\r
640 data[index][0] = key;
\r
641 data[index][1] = new Boolean(false);
\r
642 tmp[index] = new Das1Source();
\r
643 tmp[index].setNickname(key);
\r
644 tmp[index].setUrl(((DasSource) localSources.get(key)).getUrl());
\r
651 refreshTableData(data);
\r
654 public void valueChanged(ListSelectionEvent evt)
\r
656 // Called when the MainTable selection changes
\r
657 if (evt.getValueIsAdjusting())
\r
662 displayFullDetails(null);
\r
664 // Filter the displayed data sources
\r
665 int dSize = dasSources.length;
\r
667 ArrayList names = new ArrayList();
\r
668 ArrayList selected = new ArrayList();
\r
671 // The features filter is not visible, but we must still
\r
672 // filter the das source list here.
\r
673 // July 2006 - only 6 sources fo not serve features
\r
674 Object[] dummyFeatureList = new Object[]
\r
677 for (int i = 0; i < dSize; i++)
\r
679 ds = dasSources[i];
\r
680 DasCoordinateSystem[] dcs = ds.getCoordinateSystem();
\r
682 if (dcs.length == 0 && ds.getCapabilities().length == 0
\r
683 && filter1.getSelectedIndex() == 0
\r
684 && filter2.getSelectedIndex() == 0
\r
685 && filter3.getSelectedIndex() == 0)
\r
687 // THIS IS A FIX FOR LOCAL SOURCES WHICH DO NOT
\r
688 // HAVE COORDINATE SYSTEMS, INFO WHICH AT PRESENT
\r
689 // IS ADDED FROM THE REGISTRY
\r
690 names.add(ds.getNickname());
\r
692 .add(new Boolean(selectedSources.contains(ds.getNickname())));
\r
696 if (!selectedInList(dummyFeatureList, ds.getCapabilities())
\r
697 || !selectedInList(filter3.getSelectedValues(), ds
\r
703 for (int j = 0; j < dcs.length; j++)
\r
705 if (selectedInList(filter1.getSelectedValues(), new String[]
\r
706 { dcs[j].getName() })
\r
707 && selectedInList(filter2.getSelectedValues(), new String[]
\r
708 { dcs[j].getCategory() }))
\r
710 names.add(ds.getNickname());
\r
711 selected.add(new Boolean(selectedSources.contains(ds
\r
718 dSize = names.size();
\r
719 Object[][] data = new Object[dSize][2];
\r
720 for (int d = 0; d < dSize; d++)
\r
722 data[d][0] = names.get(d);
\r
723 data[d][1] = selected.get(d);
\r
726 refreshTableData(data);
\r
729 boolean selectedInList(Object[] selection, String[] items)
\r
731 for (int i = 0; i < selection.length; i++)
\r
733 if (selection[i].equals("Any"))
\r
738 for (int j = 0; j < items.length; j++)
\r
740 if (selection[i].equals(items[j]))
\r
750 void setSelectedFromProperties()
\r
752 String active = jalview.bin.Cache.getDefault("DAS_ACTIVE_SOURCE",
\r
754 StringTokenizer st = new StringTokenizer(active, "\t");
\r
755 selectedSources = new Vector();
\r
756 while (st.hasMoreTokens())
\r
758 selectedSources.addElement(st.nextToken());
\r
761 Vector _localSources = jalview.bin.Cache.getLocalDasSources();
\r
762 if (_localSources != null)
\r
764 if (localSources == null)
\r
766 localSources = new Hashtable();
\r
768 Enumeration sources = _localSources.elements();
\r
769 while (sources.hasMoreElements())
\r
771 Das1Source source = (Das1Source) sources.nextElement();
\r
772 localSources.put(source.getNickname(), source);
\r
777 public void reset_actionPerformed(ActionEvent e)
\r
779 registryURL.setText(DEFAULT_REGISTRY);
\r
783 * set the DAS source settings in the given jalview properties.
\r
785 * @param properties
\r
787 public void saveProperties(Properties properties)
\r
789 if (registryURL.getText() == null || registryURL.getText().length() < 1)
\r
791 properties.remove(jalview.bin.Cache.DAS_REGISTRY_URL);
\r
795 properties.setProperty(jalview.bin.Cache.DAS_REGISTRY_URL,
\r
796 registryURL.getText());
\r
799 StringBuffer sb = new StringBuffer();
\r
800 for (int r = 0; r < table.getModel().getRowCount(); r++)
\r
802 if (((Boolean) table.getValueAt(r, 1)).booleanValue())
\r
804 sb.append(table.getValueAt(r, 0) + "\t");
\r
808 properties.setProperty(jalview.bin.Cache.DAS_ACTIVE_SOURCE, sb
\r
811 if (localSources != null)
\r
813 sb = new StringBuffer();
\r
814 Enumeration en = localSources.keys();
\r
815 while (en.hasMoreElements())
\r
817 String token = en.nextElement().toString();
\r
820 + (((DasSource) localSources.get(token))
\r
821 .hasCapability("sequence") ? "sequence:" : "")
\r
822 + ((DasSource) localSources.get(token)).getUrl() + "\t");
\r
825 properties.setProperty(jalview.bin.Cache.DAS_LOCAL_SOURCE, sb
\r
831 class DASTableModel extends AbstractTableModel
\r
834 public DASTableModel(Object[][] data)
\r
839 private String[] columnNames = new String[]
\r
840 { "Nickname", "Use Source" };
\r
842 private Object[][] data;
\r
844 public int getColumnCount()
\r
846 return columnNames.length;
\r
849 public int getRowCount()
\r
851 return data.length;
\r
854 public String getColumnName(int col)
\r
856 return columnNames[col];
\r
859 public Object getValueAt(int row, int col)
\r
861 return data[row][col];
\r
865 * JTable uses this method to determine the default renderer/ editor for
\r
866 * each cell. If we didn't implement this method, then the last column would
\r
867 * contain text ("true"/"false"), rather than a check box.
\r
869 public Class getColumnClass(int c)
\r
871 return getValueAt(0, c).getClass();
\r
875 * Don't need to implement this method unless your table's editable.
\r
877 public boolean isCellEditable(int row, int col)
\r
879 // Note that the data/cell address is constant,
\r
880 // no matter where the cell appears onscreen.
\r
886 * Don't need to implement this method unless your table's data can change.
\r
888 public void setValueAt(Object value, int row, int col)
\r
890 data[row][col] = value;
\r
891 fireTableCellUpdated(row, col);
\r
893 String name = getValueAt(row, 0).toString();
\r
894 boolean selected = ((Boolean) value).booleanValue();
\r
896 if (selectedSources.contains(name) && !selected)
\r
898 selectedSources.remove(name);
\r
901 if (!selectedSources.contains(name) && selected)
\r
903 selectedSources.add(name);
\r
908 public void initDasSources()
\r
911 Thread thr = new Thread(new Runnable()
\r
915 // this actually initialises the das source list
\r
916 paintComponent(null); // yuk
\r
920 while (loadingDasSources || dasSources == null)
\r
925 } catch (Exception e)
\r
932 public Vector resolveSourceNicknames(Vector sources)
\r
935 Vector resolved = new Vector();
\r
936 if (sources != null)
\r
938 for (int i = 0; i < dasSources.length; i++)
\r
940 if (sources.contains(dasSources[i].getNickname()))
\r
942 if (!resolved.contains(dasSources[i]))
\r
944 resolved.addElement(dasSources[i]);
\r
953 * disable or enable the buttons on the source browser
\r
956 public void setGuiEnabled(boolean b)
\r
958 refresh.setEnabled(b);
\r
959 addLocal.setEnabled(b);
\r