Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update links in about box #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 1,9 @@
* 2006-2010 - xcherif - Alexandre Cherif
* 2006-2010 - Max
* 2016 Mar - ynamiki
* 2016 Mar - vlsi - Vladimir Sitnikov
* 2016 Apr - scr34m - Győrvári Gábor
* 2016 Apr - pitterling - Peter Pitterling
* 2016 Nov - vest
* 2017 Mar - ikedaj - Junko IKEDA
* 2017 May - elkrieg
40 changes: 36 additions & 4 deletions src/main/java/net/atomique/ksar/ui/AboutBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 7,16 @@

import net.atomique.ksar.VersionNumber;

import java.awt.Cursor;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JLabel;


public class AboutBox extends javax.swing.JDialog {

Expand Down Expand Up @@ -79,17 88,28 @@ private void initComponents() {

jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.PAGE_AXIS));

urllabel.setText("website: http://sourceforge.net/projects/ksar/");
String url;

url = "https://github.com/vlsi/ksar";
urllabel.setText(String.format("<html> Website : <a href=\"\">%s</a></html>", url ));
urllabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
jPanel2.add(urllabel);
goWebsite(urllabel, url);

authorlabel.setText("Author: xavier cherif");
url = "https://github.com/vlsi/ksar/CONTRIBUTORS.md";
authorlabel.setText(String.format("<html> Authors : <a href=\"\">%s</a></html>", url ));
authorlabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
jPanel2.add(authorlabel);
goWebsite(authorlabel, url);

licencelabel.setText("License: BSD (see LICENCE file)");
licencelabel.setText("License : BSD (see LICENCE file)");
jPanel2.add(licencelabel);

tipslabel.setText("ARS LONGA, VITA BREVIS");
url = "http://sourceforge.net/projects/ksar/";
tipslabel.setText(String.format("<html> Fork of : <a href=\"\">%s</a></html>", url ));
tipslabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
jPanel2.add(tipslabel);
goWebsite(tipslabel, url);

getContentPane().add(jPanel2);

Expand All @@ -112,6 132,18 @@ private void OkButtonActionPerformed(
dispose();
} //GEN-LAST:event_OkButtonActionPerformed

private void goWebsite(JLabel website, String url) {
website.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
try {
Desktop.getDesktop().browse(new URI(url));
} catch (URISyntaxException | IOException ex) {
//It looks like there's a problem
}
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton OkButton;
Expand Down