com.gargoylesoftware.htmlunit
Interface WebWindow

All Known Implementing Classes:
FrameWindow, TopLevelWindow, WebWindowImpl

public interface WebWindow

An interface that represents one window in a browser. It could be a top level window or a frame.

Version:
$Revision: 2132 $
Author:
Mike Bowler, David K. Taylor, David D. Kilzer

Method Summary
 Page getEnclosedPage()
          Return the currently loaded page or null if no page has been loaded.
 String getName()
          Return the name of this window.
 WebWindow getParentWindow()
          Return the window that contains this window.
 Object getScriptObject()
          INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Return the javascript object that corresponds to this element.
 ThreadManager getThreadManager()
          INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Currently exposed here for testing purposes, a better API will be added in the future and this will become a completely internal class.
 WebWindow getTopWindow()
          Return the top level window that contains this window.
 WebClient getWebClient()
          Return the web client that "owns" this window.
 void setEnclosedPage(Page page)
          Set the currently loaded page.
 void setName(String name)
          Set the name of this window.
 void setScriptObject(Object scriptObject)
          INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Set the javascript object that corresponds to this element.
 

Method Detail

getName

String getName()
Return the name of this window.

Returns:
The name of this window.

setName

void setName(String name)
Set the name of this window.

Parameters:
name - The new window name.

getEnclosedPage

Page getEnclosedPage()
Return the currently loaded page or null if no page has been loaded.

Returns:
The currently loaded page or null if no page has been loaded.

setEnclosedPage

void setEnclosedPage(Page page)
Set the currently loaded page.

Parameters:
page - The new page or null if there is no page (ie empty window)

getParentWindow

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

Returns:
The parent window or this window if there is no parent.

getTopWindow

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

Returns:
The top level window that contains this window or this window if there is no parent.

getWebClient

WebClient getWebClient()
Return the web client that "owns" this window.

Returns:
The web client or null if this window has been closed.

setScriptObject

void setScriptObject(Object scriptObject)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Set the javascript object that corresponds to this element. This is not guaranteed to be set even if there is a javascript object for this html element.

Parameters:
scriptObject - The javascript object.

getScriptObject

Object getScriptObject()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Return the javascript object that corresponds to this element.

Returns:
The javascript object that corresponds to this element.

getThreadManager

ThreadManager getThreadManager()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Currently exposed here for testing purposes, a better API will be added in the future and this will become a completely internal class.

Returns:
The ThreadManager for this WebWindow


Copyright © 2002-2010 Gargoyle Software Inc.. All Rights Reserved.