2 * Jalview - A Sequence Alignment Editor and Viewer
\r
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.gui;
\r
23 import jalview.analysis.*;
\r
25 import jalview.datamodel.*;
\r
27 import jalview.io.*;
\r
29 import jalview.schemes.*;
\r
32 import java.awt.event.*;
\r
34 import javax.swing.*;
\r
41 * @version $Revision$
\r
43 public class PopupMenu extends JPopupMenu
\r
45 JMenu groupMenu = new JMenu();
\r
46 JMenuItem groupName = new JMenuItem();
\r
47 protected JRadioButtonMenuItem clustalColour = new JRadioButtonMenuItem();
\r
48 protected JRadioButtonMenuItem zappoColour = new JRadioButtonMenuItem();
\r
49 protected JRadioButtonMenuItem taylorColour = new JRadioButtonMenuItem();
\r
50 protected JRadioButtonMenuItem hydrophobicityColour = new JRadioButtonMenuItem();
\r
51 protected JRadioButtonMenuItem helixColour = new JRadioButtonMenuItem();
\r
52 protected JRadioButtonMenuItem strandColour = new JRadioButtonMenuItem();
\r
53 protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem();
\r
54 protected JRadioButtonMenuItem buriedColour = new JRadioButtonMenuItem();
\r
55 protected JCheckBoxMenuItem abovePIDColour = new JCheckBoxMenuItem();
\r
56 protected JRadioButtonMenuItem userDefinedColour = new JRadioButtonMenuItem();
\r
57 protected JRadioButtonMenuItem PIDColour = new JRadioButtonMenuItem();
\r
58 protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem();
\r
59 JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem();
\r
60 protected JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
\r
62 JMenu sequenceMenu = new JMenu();
\r
63 JMenuItem sequenceName = new JMenuItem();
\r
65 JMenuItem unGroupMenuItem = new JMenuItem();
\r
66 JMenuItem pdbMenuItem = new JMenuItem();
\r
67 JMenuItem outline = new JMenuItem();
\r
68 JRadioButtonMenuItem nucleotideMenuItem = new JRadioButtonMenuItem();
\r
69 JMenu colourMenu = new JMenu();
\r
70 JCheckBoxMenuItem showBoxes = new JCheckBoxMenuItem();
\r
71 JCheckBoxMenuItem showText = new JCheckBoxMenuItem();
\r
72 JCheckBoxMenuItem showColourText = new JCheckBoxMenuItem();
\r
75 * Creates a new PopupMenu object.
\r
77 * @param ap DOCUMENT ME!
\r
78 * @param seq DOCUMENT ME!
\r
80 public PopupMenu(AlignmentPanel ap, Sequence seq)
\r
82 ///////////////////////////////////////////////////////////
\r
83 // If this is activated from the sequence panel, the user may want to
\r
84 // edit or annotate a particular residue. Therefore display the residue menu
\r
86 // If from the IDPanel, we must display the sequence menu
\r
87 //////////////////////////////////////////////////////////
\r
91 ButtonGroup colours = new ButtonGroup();
\r
92 colours.add(noColourmenuItem);
\r
93 colours.add(clustalColour);
\r
94 colours.add(zappoColour);
\r
95 colours.add(taylorColour);
\r
96 colours.add(hydrophobicityColour);
\r
97 colours.add(helixColour);
\r
98 colours.add(strandColour);
\r
99 colours.add(turnColour);
\r
100 colours.add(buriedColour);
\r
101 colours.add(abovePIDColour);
\r
102 colours.add(userDefinedColour);
\r
103 colours.add(PIDColour);
\r
104 colours.add(BLOSUM62Colour);
\r
110 catch (Exception e)
\r
112 e.printStackTrace();
\r
115 if ((seq == null) || (seq.getPDBId() == null))
\r
117 pdbMenuItem.setVisible(false);
\r
120 SequenceGroup sg = ap.av.getSelectionGroup();
\r
124 groupName.setText(sg.getName());
\r
126 if (sg.cs instanceof ZappoColourScheme)
\r
128 zappoColour.setSelected(true);
\r
130 else if (sg.cs instanceof TaylorColourScheme)
\r
132 taylorColour.setSelected(true);
\r
134 else if (sg.cs instanceof PIDColourScheme)
\r
136 PIDColour.setSelected(true);
\r
138 else if (sg.cs instanceof Blosum62ColourScheme)
\r
140 BLOSUM62Colour.setSelected(true);
\r
142 else if (sg.cs instanceof UserColourScheme)
\r
144 userDefinedColour.setSelected(true);
\r
146 else if (sg.cs instanceof HydrophobicColourScheme)
\r
148 hydrophobicityColour.setSelected(true);
\r
150 else if (sg.cs instanceof HelixColourScheme)
\r
152 helixColour.setSelected(true);
\r
154 else if (sg.cs instanceof StrandColourScheme)
\r
156 strandColour.setSelected(true);
\r
158 else if (sg.cs instanceof TurnColourScheme)
\r
160 turnColour.setSelected(true);
\r
162 else if (sg.cs instanceof BuriedColourScheme)
\r
164 buriedColour.setSelected(true);
\r
166 else if (sg.cs instanceof ClustalxColourScheme)
\r
168 clustalColour.setSelected(true);
\r
172 noColourmenuItem.setSelected(true);
\r
175 if (sg.cs!=null && sg.cs.conservationApplied())
\r
177 conservationMenuItem.setSelected(true);
\r
180 showText.setSelected(sg.getDisplayText());
\r
181 showColourText.setSelected(sg.getColourText());
\r
182 showBoxes.setSelected(sg.getDisplayBoxes());
\r
185 if (!ap.av.alignment.getGroups().contains(sg))
\r
187 unGroupMenuItem.setVisible(false);
\r
191 groupMenu.insertSeparator(3);
\r
196 sequenceMenu.setVisible(false);
\r
200 java.util.Vector links = Preferences.sequenceURLLinks;
\r
202 JMenu linkMenu = new JMenu("Link");
\r
204 for(int i=0; i<links.size(); i++)
\r
206 String link = links.elementAt(i).toString();
\r
208 item = new JMenuItem(link.substring(0, link.indexOf("|")));
\r
210 final String url = link.substring(link.indexOf("|")+1, link.indexOf("$SEQUENCE_ID$"))
\r
211 + sequence.getName() +
\r
212 link.substring(link.indexOf("$SEQUENCE_ID$") + 13);
\r
215 item.addActionListener(new java.awt.event.ActionListener()
\r
217 public void actionPerformed(ActionEvent e)
\r
223 linkMenu.add(item);
\r
232 * @throws Exception DOCUMENT ME!
\r
234 private void jbInit() throws Exception
\r
236 groupMenu.setText("Group");
\r
237 groupMenu.setText("Define");
\r
238 groupName.setText("Name");
\r
239 groupName.addActionListener(new java.awt.event.ActionListener()
\r
241 public void actionPerformed(ActionEvent e)
\r
243 groupName_actionPerformed(e);
\r
246 sequenceMenu.setText("Sequence");
\r
247 sequenceName.setText("Edit name");
\r
248 sequenceName.addActionListener(new java.awt.event.ActionListener()
\r
250 public void actionPerformed(ActionEvent e)
\r
252 sequenceName_actionPerformed(e);
\r
255 PIDColour.setFocusPainted(false);
\r
256 unGroupMenuItem.setText("Remove Group");
\r
257 unGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
259 public void actionPerformed(ActionEvent e)
\r
261 unGroupMenuItem_actionPerformed(e);
\r
264 pdbMenuItem.setText("View PDB structure");
\r
265 pdbMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
267 public void actionPerformed(ActionEvent e)
\r
269 pdbMenuItem_actionPerformed(e);
\r
272 outline.setText("Border colour");
\r
273 outline.addActionListener(new java.awt.event.ActionListener()
\r
275 public void actionPerformed(ActionEvent e)
\r
277 outline_actionPerformed(e);
\r
280 nucleotideMenuItem.setText("Nucleotide");
\r
281 nucleotideMenuItem.addActionListener(new ActionListener()
\r
283 public void actionPerformed(ActionEvent e)
\r
285 nucleotideMenuItem_actionPerformed(e);
\r
288 colourMenu.setText("Group Colour");
\r
289 showBoxes.setText("Boxes");
\r
290 showBoxes.setState(true);
\r
291 showBoxes.addActionListener(new ActionListener()
\r
293 public void actionPerformed(ActionEvent e)
\r
295 showBoxes_actionPerformed(e);
\r
298 showText.setText("Text");
\r
299 showText.setState(true);
\r
300 showText.addActionListener(new ActionListener()
\r
302 public void actionPerformed(ActionEvent e)
\r
304 showText_actionPerformed(e);
\r
307 showColourText.setText("Colour Text");
\r
308 showColourText.addActionListener(new ActionListener()
\r
310 public void actionPerformed(ActionEvent e)
\r
312 showColourText_actionPerformed(e);
\r
317 groupMenu.add(groupName);
\r
318 groupMenu.addSeparator();
\r
319 groupMenu.add(unGroupMenuItem);
\r
320 groupMenu.add(colourMenu);
\r
321 groupMenu.addSeparator();
\r
322 groupMenu.add(showBoxes);
\r
323 groupMenu.add(showText);
\r
324 groupMenu.add(showColourText);
\r
325 groupMenu.addSeparator();
\r
326 groupMenu.add(outline);
\r
327 sequenceMenu.add(sequenceName);
\r
328 sequenceMenu.add(pdbMenuItem);
\r
329 colourMenu.add(noColourmenuItem);
\r
330 colourMenu.add(clustalColour);
\r
331 colourMenu.add(BLOSUM62Colour);
\r
332 colourMenu.add(PIDColour);
\r
333 colourMenu.add(zappoColour);
\r
334 colourMenu.add(taylorColour);
\r
335 colourMenu.add(hydrophobicityColour);
\r
336 colourMenu.add(helixColour);
\r
337 colourMenu.add(strandColour);
\r
338 colourMenu.add(turnColour);
\r
339 colourMenu.add(buriedColour);
\r
340 colourMenu.add(nucleotideMenuItem);
\r
341 colourMenu.add(userDefinedColour);
\r
343 if(jalview.gui.UserDefinedColours.getUserColourSchemes()!=null)
\r
345 java.util.Enumeration userColours = jalview.gui.UserDefinedColours.
\r
346 getUserColourSchemes().keys();
\r
348 while (userColours.hasMoreElements())
\r
350 JMenuItem item = new JMenuItem(userColours.
\r
351 nextElement().toString());
\r
352 item.addActionListener(new ActionListener()
\r
354 public void actionPerformed(ActionEvent evt)
\r
356 userDefinedColour_actionPerformed(evt);
\r
359 colourMenu.add(item);
\r
364 colourMenu.addSeparator();
\r
365 colourMenu.add(abovePIDColour);
\r
366 colourMenu.add(conservationMenuItem);
\r
367 noColourmenuItem.setText("None");
\r
368 noColourmenuItem.addActionListener(new java.awt.event.ActionListener()
\r
370 public void actionPerformed(ActionEvent e)
\r
372 noColourmenuItem_actionPerformed(e);
\r
376 clustalColour.setText("Clustalx colours");
\r
377 clustalColour.addActionListener(new java.awt.event.ActionListener()
\r
379 public void actionPerformed(ActionEvent e)
\r
381 clustalColour_actionPerformed(e);
\r
384 zappoColour.setText("Zappo");
\r
385 zappoColour.addActionListener(new java.awt.event.ActionListener()
\r
387 public void actionPerformed(ActionEvent e)
\r
389 zappoColour_actionPerformed(e);
\r
392 taylorColour.setText("Taylor");
\r
393 taylorColour.addActionListener(new java.awt.event.ActionListener()
\r
395 public void actionPerformed(ActionEvent e)
\r
397 taylorColour_actionPerformed(e);
\r
400 hydrophobicityColour.setText("Hydrophobicity");
\r
401 hydrophobicityColour.addActionListener(new java.awt.event.ActionListener()
\r
403 public void actionPerformed(ActionEvent e)
\r
405 hydrophobicityColour_actionPerformed(e);
\r
408 helixColour.setText("Helix propensity");
\r
409 helixColour.addActionListener(new java.awt.event.ActionListener()
\r
411 public void actionPerformed(ActionEvent e)
\r
413 helixColour_actionPerformed(e);
\r
416 strandColour.setText("Strand propensity");
\r
417 strandColour.addActionListener(new java.awt.event.ActionListener()
\r
419 public void actionPerformed(ActionEvent e)
\r
421 strandColour_actionPerformed(e);
\r
424 turnColour.setText("Turn propensity");
\r
425 turnColour.addActionListener(new java.awt.event.ActionListener()
\r
427 public void actionPerformed(ActionEvent e)
\r
429 turnColour_actionPerformed(e);
\r
432 buriedColour.setText("Buried Index");
\r
433 buriedColour.addActionListener(new java.awt.event.ActionListener()
\r
435 public void actionPerformed(ActionEvent e)
\r
437 buriedColour_actionPerformed(e);
\r
440 abovePIDColour.setText("Above % Identity");
\r
441 abovePIDColour.addActionListener(new java.awt.event.ActionListener()
\r
443 public void actionPerformed(ActionEvent e)
\r
445 abovePIDColour_actionPerformed(e);
\r
448 userDefinedColour.setText("User Defined...");
\r
449 userDefinedColour.addActionListener(new java.awt.event.ActionListener()
\r
451 public void actionPerformed(ActionEvent e)
\r
453 userDefinedColour_actionPerformed(e);
\r
456 PIDColour.setText("Percentage Identity");
\r
457 PIDColour.addActionListener(new java.awt.event.ActionListener()
\r
459 public void actionPerformed(ActionEvent e)
\r
461 PIDColour_actionPerformed(e);
\r
464 BLOSUM62Colour.setText("BLOSUM62");
\r
465 BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener()
\r
467 public void actionPerformed(ActionEvent e)
\r
469 BLOSUM62Colour_actionPerformed(e);
\r
472 conservationMenuItem.setText("Conservation");
\r
473 conservationMenuItem.addActionListener(new java.awt.event.ActionListener()
\r
475 public void actionPerformed(ActionEvent e)
\r
477 conservationMenuItem_actionPerformed(e);
\r
487 SequenceGroup sg = getGroup();
\r
490 SuperGroup superG = ap.av.alignment.getSuperGroup(sg);
\r
492 if (superG != null)
\r
494 superG.setSuperGroupProperties(sg);
\r
497 if (ap.overviewPanel != null)
\r
498 ap.overviewPanel.updateOverviewImage();
\r
500 ap.seqPanel.repaint();
\r
506 * @param e DOCUMENT ME!
\r
508 protected void clustalColour_actionPerformed(ActionEvent e)
\r
510 SequenceGroup sg = getGroup();
\r
511 sg.cs = new ClustalxColourScheme(sg.sequences,
\r
512 ap.av.alignment.getWidth());
\r
519 * @param e DOCUMENT ME!
\r
521 protected void zappoColour_actionPerformed(ActionEvent e)
\r
523 getGroup().cs = new ZappoColourScheme();
\r
530 * @param e DOCUMENT ME!
\r
532 protected void taylorColour_actionPerformed(ActionEvent e)
\r
534 getGroup().cs = new TaylorColourScheme();
\r
541 * @param e DOCUMENT ME!
\r
543 protected void hydrophobicityColour_actionPerformed(ActionEvent e)
\r
545 getGroup().cs = new HydrophobicColourScheme();
\r
552 * @param e DOCUMENT ME!
\r
554 protected void helixColour_actionPerformed(ActionEvent e)
\r
556 getGroup().cs = new HelixColourScheme();
\r
563 * @param e DOCUMENT ME!
\r
565 protected void strandColour_actionPerformed(ActionEvent e)
\r
567 getGroup().cs = new StrandColourScheme();
\r
574 * @param e DOCUMENT ME!
\r
576 protected void turnColour_actionPerformed(ActionEvent e)
\r
578 getGroup().cs = new TurnColourScheme();
\r
585 * @param e DOCUMENT ME!
\r
587 protected void buriedColour_actionPerformed(ActionEvent e)
\r
589 getGroup().cs = new BuriedColourScheme();
\r
596 * @param e DOCUMENT ME!
\r
598 public void nucleotideMenuItem_actionPerformed(ActionEvent e)
\r
600 getGroup().cs = new NucleotideColourScheme();
\r
607 * @param e DOCUMENT ME!
\r
609 protected void abovePIDColour_actionPerformed(ActionEvent e)
\r
611 SequenceGroup sg = getGroup();
\r
615 if (abovePIDColour.isSelected())
\r
617 sg.cs.setConsensus(AAFrequency.calculate(sg.sequences, 0,
\r
618 ap.av.alignment.getWidth()));
\r
620 int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs,
\r
621 getGroup().getName());
\r
623 sg.cs.setThreshold(threshold, ap.av.getIgnoreGapsConsensus());
\r
625 SliderPanel.showPIDSlider();
\r
627 else // remove PIDColouring
\r
629 sg.cs.setThreshold(0, ap.av.getIgnoreGapsConsensus());
\r
638 * @param e DOCUMENT ME!
\r
640 protected void userDefinedColour_actionPerformed(ActionEvent e)
\r
642 SequenceGroup sg = getGroup();
\r
644 if (e.getActionCommand().equals("User Defined..."))
\r
645 new UserDefinedColours(ap, sg);
\r
648 UserColourScheme udc = (UserColourScheme) UserDefinedColours.
\r
649 getUserColourSchemes().get(e.getActionCommand());
\r
657 * @param e DOCUMENT ME!
\r
659 protected void PIDColour_actionPerformed(ActionEvent e)
\r
661 SequenceGroup sg = getGroup();
\r
662 sg.cs = new PIDColourScheme();
\r
663 sg.cs.setConsensus(AAFrequency.calculate(sg.sequences, 0,
\r
664 ap.av.alignment.getWidth()));
\r
671 * @param e DOCUMENT ME!
\r
673 protected void BLOSUM62Colour_actionPerformed(ActionEvent e)
\r
675 SequenceGroup sg = getGroup();
\r
677 sg.cs = new Blosum62ColourScheme();
\r
679 sg.cs.setConsensus(AAFrequency.calculate(sg.sequences, 0,
\r
680 ap.av.alignment.getWidth()));
\r
688 * @param e DOCUMENT ME!
\r
690 protected void noColourmenuItem_actionPerformed(ActionEvent e)
\r
692 getGroup().cs = null;
\r
699 * @param e DOCUMENT ME!
\r
701 protected void conservationMenuItem_actionPerformed(ActionEvent e)
\r
703 SequenceGroup sg = getGroup();
\r
707 if (conservationMenuItem.isSelected())
\r
709 Conservation c = new Conservation("Group",
\r
710 ResidueProperties.propHash, 3, sg.sequences, 0,
\r
711 ap.av.alignment.getWidth());
\r
714 c.verdict(false, ap.av.ConsPercGaps);
\r
716 sg.cs.setConservation(c);
\r
718 SliderPanel.setConservationSlider(ap, sg.cs, sg.getName());
\r
719 SliderPanel.showConservationSlider();
\r
721 else // remove ConservationColouring
\r
723 sg.cs.setConservation(null);
\r
732 * @param e DOCUMENT ME!
\r
734 protected void groupName_actionPerformed(ActionEvent e)
\r
736 SequenceGroup sg = getGroup();
\r
737 String reply = JOptionPane.showInternalInputDialog(Desktop.desktop,
\r
738 "Enter new group name", "Edit group name",
\r
739 JOptionPane.QUESTION_MESSAGE);
\r
747 groupName.setText(reply);
\r
753 * @param e DOCUMENT ME!
\r
755 protected void analyze_actionPerformed(ActionEvent e)
\r
757 CutAndPasteTransfer cap = new CutAndPasteTransfer();
\r
758 JInternalFrame frame = new JInternalFrame();
\r
759 frame.setContentPane(cap);
\r
760 Desktop.addInternalFrame(frame, "Analyze this - ", 400, 300);
\r
762 SequenceGroup sg = getGroup();
\r
763 StringBuffer sb = new StringBuffer();
\r
765 for (int i = 0; i < sg.sequences.size(); i++)
\r
767 Sequence tmp = (Sequence) sg.sequences.get(i);
\r
768 sb.append(tmp.getSequence(sg.getStartRes(), sg.getEndRes() + 1));
\r
772 sb.append("Something amazing will happen soon");
\r
773 cap.setText(sb.toString());
\r
779 * @return DOCUMENT ME!
\r
781 SequenceGroup getGroup()
\r
783 SequenceGroup sg = ap.av.getSelectionGroup();
\r
784 // this method won't add a new group if it already exists
\r
786 ap.av.alignment.addGroup(sg);
\r
794 * @param e DOCUMENT ME!
\r
796 void sequenceName_actionPerformed(ActionEvent e)
\r
798 String id = sequence.getDisplayId(false, false);
\r
799 String s = (String) JOptionPane.showInternalInputDialog(ap,
\r
800 "Edit sequence name",
\r
801 "Edit sequence name (" + sequence.getName() + ")",
\r
802 JOptionPane.PLAIN_MESSAGE, null, null, id);
\r
806 if (s.indexOf(" ") > -1)
\r
808 JOptionPane.showMessageDialog(ap,
\r
809 "Spaces have been converted to \"_\"",
\r
810 "No spaces allowed in Sequence Name",
\r
811 JOptionPane.WARNING_MESSAGE);
\r
814 s = s.replace(' ', '_');
\r
815 sequence.setName(s);
\r
823 * @param e DOCUMENT ME!
\r
825 void unGroupMenuItem_actionPerformed(ActionEvent e)
\r
827 SequenceGroup sg = ap.av.getSelectionGroup();
\r
828 ap.av.alignment.deleteGroup(sg);
\r
829 ap.av.setSelectionGroup(null);
\r
836 * @param e DOCUMENT ME!
\r
838 void pdbMenuItem_actionPerformed(ActionEvent e)
\r
840 if (sequence.getPDBId() == null)
\r
847 EBIFetchClient ebi = new EBIFetchClient();
\r
848 String[] result = ebi.fetchData("pdb:" + sequence.getPDBId(), null,
\r
851 PDBfile pdb = new PDBfile(result);
\r
853 rotCanvas rc = new rotCanvas(pdb, sequence, ap.av);
\r
854 JInternalFrame frame = new JInternalFrame();
\r
855 frame.setContentPane(rc);
\r
856 Desktop.addInternalFrame(frame,
\r
857 sequence.getName() + " " + sequence.getPDBId(), 400, 400);
\r
859 catch (Exception ex)
\r
861 ex.printStackTrace();
\r
868 * @param e DOCUMENT ME!
\r
870 protected void outline_actionPerformed(ActionEvent e)
\r
872 SequenceGroup sg = getGroup();
\r
873 Color col = JColorChooser.showDialog(this, "Select Outline Colour",
\r
878 sg.setOutlineColour(col);
\r
887 * @param e DOCUMENT ME!
\r
889 public void showBoxes_actionPerformed(ActionEvent e)
\r
891 getGroup().setDisplayBoxes(showBoxes.isSelected());
\r
898 * @param e DOCUMENT ME!
\r
900 public void showText_actionPerformed(ActionEvent e)
\r
902 getGroup().setDisplayText(showText.isSelected());
\r
909 * @param e DOCUMENT ME!
\r
911 public void showColourText_actionPerformed(ActionEvent e)
\r
913 getGroup().setColourText(showColourText.isSelected());
\r
917 public void showLink(String url)
\r
921 jalview.util.BrowserLauncher.openURL(url);
\r
923 catch (Exception ex)
\r
925 JOptionPane.showInternalMessageDialog(Desktop.desktop,
\r
926 "Unixers: Couldn't find default web browser."
\r
927 +"\nAdd the full path to your browser in Preferences.",
\r
928 "Web browser not found", JOptionPane.WARNING_MESSAGE );
\r
931 ex.printStackTrace();
\r