--- jsampler/trunk/src/org/jsampler/view/fantasia/HelpAboutDlg.java 2007/10/15 20:55:33 1445 +++ jsampler/trunk/src/org/jsampler/view/fantasia/HelpAboutDlg.java 2008/12/24 17:29:47 1818 @@ -1,7 +1,7 @@ /* * JSampler - a java front-end for LinuxSampler * - * Copyright (C) 2005-2007 Grigor Iliev + * Copyright (C) 2005-2008 Grigor Iliev * * This file is part of JSampler. * @@ -23,7 +23,6 @@ package org.jsampler.view.fantasia; import java.awt.Color; -import java.awt.Desktop; import java.awt.Dialog; import java.awt.Dimension; import java.awt.Frame; @@ -34,7 +33,6 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.net.URI; import java.net.URL; import javax.swing.BorderFactory; @@ -48,10 +46,9 @@ import javax.swing.JTabbedPane; import net.sf.juife.InformationDialog; -import net.sf.juife.JuifeUtils; import net.sf.juife.LinkButton; -import org.jsampler.HF; +import org.jsampler.view.std.StdUtils; import org.jvnet.substance.SubstanceLookAndFeel; @@ -63,7 +60,7 @@ */ public class HelpAboutDlg extends InformationDialog { private JLabel lProductName = - new JLabel("\nFantasia (version 0.7a)"); + new JLabel("\nJSampler Fantasia (version 0.8a cvs_6)"); private JLabel lAuthor = new JLabel(i18n.getLabel("HelpAboutDlg.lAuthor")); private LinkButton btnAuthor = new Lnkbutton(i18n.getLabel("HelpAboutDlg.btnAuthor")); @@ -117,7 +114,7 @@ btnAuthor.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - browse("http://www.grigoriliev.com"); + StdUtils.browse("http://www.grigoriliev.com"); } }); @@ -213,7 +210,7 @@ btn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - browse("http://swingx.dev.java.net/"); + StdUtils.browse("http://swingx.dev.java.net/"); } }); @@ -227,7 +224,7 @@ btn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - browse("http://substance.dev.java.net/"); + StdUtils.browse("http://substance.dev.java.net/"); } }); @@ -240,7 +237,7 @@ btn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - browse("http://sourceforge.net/projects/jlscp/"); + StdUtils.browse("http://sourceforge.net/projects/jlscp/"); } }); @@ -253,7 +250,7 @@ btn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - browse("http://substance-swingx.dev.java.net/"); + StdUtils.browse("http://substance-swingx.dev.java.net/"); } }); @@ -266,7 +263,7 @@ btn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - browse("http://sourceforge.net/projects/juife/"); + StdUtils.browse("http://sourceforge.net/projects/juife/"); } }); @@ -289,33 +286,6 @@ new LicenseDlg(this, license).setVisible(true); } - 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(); } - } - class ContactInfoPane extends JPanel { private JLabel lAuthorEmail = new JLabel(i18n.getLabel("HelpAboutDlg.lAuthorEmail")); @@ -326,6 +296,12 @@ private Lnkbutton btnLSWebsite = new Lnkbutton("www.linuxsampler.org"); private Lnkbutton btnJSWebsite = new Lnkbutton("sf.net/projects/jsampler"); + private Button btnDocumentation = + new Button(i18n.getButtonLabel("HelpAboutDlg.btnDocumentation")); + + private Button btnLSDevelopers = + new Button(i18n.getButtonLabel("HelpAboutDlg.btnLSDevelopers")); + private Button btnLSMailingList = new Button(i18n.getButtonLabel("HelpAboutDlg.btnLSMailingList")); @@ -375,6 +351,17 @@ c.gridwidth = 2; c.insets = new Insets(12, 0, 0, 0); c.anchor = GridBagConstraints.CENTER; + gridbag.setConstraints(btnDocumentation, c); + add(btnDocumentation); + + c.gridx = 0; + c.gridy = 4; + c.insets = new Insets(6, 0, 0, 0); + gridbag.setConstraints(btnLSDevelopers, c); + add(btnLSDevelopers); + + c.gridx = 0; + c.gridy = 5; gridbag.setConstraints(btnLSMailingList, c); add(btnLSMailingList); @@ -385,28 +372,42 @@ btnAuthorEmail.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - browse("mailto:grigor@grigoriliev.com"); + StdUtils.browse("mailto:grigor@grigoriliev.com"); } }); btnLSWebsite.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - browse("http://www.linuxsampler.org"); + StdUtils.browse("http://www.linuxsampler.org"); } }); btnJSWebsite.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - browse("http://sf.net/projects/jsampler/"); + StdUtils.browse("http://sf.net/projects/jsampler/"); + } + }); + + btnDocumentation.addActionListener(new ActionListener() { + public void + actionPerformed(ActionEvent e) { + StdUtils.browse("http://www.linuxsampler.org/documentation.html"); + } + }); + + btnLSDevelopers.addActionListener(new ActionListener() { + public void + actionPerformed(ActionEvent e) { + StdUtils.browse("http://www.linuxsampler.org/developers.html"); } }); btnLSMailingList.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - browse("http://lists.sourceforge.net/lists/listinfo/linuxsampler-devel"); + StdUtils.browse("http://lists.sourceforge.net/lists/listinfo/linuxsampler-devel"); } }); }