/[svn]/jsampler/trunk/src/org/jsampler/view/fantasia/HelpAboutDlg.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/fantasia/HelpAboutDlg.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1495 by iliev, Mon Oct 15 20:55:33 2007 UTC revision 1496 by iliev, Mon Nov 19 22:22:22 2007 UTC
# Line 52  import net.sf.juife.JuifeUtils; Line 52  import net.sf.juife.JuifeUtils;
52  import net.sf.juife.LinkButton;  import net.sf.juife.LinkButton;
53    
54  import org.jsampler.HF;  import org.jsampler.HF;
55    import org.jsampler.view.std.StdUtils;
56    
57  import org.jvnet.substance.SubstanceLookAndFeel;  import org.jvnet.substance.SubstanceLookAndFeel;
58    
# Line 117  public class HelpAboutDlg extends Inform Line 118  public class HelpAboutDlg extends Inform
118                  btnAuthor.addActionListener(new ActionListener() {                  btnAuthor.addActionListener(new ActionListener() {
119                          public void                          public void
120                          actionPerformed(ActionEvent e) {                          actionPerformed(ActionEvent e) {
121                                  browse("http://www.grigoriliev.com");                                  StdUtils.browse("http://www.grigoriliev.com");
122                          }                          }
123                  });                  });
124                                    
# Line 213  public class HelpAboutDlg extends Inform Line 214  public class HelpAboutDlg extends Inform
214                  btn.addActionListener(new ActionListener() {                  btn.addActionListener(new ActionListener() {
215                          public void                          public void
216                          actionPerformed(ActionEvent e) {                          actionPerformed(ActionEvent e) {
217                                  browse("http://swingx.dev.java.net/");                                  StdUtils.browse("http://swingx.dev.java.net/");
218                          }                          }
219                  });                  });
220                                    
# Line 227  public class HelpAboutDlg extends Inform Line 228  public class HelpAboutDlg extends Inform
228                  btn.addActionListener(new ActionListener() {                  btn.addActionListener(new ActionListener() {
229                          public void                          public void
230                          actionPerformed(ActionEvent e) {                          actionPerformed(ActionEvent e) {
231                                  browse("http://substance.dev.java.net/");                                  StdUtils.browse("http://substance.dev.java.net/");
232                          }                          }
233                  });                  });
234                                    
# Line 240  public class HelpAboutDlg extends Inform Line 241  public class HelpAboutDlg extends Inform
241                  btn.addActionListener(new ActionListener() {                  btn.addActionListener(new ActionListener() {
242                          public void                          public void
243                          actionPerformed(ActionEvent e) {                          actionPerformed(ActionEvent e) {
244                                  browse("http://sourceforge.net/projects/jlscp/");                                  StdUtils.browse("http://sourceforge.net/projects/jlscp/");
245                          }                          }
246                  });                  });
247                                    
# Line 253  public class HelpAboutDlg extends Inform Line 254  public class HelpAboutDlg extends Inform
254                  btn.addActionListener(new ActionListener() {                  btn.addActionListener(new ActionListener() {
255                          public void                          public void
256                          actionPerformed(ActionEvent e) {                          actionPerformed(ActionEvent e) {
257                                  browse("http://substance-swingx.dev.java.net/");                                  StdUtils.browse("http://substance-swingx.dev.java.net/");
258                          }                          }
259                  });                  });
260                                    
# Line 266  public class HelpAboutDlg extends Inform Line 267  public class HelpAboutDlg extends Inform
267                  btn.addActionListener(new ActionListener() {                  btn.addActionListener(new ActionListener() {
268                          public void                          public void
269                          actionPerformed(ActionEvent e) {                          actionPerformed(ActionEvent e) {
270                                  browse("http://sourceforge.net/projects/juife/");                                  StdUtils.browse("http://sourceforge.net/projects/juife/");
271                          }                          }
272                  });                  });
273                                    
# Line 289  public class HelpAboutDlg extends Inform Line 290  public class HelpAboutDlg extends Inform
290                  new LicenseDlg(this, license).setVisible(true);                  new LicenseDlg(this, license).setVisible(true);
291          }          }
292                    
         private boolean  
         checkDesktopSupported() {  
                 if(Desktop.isDesktopSupported()) return true;  
                   
                 HF.showErrorMessage(i18n.getError("HelpAboutDlg.DesktopApiNotSupported"), this);  
                   
                 return false;  
         }  
           
         private void  
         browse(String uri) {  
                 if(!checkDesktopSupported()) return;  
                   
                 try { Desktop.getDesktop().browse(new URI(uri)); }  
                 catch(Exception x) { x.printStackTrace(); }  
         }  
           
         private void  
         mail(String uri) {  
                 if(!checkDesktopSupported()) return;  
                   
                 Desktop desktop = Desktop.getDesktop();  
                   
                 try { Desktop.getDesktop().mail(new URI(uri)); }  
                 catch(Exception x) { x.printStackTrace(); }  
         }  
           
293          class ContactInfoPane extends JPanel {          class ContactInfoPane extends JPanel {
294                  private JLabel lAuthorEmail =                  private JLabel lAuthorEmail =
295                          new JLabel(i18n.getLabel("HelpAboutDlg.lAuthorEmail"));                          new JLabel(i18n.getLabel("HelpAboutDlg.lAuthorEmail"));
# Line 385  public class HelpAboutDlg extends Inform Line 359  public class HelpAboutDlg extends Inform
359                          btnAuthorEmail.addActionListener(new ActionListener() {                          btnAuthorEmail.addActionListener(new ActionListener() {
360                                  public void                                  public void
361                                  actionPerformed(ActionEvent e) {                                  actionPerformed(ActionEvent e) {
362                                          browse("mailto:grigor@grigoriliev.com");                                          StdUtils.browse("mailto:grigor@grigoriliev.com");
363                                  }                                  }
364                          });                          });
365                                    
366                          btnLSWebsite.addActionListener(new ActionListener() {                          btnLSWebsite.addActionListener(new ActionListener() {
367                                  public void                                  public void
368                                  actionPerformed(ActionEvent e) {                                  actionPerformed(ActionEvent e) {
369                                          browse("http://www.linuxsampler.org");                                          StdUtils.browse("http://www.linuxsampler.org");
370                                  }                                  }
371                          });                          });
372                                    
373                          btnJSWebsite.addActionListener(new ActionListener() {                          btnJSWebsite.addActionListener(new ActionListener() {
374                                  public void                                  public void
375                                  actionPerformed(ActionEvent e) {                                  actionPerformed(ActionEvent e) {
376                                          browse("http://sf.net/projects/jsampler/");                                          StdUtils.browse("http://sf.net/projects/jsampler/");
377                                  }                                  }
378                          });                          });
379                                    
380                          btnLSMailingList.addActionListener(new ActionListener() {                          btnLSMailingList.addActionListener(new ActionListener() {
381                                  public void                                  public void
382                                  actionPerformed(ActionEvent e) {                                  actionPerformed(ActionEvent e) {
383                                          browse("http://lists.sourceforge.net/lists/listinfo/linuxsampler-devel");                                          StdUtils.browse("http://lists.sourceforge.net/lists/listinfo/linuxsampler-devel");
384                                  }                                  }
385                          });                          });
386                  }                  }

Legend:
Removed from v.1495  
changed lines
  Added in v.1496

  ViewVC Help
Powered by ViewVC