de.betabeans.scroogexhtml
Interface HyperlinkListener

All Superinterfaces:
java.util.EventListener

public interface HyperlinkListener
extends java.util.EventListener

A HyperlinkListener can be used to perform user-defined actions whenever a hyperlink is detected.
Note that the hyperlink listener needs to be activated using the setConvertHyperlinks method.
The current implementation of ScroogeXHTML only detects a generic hyperlink by the text attributes blue and underlined. It is also important to know that the underlined and blue properties will be reset so that they do not interfere with the web page settings for the hyperlink style.
If a hyperlink listener has been added using the addHyperlinkListener() method, each hyperlink text object will be passed to the hyperlink method and can be modified there.


This example adds a "Go To:" to the hyperlink:
 myScroogeXHTML.addHyperlinkListener(new de.betabeans.scroogexhtml.HyperlinkListener() {
   public void hyperlink(ScroogeXHTMLDocText textElement) {
     textElement.setText("Go to: <a href=\"" + textElement.getText() + "\">" + textElement.getText() + "</a>");
   }
 });
 }
 

Author:
Michael Justin
See Also:
ScroogeXHTMLBase.textElementToXHTML(java.lang.String, de.betabeans.scroogexhtml.ScroogeXHTMLDocText), ScroogeXHTMLDocText

Method Summary
 void hyperlink(HyperlinkEvent e)
          Process a hyperlink event
 

Method Detail

hyperlink

public void hyperlink(HyperlinkEvent e)
Process a hyperlink event
Parameters:
e - Description of Parameter