Mercurial > hg > release > icedtea-web-1.3
changeset 170:2d359e723fef
net.sourceforge.javaws.Main.java updated to find resources in javaws directory and removed code from net.sourceforge.jnlp and hyperlinklistener (useless without permissiopns), about.jnlp all-permitions removed,
author | Jiri Vanek <jvanek@redhat.com> |
---|---|
date | Wed, 16 Mar 2011 12:01:58 +0100 |
parents | 6db9ffeb881b |
children | 4e68f6f489cd |
files | ChangeLog extra/net/sourceforge/javaws/about/Main.java |
diffstat | 2 files changed, 16 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Mar 16 11:46:24 2011 +0100 +++ b/ChangeLog Wed Mar 16 12:01:58 2011 +0100 @@ -1,4 +1,13 @@ -2011-03-02 Jiri Vanek <jvanek@redhat.com> +2011-03-16 Jiri Vanek <jvanek@redhat.com> + + * extras/net/sourceforge/jnlp/about/Main.java: removed hyperlinkUpdate + and HyperlinkListener, as it can not work without all-permissions. + Also all createAndShowGUI was shorten for call from + net.sourceforge.jnlp package. Html resources were redirected to javaws + * netx/net/sourceforge/jnlp/resources/about.jnlp: removed + <all-permissions> + +2011-03-16 Jiri Vanek <jvanek@redhat.com> * netx/net/sourceforge/jnlp/runtime/Boot.java: getAboutFile changed to return path to local about.jnlp instead to inner-from-jar
--- a/extra/net/sourceforge/javaws/about/Main.java Wed Mar 16 11:46:24 2011 +0100 +++ b/extra/net/sourceforge/javaws/about/Main.java Wed Mar 16 12:01:58 2011 +0100 @@ -41,23 +41,18 @@ import java.awt.Dimension; import java.awt.Toolkit; import java.io.IOException; -import java.net.URL; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTabbedPane; import javax.swing.UIManager; -import javax.swing.event.HyperlinkEvent; -import javax.swing.event.HyperlinkListener; + -import net.sourceforge.jnlp.Launcher; -import net.sourceforge.jnlp.runtime.JNLPRuntime; +public class Main extends JPanel { -public class Main extends JPanel implements HyperlinkListener { - - private final String notes = "/net/sourceforge/jnlp/about/resources/notes.html"; - private final String apps = "/net/sourceforge/jnlp/about/resources/applications.html"; - private final String about = "/net/sourceforge/jnlp/about/resources/about.html"; + private final String notes = "/net/sourceforge/javaws/about/resources/notes.html"; + private final String apps = "/net/sourceforge/javaws/about/resources/applications.html"; + private final String about = "/net/sourceforge/javaws/about/resources/about.html"; JTabbedPane tabbedPane; public Main() throws IOException { @@ -67,7 +62,7 @@ HTMLPanel appsPanel = new HTMLPanel(getClass().getResource(apps)); HTMLPanel aboutPanel = new HTMLPanel(getClass().getResource(about)); - appsPanel.pane.addHyperlinkListener(this); + tabbedPane = new JTabbedPane(); @@ -80,7 +75,6 @@ } private static void createAndShowGUI() { - JNLPRuntime.setExitClass(Main.class); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); @@ -119,17 +113,5 @@ }); } - public void hyperlinkUpdate(HyperlinkEvent e) { - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { - URL url = e.getURL(); - Launcher launcher = new Launcher( - JNLPRuntime.getDefaultLaunchHandler()); - try { - launcher.launchBackground(url); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - } }