Package org.htmlunit
Interface WebWindowListener
-
- All Known Implementing Classes:
WebWindowAdapter
public interface WebWindowListener
A listener for WebWindowEvent's.This listener informs when a new window is opened, when the content of a window changes or when a window is closed.
Caution: The WebClient creates (and opens) the initial window as part of the construction process. This implies, the initial window is already open at the time you attach this listener. Therefore you will receive no open event for this.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
webWindowClosed(WebWindowEvent event)
A web window has been closed.void
webWindowContentChanged(WebWindowEvent event)
The contents of a web window has been changed.void
webWindowOpened(WebWindowEvent event)
A web window has been opened.
-
-
-
Method Detail
-
webWindowOpened
void webWindowOpened(WebWindowEvent event)
A web window has been opened.Caution: the
WebClient.getCurrentWindow()
might be not updated so far. This usually takes place AFTER the event was processed- Parameters:
event
- the event (the oldPage and newPage properties will benull
because the event is generated after the window is opened but before the content is loaded)
-
webWindowContentChanged
void webWindowContentChanged(WebWindowEvent event)
The contents of a web window has been changed.- Parameters:
event
- the event
-
webWindowClosed
void webWindowClosed(WebWindowEvent event)
A web window has been closed. Closing the last window of the WebClient will automatically open a new one. You will receive an additional open event in this case.- Parameters:
event
- the event
-
-