com.webrenderer.event
Class JavascriptAdapter

java.lang.Object
  extended bycom.webrenderer.event.JavascriptAdapter
All Implemented Interfaces:
java.util.EventListener, JavascriptListener

public abstract class JavascriptAdapter
extends java.lang.Object
implements JavascriptListener

An abstract adapter class for receiving Javascript events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a JavascriptEvent listener and override the methods for the events of interest. (If you implement the JavascriptListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a browser using the browser's addJavascriptListener method. When a Javascript event occurs, the relevant method in the listener object is invoked and the JavascriptEvent is passed to it.


Constructor Summary
JavascriptAdapter()
           
 
Method Summary
 void onJavascriptDialog(JavascriptEvent e)
          Invoked when an IE Javascript error dialog should be shown.
 void onJavascriptStatusChange(JavascriptEvent e)
          Invoked when the Javascript changes the status bar in a browser.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavascriptAdapter

public JavascriptAdapter()
Method Detail

onJavascriptStatusChange

public void onJavascriptStatusChange(JavascriptEvent e)
Description copied from interface: JavascriptListener
Invoked when the Javascript changes the status bar in a browser.

Specified by:
onJavascriptStatusChange in interface JavascriptListener

onJavascriptDialog

public void onJavascriptDialog(JavascriptEvent e)
Description copied from interface: JavascriptListener
Invoked when an IE Javascript error dialog should be shown.
This can be stopped by calling:e.blockDialog()

Specified by:
onJavascriptDialog in interface JavascriptListener