}\r
\r
@Override\r
+ public boolean isHtmlDocument(){\r
+ return true;\r
+ }\r
+\r
+ @Override\r
public String getTitle(){\r
return Messages.getString("about.dialog.title");\r
}\r
\r
@Override\r
public String getMessage(){\r
- String aboutMessage = loadStringFromFile(getClass().getResource("/resources/about.txt"));\r
- \r
+ String aboutMessage = loadStringFromFile(getClass().getResource("/resources/about.html"));\r
+\r
Package p = getClass().getPackage();\r
aboutMessage = aboutMessage.replace("${implementation.version}", p.getImplementationVersion());\r
aboutMessage = aboutMessage.replace("${implementation.vendor}", p.getImplementationVendor());\r
}\r
\r
@Override\r
- public void updatePanel(JPanel panel){\r
+ protected void updatePanel(JPanel panel){\r
JLabel logo = new JLabel(Utility.getIcon("stigmata.logo"));\r
panel.add(logo, BorderLayout.NORTH);\r
}\r
--- /dev/null
+package jp.naist.se.stigmata.ui.swing.actions;\r
+\r
+/*\r
+ * $Id$\r
+ */\r
+\r
+import java.io.IOException;\r
+import java.lang.reflect.Method;\r
+import java.net.URL;\r
+\r
+import javax.swing.JEditorPane;\r
+import javax.swing.event.HyperlinkListener;\r
+import javax.swing.event.HyperlinkEvent;\r
+\r
+/**\r
+ *\r
+ * @author Haruaki Tamada\r
+ * @version $Revision$ $Date$\r
+ */\r
+class LinkFollower implements HyperlinkListener{\r
+ public void hyperlinkUpdate(HyperlinkEvent e){\r
+ JEditorPane text = (JEditorPane)e.getSource();\r
+ if(e.getEventType() == HyperlinkEvent.EventType.ACTIVATED){\r
+ URL url = null;\r
+ try{\r
+ url = e.getURL();\r
+ browse(url);\r
+ } catch(RuntimeException ee){\r
+ throw ee;\r
+ } catch(Exception ee){\r
+ ee.printStackTrace();\r
+ }\r
+ }\r
+ }\r
+\r
+ private void browse(URL url) throws Exception{\r
+ Class c = Class.forName("edu.stanford.ejalbert.BrowserLauncher");\r
+ Object o = c.newInstance();\r
+ Method m = c.getMethod("openURLinBrowser", String.class);\r
+ m.invoke(o, url.toString());\r
+ }\r
+}
\ No newline at end of file
import java.net.URL;\r
\r
import javax.swing.AbstractAction;\r
+import javax.swing.JEditorPane;\r
+import javax.swing.JLabel;\r
import javax.swing.JOptionPane;\r
import javax.swing.JPanel;\r
import javax.swing.JScrollPane;\r
-import javax.swing.JTextArea;\r
\r
/**\r
* \r
\r
public abstract String getMessage();\r
\r
- public void updatePanel(JPanel panel){\r
+ protected void updatePanel(JPanel panel){\r
}\r
\r
public abstract String getTitle();\r
\r
+ public boolean isHtmlDocument(){\r
+ return false;\r
+ }\r
+\r
public void actionPerformed(ActionEvent e){\r
String message = getMessage();\r
+ JPanel panel = new JPanel(new BorderLayout());\r
+ JScrollPane scroll = new JScrollPane();\r
+ String mimeType = "text/plain";\r
+ if(isHtmlDocument()){\r
+ mimeType = "text/html";\r
+ }\r
+ JEditorPane text = new JEditorPane(mimeType, message);\r
+ text.addHyperlinkListener(new LinkFollower());\r
\r
- JTextArea text = new JTextArea(message);\r
text.setEditable(false);\r
text.setCaretPosition(0);\r
- JScrollPane scroll = new JScrollPane();\r
+ text.setBackground(panel.getBackground());\r
scroll.setViewportView(text);\r
\r
- JPanel panel = new JPanel(new BorderLayout());\r
panel.add(scroll, BorderLayout.CENTER);\r
panel.setPreferredSize(new Dimension(500, 300));\r
\r
StringWriter writer = new StringWriter();\r
PrintWriter out = new PrintWriter(writer);\r
while((line = in.readLine()) != null){\r
- out.println(line);\r
+ out.print(line);\r
+ out.println();\r
}\r
out.close();\r
in.close();\r
--- /dev/null
+<html>\r
+<body>\r
+<p>\r
+Stigmata version: ${implementation.version}\r
+</p><p>\r
+Copyright (C) by Haruaki Tamada, Ph.D.,\r
+${implementation.vendor} 2004-2007,\r
+All right reserved.\r
+</p><p>\r
+Stigmata uses ASM library for engineering Java bytecode.<br>\r
+<a href="http://asm.objectweb.org/">http://asm.objectweb.org/</a>\r
+</p><p>\r
+Stigmata uses libraries developed by Apache Software Foundation.<br>\r
+<a href="http://www.apache.org/">http://www.apache.org/</a>\r
+</p><p>\r
+Stigmata uses Jama (Java matrix package) in calculating MDS.<br>\r
+<a href="http://math.nist.gov/javanumerics/jama/">http://math.nist.gov/javanumerics/jama/</a>\r
+</p><p>\r
+Stigmata uses BrowserLauncher2 for showing clicked URL in browser<br>\r
+<a href="http://browserlaunch2.sourceforge.net/">http://browserlaunch2.sourceforge.net/</a>\r
+</p><p>\r
+Stigmata uses icons provided by FAMFAMFAM.<br>\r
+<a href="http://www.famfamfam.com/">http://www.famfamfam.com/</a>\r
+</p><p>\r
+Stigmata version ${implementation.version}, Copyright (C) 2004-2007 Haruaki TAMADA<br>\r
+Stigmata comes with ABSOLUTELY NO WARRANTY; for details\r
+select menu item named License. This is free software, \r
+and you are welcome to redistribute it under certain \r
+conditions; select menu item named License for details.\r
+</p>\r
+</body>\r
+</html>\r
+++ /dev/null
-Stigmata version: ${implementation.version}\r
-\r
-Copyright (C) by ${implementation.vendor} 2004-2007,\r
-All right reserved.\r
-\r
-Stigmata uses ASM library for engineering Java bytecode.\r
-http://asm.objectweb.org/\r
-\r
-Stigmata uses libraries developed by Apache Software Foundation.\r
-http://www.apache.org/\r
-\r
-Stigmata uses Jama (Java matrix package) in calculating MDS.\r
-http://math.nist.gov/javanumerics/jama/\r
-\r
-Stigmata uses icons provided by FAMFAMFAM.\r
-http://www.famfamfam.com/\r
-\r
-Stigmata version ${implementation.version}, Copyright (C) 2006-2007 Haruaki TAMADA\r
-Stigmata comes with ABSOLUTELY NO WARRANTY; for details\r
-select menu item named License. This is free software, \r
-and you are welcome to redistribute it under certain \r
-conditions; select menu item named License for details.\r
----\r
Haruaki Tamada\r
----\r
- 2007-06-11\r
+ 2007-07-08\r
----\r
\r
Download\r
\r
Apache License 2.0\r
\r
- Copyright (C) 2006-2007 Haruaki TAMADA\r
+ Copyright (C) 2006-2007 Haruaki TAMADA, Ph.D.\r
\r
Licensed under the Apache License, Version 2.0 (the "License"); you\r
may not use this file except in compliance with the License. You may\r
\r
*{{{http://math.nist.gov/javanumerics/jama/}Jama}} 1.0.2 (stigmata-1.0.0 or later)\r
\r
+ *{{{http://browserlaunch2.sourceforge.net/}BrowserLauncher2}} 1.2 (stigmata-1.1.0 or later; as needed)\r
+\r
*{{{http://www.junit.org/}JUnit}} 4.1\r
\r
[]\r
\r
**How to install requirements into your Maven local repository\r
\r
- You must install manually Jama, since it does not support Maven 2.\r
-Other libraries can be automatically downloaded by Maven 2.\r
+ If you want to compile stigmata from source codes, you must install\r
+manually Jama and BrowserLauncher2 into your maven2 local repository.\r
+Because maven2 default remote repository do not has them. Other\r
+libraries can be automatically downloaded by Maven2.\r
\r
- type below command.\r
+ type below command for nstalling jar product into your maven2 local\r
+repository.\r
\r
----\r
$ mvn install:install-file \\r
----\r
\r
For example, installing Jama-1.0.2.jar into maven local repository,\r
- copy and paste below command.\r
+copy and paste below command.\r
\r
----\r
$ mvn install:install-file \\r
----\r
Haruaki Tamada\r
----\r
- 2006-12-12\r
+ 2007-07-08\r
----\r
\r
Overview\r
\r
* using {{{http://asm.objectweb.org/}ASM}} instead of {{{http://jakarta.apache.org}BCEL}}.\r
\r
- * introduce birthmarking context\r
+ * introducing birthmarking context\r
+\r
+ * implementing new birthmarks (k-gram, frequency of used classes, frequency of method calls)\r
+\r
+ * new analysis method for extracted birthmarks\r
\r
[]\r
\r
\r
* pairwise birthmark comparison of Java class files,\r
\r
- * Jar file and War file support, and\r
+ * Jar file and War file support,\r
+\r
+ * plug-in architecture for new birthmarks, and\r
\r
- * plug-in architecture for new birthmarks\r
+ * analysis of extracted birthmarks (MDS)\r
\r
Related Tools\r
\r
\r
Contact\r
\r
- Contact us by emal \<harua-t[ at ]is.naist.jp\>.\r
+ Contact us by emal \<harua-t[ at ]is.naist.jp\>\r
\r
*{{{http://sourceforge.jp/developer/sendmessage.php?touser=587}Email sending form}}\r
\r
-[]
\ No newline at end of file
+[]\r