com.jniwrapper.win32.ie.event
Class NavigationEventAdapter

java.lang.Object
  extended by com.jniwrapper.win32.ie.event.NavigationEventAdapter
All Implemented Interfaces:
NavigationEventListener, java.util.EventListener

public abstract class NavigationEventAdapter
extends java.lang.Object
implements NavigationEventListener

An abstract adapter class for receiving navigation events.


Constructor Summary
NavigationEventAdapter()
           
 
Method Summary
 void documentCompleted(WebBrowser webBrowser, java.lang.String url)
          Fires when a document has been completely loaded and initialized.
 void downloadBegin()
          Fires when a navigation operation is beginning.
 void downloadCompleted()
          Fires when a navigation operation finishes, is halted, or fails.
 void entireDocumentCompleted(WebBrowser webBrowser, java.lang.String url)
          Fires when a document has been completely loaded and initialized.
 void navigationCompleted(WebBrowser webBrowser, java.lang.String url)
          Invoked when navigation operation has been completed.
 void onRefresh()
          Fires when the web page that is currently displayed is refreshed.
 void progressChanged(int progress, int progressMax)
          Invoked when the progress of download operation has been updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigationEventAdapter

public NavigationEventAdapter()
Method Detail

documentCompleted

public void documentCompleted(WebBrowser webBrowser,
                              java.lang.String url)
Description copied from interface: NavigationEventListener
Fires when a document has been completely loaded and initialized.

- In pages with no frames or where multiple frames are loaded, this event fires once after loading is complete.
- In pages where multiple frames are loaded, this event fires for each frame where the downloadBegin event has fired.

The value of the URL parameter might not match the URL that was originally given to the WebBrowser Control. One possible reason for this is that the URL might be converted to a qualified form. For example, if an application specified a URL of www.teamdev.com in a call to the WebBrowser.navigate method, then the URL passed into this event is http://www.teamdev.com/. In addition, if the server has redirected the browser to a different URL, the redirected URL is passed into the URL parameter.

The WebBrowser Control fires this event when the document has completely loaded and the ReadyState property has changed to ReadyState.READYSTATE_COMPLETE.

Specified by:
documentCompleted in interface NavigationEventListener
Parameters:
webBrowser - the browser object in which this event is fired.
url - url of loaded document

downloadBegin

public void downloadBegin()
Description copied from interface: NavigationEventListener
Fires when a navigation operation is beginning.

This event is fired shortly after the WebBrowserEventsHandler.beforeNavigate event, unless the navigation is canceled. Any animation or "busy" indication that the container needs to display should be connected to this event.

Each downloadBegin event will have a corresponding downloadCompleted event.

Specified by:
downloadBegin in interface NavigationEventListener

downloadCompleted

public void downloadCompleted()
Description copied from interface: NavigationEventListener
Fires when a navigation operation finishes, is halted, or fails.

Unlike navigationCompleted, which are fired only when a URL is successfully navigated to, this event is always fired after a navigation starts. Any animation or "busy" indication that the container needs to display should be connected to this event.

Each downloadBegin event will have a corresponding downloadCompleted event.

Specified by:
downloadCompleted in interface NavigationEventListener

onRefresh

public void onRefresh()
Description copied from interface: NavigationEventListener
Fires when the web page that is currently displayed is refreshed. For example when a user is clicking the Refresh button or pressing F5 in Windows Internet Explorer.

Specified by:
onRefresh in interface NavigationEventListener

entireDocumentCompleted

public void entireDocumentCompleted(WebBrowser webBrowser,
                                    java.lang.String url)
Description copied from interface: NavigationEventListener
Fires when a document has been completely loaded and initialized. In pages with no frames or where multiple frames are loaded, this event fires once after loading is complete.

The value of the URL parameter might not match the URL that was originally given to the WebBrowser Control. One possible reason for this is that the URL might be converted to a qualified form. For example, if an application specified a URL of www.teamdev.com in a call to the WebBrowser.navigate method, then the URL passed into this event is http://www.teamdev.com/. In addition, if the server has redirected the browser to a different URL, the redirected URL is passed into the URL parameter.

The WebBrowser Control fires this event when the document has completely loaded and the ReadyState property has changed to ReadyState.READYSTATE_COMPLETE.

Specified by:
entireDocumentCompleted in interface NavigationEventListener
Parameters:
webBrowser - the browser object in which this event is fired.
url - url of loaded document

navigationCompleted

public void navigationCompleted(WebBrowser webBrowser,
                                java.lang.String url)
Description copied from interface: NavigationEventListener
Invoked when navigation operation has been completed.

Internet Explorer 6: this method invoked after first navigation only.

Specified by:
navigationCompleted in interface NavigationEventListener
Parameters:
webBrowser - the browser object in which this event is fired.
url - url of loaded document

progressChanged

public void progressChanged(int progress,
                            int progressMax)
Description copied from interface: NavigationEventListener
Invoked when the progress of download operation has been updated.

Specified by:
progressChanged in interface NavigationEventListener
Parameters:
progress - value that specifies current progress, or -1 when download is completed
progressMax - maximum progress value