com.jniwrapper.win32.ie.dom
Class DomFactory

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

public final class DomFactory
extends java.lang.Object

This class creates objects that provide access to DOM structure of HTML document and implement org.w3c.dom interfaces by IDispatch pointers to native peers.

See Also:
Node, Element, NodeList, Document, Text, NamedNodeMap, Attr

Method Summary
 org.w3c.dom.Attr createAttribute(com.jniwrapper.win32.automation.IDispatch attribute)
          Creates object that represents node attribute.
 org.w3c.dom.Node createBestMatch(com.jniwrapper.win32.automation.IDispatch node)
          Creates object that represents node in DOM structure of HTML document.
 org.w3c.dom.Comment createComment(com.jniwrapper.win32.automation.IDispatch node)
           
 HTMLDocument createDocument(com.jniwrapper.win32.automation.IDispatch document)
          Creates object that represents entire HTML document.
 org.w3c.dom.DocumentFragment createDocumentFragment(com.jniwrapper.win32.automation.IDispatch document)
          Creates object that represents HTML document fragment.
 HTMLElement createElement(com.jniwrapper.win32.automation.IDispatch element)
          Creates object that represents tag, comment or text in HTML document.
 java.util.List createElementList(com.jniwrapper.win32.automation.IDispatch nodes)
           
 ScriptErrorEvent createErrorEvent(com.jniwrapper.Parameter[] parameters)
           
 org.w3c.dom.events.Event createEvent(com.jniwrapper.win32.automation.IDispatch event)
          Creates object that represents event in browser.
 HTMLElement createFrame(com.jniwrapper.win32.automation.IDispatch element)
          Creates object that represents HTML frame.
 org.w3c.dom.NamedNodeMap createNamedNodeMap(com.jniwrapper.win32.automation.IDispatch attributes)
          Creates map of DOM nodes that represent DOM node attributes.
 org.w3c.dom.NodeList createNodeList(com.jniwrapper.win32.automation.IDispatch nodes)
          Creates list of DOM nodes.
 org.w3c.dom.Text createTextNode(com.jniwrapper.win32.automation.IDispatch node)
          Creates object that represents text in HTML document.
protected  WebBrowser getBrowser()
          Returns web browser associated with factory.
static DomFactory getInstance(WebBrowser browser)
          Returns instance of factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBrowser

protected WebBrowser getBrowser()
Returns web browser associated with factory.

Returns:
web browser

getInstance

public static DomFactory getInstance(WebBrowser browser)
Returns instance of factory.

Returns:
instance of factory.

createDocument

public HTMLDocument createDocument(com.jniwrapper.win32.automation.IDispatch document)
Creates object that represents entire HTML document.

Parameters:
document - dispatch pointer to native peer
Returns:
DOM node for entire HTML document.

createDocumentFragment

public org.w3c.dom.DocumentFragment createDocumentFragment(com.jniwrapper.win32.automation.IDispatch document)
Creates object that represents HTML document fragment.

Parameters:
document - dispatch pointer to native peer
Returns:
DOM node for entire HTML document.

createElement

public HTMLElement createElement(com.jniwrapper.win32.automation.IDispatch element)
Creates object that represents tag, comment or text in HTML document.

Parameters:
element - dispatch pointer to native peer
Returns:
DOM element for tag, text or comment.

createFrame

public HTMLElement createFrame(com.jniwrapper.win32.automation.IDispatch element)
Creates object that represents HTML frame.

Parameters:
element - dispatch pointer to native peer
Returns:
DOM element for HTML frame.

createNodeList

public org.w3c.dom.NodeList createNodeList(com.jniwrapper.win32.automation.IDispatch nodes)
Creates list of DOM nodes.

Parameters:
nodes - dispatch pointer to native peer
Returns:
list of DOM nodes.

createBestMatch

public org.w3c.dom.Node createBestMatch(com.jniwrapper.win32.automation.IDispatch node)
Creates object that represents node in DOM structure of HTML document.

Parameters:
node - dispatch pointer to native peer
Returns:
DOM node

createTextNode

public org.w3c.dom.Text createTextNode(com.jniwrapper.win32.automation.IDispatch node)
Creates object that represents text in HTML document.

Parameters:
node - dispatch pointer to native peer
Returns:
DOM node for text in HTML document.

createComment

public org.w3c.dom.Comment createComment(com.jniwrapper.win32.automation.IDispatch node)

createNamedNodeMap

public org.w3c.dom.NamedNodeMap createNamedNodeMap(com.jniwrapper.win32.automation.IDispatch attributes)
Creates map of DOM nodes that represent DOM node attributes.

Parameters:
attributes - dispatch pointer to native peer
Returns:
map of DOM nodes for DOM node attributes.

createAttribute

public org.w3c.dom.Attr createAttribute(com.jniwrapper.win32.automation.IDispatch attribute)
Creates object that represents node attribute.

Parameters:
attribute - dispatch pointer to native peer
Returns:
DOM node for node attribute.

createEvent

public org.w3c.dom.events.Event createEvent(com.jniwrapper.win32.automation.IDispatch event)
Creates object that represents event in browser.

Parameters:
event - dispatch pointer to native peer
Returns:
object for event in browser.

createErrorEvent

public ScriptErrorEvent createErrorEvent(com.jniwrapper.Parameter[] parameters)

createElementList

public java.util.List createElementList(com.jniwrapper.win32.automation.IDispatch nodes)