com.gargoylesoftware.htmlunit
Class DialogWindow

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

public class DialogWindow
extends WebWindowImpl

A window opened in JavaScript via either window.showModalDialog or window.showModelessDialog.

Version:
$Revision: 8931 $
Author:
Daniel Gredler, Ronald Brill
See Also:
Serialized Form

Constructor Summary
protected DialogWindow(WebClient webClient, Object arguments)
          Creates a new instance.
 
Method Summary
 void close()
          Closes this window.
 WebWindow getParentWindow()
          Returns the window that contains this window.
 WebWindow getTopWindow()
          Returns the top level window that contains this window.
protected  boolean isJavaScriptInitializationNeeded()
          Returns true if this window needs JavaScript initialization to occur when the enclosed page is set.
 void setScriptObject(Object scriptObject)
          INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Sets the JavaScript object that corresponds to this element.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class com.gargoylesoftware.htmlunit.WebWindowImpl
addChildWindow, destroyChildren, getEnclosedPage, getHistory, getInnerHeight, getInnerWidth, getJobManager, getName, getOuterHeight, getOuterWidth, getScriptObject, getWebClient, isClosed, performRegistration, setClosed, setEnclosedPage, setInnerHeight, setInnerWidth, setJobManager, setName, setOuterHeight, setOuterWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DialogWindow

protected DialogWindow(WebClient webClient,
                       Object arguments)
Creates a new instance.

Parameters:
webClient - the web client that "owns" this window
arguments - the arguments object exposed via the dialogArguments JavaScript property
Method Detail

isJavaScriptInitializationNeeded

protected boolean isJavaScriptInitializationNeeded()
Returns true if this window needs JavaScript initialization to occur when the enclosed page is set.

Specified by:
isJavaScriptInitializationNeeded in class WebWindowImpl
Returns:
true if this window needs JavaScript initialization to occur when the enclosed page is set

getParentWindow

public WebWindow getParentWindow()
Returns 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

public WebWindow getTopWindow()
Returns 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.

setScriptObject

public void setScriptObject(Object scriptObject)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Sets 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
Overrides:
setScriptObject in class WebWindowImpl
Parameters:
scriptObject - the JavaScript object

close

public void close()
Closes this window.


toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Object
Returns:
a string representation of this object


Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.