com.gargoylesoftware.htmlunit
Class WebWindowImpl

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.WebWindowImpl
All Implemented Interfaces:
WebWindow
Direct Known Subclasses:
FrameWindow, TopLevelWindow

public abstract class WebWindowImpl
extends java.lang.Object
implements WebWindow

INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Base class for common WebWindow functionality. While public, this class is not exposed in any other places of the API. Internally we can cast to this class when we need access to functionality that is not present in WebWindow

Version:
$Revision: 1.3 $
Author:
Brad Clarke, David K. Taylor, Ahmed Ashour

Constructor Summary
WebWindowImpl(WebClient webClient)
 Creates a window and associates it with the client
 
Method Summary
 void addChildWindow(FrameWindow child)
 INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
 Page getEnclosedPage()
 Return the currently loaded page or null if no page has been loaded.
 java.lang.String getName()
 Return the name of this window.
 java.lang.Object getScriptObject()
 INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
 ThreadManager getThreadManager()
 INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
 WebClient getWebClient()
 Return the web client that "owns" this window.
 void setEnclosedPage(Page page)
 Set the currently loaded page.
 void setName(java.lang.String name)
 Set the name of this window.
 void setScriptObject(java.lang.Object scriptObject)
 INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.gargoylesoftware.htmlunit.WebWindow
getParentWindow, getTopWindow
 

Constructor Detail

WebWindowImpl

public WebWindowImpl(WebClient webClient)
Creates a window and associates it with the client

Parameters:
webClient - The web client that "owns" this window.
Method Detail

addChildWindow

public void addChildWindow(FrameWindow child)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Adds a child to this window, for shutdown purposes.

Parameters:
child - The child window to associate with this window.

getEnclosedPage

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

Specified by:
getEnclosedPage in interface WebWindow
Returns:
The currently loaded page or null if no page has been loaded.

getName

public java.lang.String getName()
Return the name of this window.

Specified by:
getName in interface WebWindow
Returns:
The name of this window.

getScriptObject

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

Specified by:
getScriptObject in interface WebWindow
Returns:
The javascript object that corresponds to this element.

getThreadManager

public 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.

Specified by:
getThreadManager in interface WebWindow
Returns:
The ThreadManager for this WebWindow

getWebClient

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

Specified by:
getWebClient in interface WebWindow
Returns:
The web client or null if this window has been closed.

setEnclosedPage

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

Specified by:
setEnclosedPage in interface WebWindow
Parameters:
page - The new page or null if there is no page (ie empty window)

setName

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

Specified by:
setName in interface WebWindow
Parameters:
name - The new window name.

setScriptObject

public void setScriptObject(java.lang.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.

Specified by:
setScriptObject in interface WebWindow
Parameters:
scriptObject - The javascript object.


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