Interface PromptListener

All Superinterfaces:

public interface PromptListener
extends java.util.EventListener

The listener interface for receiving Prompt events.

The class that is interested in processing a Prompt event implements this interface (and all the methods it contains).

The listener object created from that class is then registered with an IBrowserCanvas using the addPromptListentener method.

This is used to stop showing browser dialogs. The following example shows how to block all dialogs using this listener:

 browser.addPromptListener( new PromptListener() {
     public void onPromptDialog( PromptEvent e ) {
         System.out.println( "Blocking a dialog with type: " + e.getDialogType() );
         e.blockPromptDialog(); //Stops the dialog from being shown

Method Summary
 void onPromptDialog(PromptEvent e)
          Invoked when the browser is about to show a dialog.

Method Detail


void onPromptDialog(PromptEvent e)
Invoked when the browser is about to show a dialog.
For an IMozillaBrowserCanvas this applies to all dialogs.
For an IIEBrowserCanvas this only applies to javascript alert dialogs.