Index: src/lib/com/izforge/izpack/panels/HTMLLicencePanel.java
===================================================================
--- src/lib/com/izforge/izpack/panels/HTMLLicencePanel.java (revision 1167)
+++ src/lib/com/izforge/izpack/panels/HTMLLicencePanel.java (working copy)
@@ -27,8 +27,9 @@
import javax.swing.JEditorPane;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
-import javax.swing.event.HyperlinkEvent;
-import javax.swing.event.HyperlinkListener;
+//import javax.swing.event.HyperlinkEvent;
+//import javax.swing.event.HyperlinkListener;
+import com.izforge.izpack.util.HyperlinkHandler;
import com.izforge.izpack.gui.IzPanelLayout;
import com.izforge.izpack.gui.LabelFactory;
@@ -42,7 +43,7 @@
*
* @author Julien Ponge
*/
-public class HTMLLicencePanel extends IzPanel implements HyperlinkListener, ActionListener
+public class HTMLLicencePanel extends IzPanel implements ActionListener
{
/**
@@ -77,7 +78,7 @@
{
textArea = new JEditorPane();
textArea.setEditable(false);
- textArea.addHyperlinkListener(this);
+ textArea.addHyperlinkListener(new HyperlinkHandler());
JScrollPane scroller = new JScrollPane(textArea);
textArea.setPage(loadLicence());
add(scroller, NEXT_LINE);
@@ -154,18 +155,18 @@
*
* @param e The event.
*/
- public void hyperlinkUpdate(HyperlinkEvent e)
- {
- try
- {
- if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
- textArea.setPage(e.getURL());
- }
- catch (Exception err)
- {
- // TODO: Extend exception handling.
- }
- }
+// public void hyperlinkUpdate(HyperlinkEvent e)
+// {
+// try
+// {
+// if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
+// textArea.setPage(e.getURL());
+// }
+// catch (Exception err)
+// {
+// // TODO: Extend exception handling.
+// }
+// }
/** Called when the panel becomes active. */
public void panelActivate()
Index: src/lib/com/izforge/izpack/panels/UserInputPanel.java
===================================================================
--- src/lib/com/izforge/izpack/panels/UserInputPanel.java (revision 1167)
+++ src/lib/com/izforge/izpack/panels/UserInputPanel.java (working copy)
@@ -67,6 +67,7 @@
import com.izforge.izpack.installer.IzPanel;
import com.izforge.izpack.installer.ResourceManager;
import com.izforge.izpack.rules.RulesEngine;
+import com.izforge.izpack.util.HyperlinkHandler;
import com.izforge.izpack.util.MultiLineLabel;
import com.izforge.izpack.util.OsConstraint;
import com.izforge.izpack.util.OsVersion;
@@ -2216,11 +2217,15 @@
// Not editable, but still selectable.
label.setEditable(false);
+ label.setOpaque(false);
// If html tags are present enable html rendering, otherwise the JTextPane
// looks exactly like MultiLineLabel.
if(description.startsWith("") && description.endsWith(""))
- label.setContentType("text/html");
+ {
+ label.setContentType("text/html");
+ label.addHyperlinkListener(new HyperlinkHandler());
+ }
label.setText(description);
// Background color and font to match the label's.