com.jniwrapper.win32.ie.dom
Class HTMLDialog

java.lang.Object
  extended by com.jniwrapper.win32.ie.dom.HTMLDialog

public class HTMLDialog
extends java.lang.Object

Represents an instance of HTML dialog and provides access to its information.

The dialog object is the special window object created by the window.showModalDialog JavaScript function. In the dialog window, scripts reference the dialog object as the top-level window property. There is no such dialog property in the dialog.


Constructor Summary
HTMLDialog(com.jniwrapper.win32.mshtml.IHTMLDialog peer, com.jniwrapper.win32.mshtml.IHTMLDocument document, com.jniwrapper.win32.automation.OleMessageLoop thread)
          Constructs a new instance of HTMLDialog.
 
Method Summary
 void close()
          Closes the current browser window or HTML Application (HTA) and stops thread in which windows is running.
 org.w3c.dom.html.HTMLDocument getDocument()
          Returns a Document of the currently opened modal dialog window.
 com.jniwrapper.win32.automation.OleMessageLoop getOleMessageLoop()
          Returns a thread in which the corrently opened modal dialog window is running.
 com.jniwrapper.win32.automation.types.Variant getReturnValue()
          Returns the value returned from the modal dialog window.
 void setReturnValue(com.jniwrapper.win32.automation.types.Variant returnValue)
          Sets the value returned from the modal dialog window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLDialog

public HTMLDialog(com.jniwrapper.win32.mshtml.IHTMLDialog peer,
                  com.jniwrapper.win32.mshtml.IHTMLDocument document,
                  com.jniwrapper.win32.automation.OleMessageLoop thread)
Constructs a new instance of HTMLDialog.

Parameters:
peer - The native IHTMLDialog instance.
document - The document of the peer instance.
thread - The thread in which the peer instance is running.
Method Detail

getReturnValue

public com.jniwrapper.win32.automation.types.Variant getReturnValue()
Returns the value returned from the modal dialog window.

Returns:
the value returned from the modal dialog window.
See Also:
setReturnValue(com.jniwrapper.win32.automation.types.Variant)

setReturnValue

public void setReturnValue(com.jniwrapper.win32.automation.types.Variant returnValue)
Sets the value returned from the modal dialog window.

Parameters:
returnValue - The value returned from the modal dialog window.
See Also:
getReturnValue()

close

public void close()
Closes the current browser window or HTML Application (HTA) and stops thread in which windows is running.

Invoking this method closes the application without prompting the user.


getDocument

public org.w3c.dom.html.HTMLDocument getDocument()
Returns a Document of the currently opened modal dialog window. The returned from this method document is already loaded completely and can be used to access any DOM elements on a page.

Returns:
a Document of the currently opened modal dialog window.

getOleMessageLoop

public com.jniwrapper.win32.automation.OleMessageLoop getOleMessageLoop()
Returns a thread in which the corrently opened modal dialog window is running. All COM-related operations with the modal dialog must be invoked in this thread.

Returns:
a thread in which the modal dialog window is running.