com.jniwrapper.win32.ie
Interface ParentWindow

All Known Subinterfaces:
WebBrowser
All Known Implementing Classes:
Browser, FrameBrowserSupport, HeadlessBrowser, IEAutomation

public interface ParentWindow

This interface is implemented by objects that have children and need to track children creation without event listeners.

The object starts to record children creation information when its trackChildren() method is called. The getRecentChild() method returns the last created child object.

Note if trackChildren() method is called after child creation then the getRecentChild() returns null.


Method Summary
 WebBrowser getRecentChild()
          Returns recent created child object since last trackChildren() method call.
 void trackChildren()
          Starts to collect information about child object creation.
 WebBrowser waitChildCreation()
          Blocks execution until child is created since last trackChildren() call and returns this child.
 WebBrowser waitChildCreation(java.lang.Runnable operationThatCreatesChild)
          Executes operation specified in the parameter and returns when child created by the operation is opened.
 

Method Detail

trackChildren

void trackChildren()
Starts to collect information about child object creation.


getRecentChild

WebBrowser getRecentChild()
Returns recent created child object since last trackChildren() method call.

Returns:
recent opened child window after the last trackChildren() method call. If there isn't opened windows after this call then returns null.

waitChildCreation

WebBrowser waitChildCreation()
Blocks execution until child is created since last trackChildren() call and returns this child.

In other words, this method waits until getRecentChild() call returns non-null object.

Returns:
recent created child

waitChildCreation

WebBrowser waitChildCreation(java.lang.Runnable operationThatCreatesChild)
Executes operation specified in the parameter and returns when child created by the operation is opened.

Parameters:
operationThatCreatesChild - operation
Returns:
child created by the operation