com.gargoylesoftware.htmlunit
Class TopLevelWindow

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.WebWindowImpl
      extended by com.gargoylesoftware.htmlunit.TopLevelWindow
All Implemented Interfaces:
WebWindow, java.io.Serializable

public class TopLevelWindow
extends WebWindowImpl
implements java.io.Serializable

A window representing a top level browser window.

Version:
$Revision: 1.3 $
Author:
Mike Bowler, David K. Taylor, David D. Kilzer, Ahmed Ashour
See Also:
Serialized Form

Constructor Summary
TopLevelWindow(java.lang.String name, WebClient webClient)
 Create an instance.
 
Method Summary
 void close()
 Close this window.
 WebWindow getOpener()
 Return the opener property.
 WebWindow getParentWindow()
 Return the window that contains this window. Since this is a top level window, return this window.
 WebWindow getTopWindow()
 Return the top level window that contains this window. Since this is a top level window, return this window.
 void setOpener(WebWindow opener)
 Set the opener property.
 java.lang.String toString()
 Return a string representation of this object
 
Methods inherited from class com.gargoylesoftware.htmlunit.WebWindowImpl
addChildWindow, getEnclosedPage, getName, getScriptObject, getThreadManager, getWebClient, setEnclosedPage, setName, setScriptObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TopLevelWindow

public TopLevelWindow(java.lang.String name,
                      WebClient webClient)
Create an instance.

Parameters:
name - The name of the new window
webClient - The web client that "owns" this window.
Method Detail

close

public void close()
Close this window.


getOpener

public WebWindow getOpener()
Return the opener property. This is the WebWindow that caused this new window to be opened.

Returns:
The opener

getParentWindow

public WebWindow getParentWindow()
Return the window that contains this window. If this is a top level window, then return this window. Since this is a top level window, return this window.

Specified by:
getParentWindow in interface WebWindow
Returns:
The parent window or this window if there is no parent.

getTopWindow

public WebWindow getTopWindow()
Return the top level window that contains this window. If this is a top level window, then return this window. Since this is a top level window, return this window.

Specified by:
getTopWindow in interface WebWindow
Returns:
The top level window that contains this window or this window if there is no parent.

setOpener

public void setOpener(WebWindow opener)
Set the opener property. This is the WebWindow that caused this new window to be opened.

Parameters:
opener - The new opener

toString

public java.lang.String toString()
Return a string representation of this object

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.