com.jniwrapper.win32.ie.dom
Interface HTMLDocument

All Superinterfaces:
org.w3c.dom.Document, org.w3c.dom.html.HTMLDocument, org.w3c.dom.Node

public interface HTMLDocument
extends org.w3c.dom.html.HTMLDocument

This class represents HTML document.


Field Summary
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Method Summary
 void addWindowEventListener(java.lang.String eventName, org.w3c.dom.events.EventListener eventlistener)
          Adds listener to the document window.
 void dispose()
          Disposes all resources.
 HTMLElement getActiveElement()
          Returns document active element.
 java.lang.String getCharset()
          Returns the string that represents a character set used to encode the document.
 java.util.Set getCookies()
          Returns cookies.
 java.lang.Object getDocumentPeer()
          Returns document native peer.
 java.lang.String getDomain()
          The domain name of the server that served the document, or null if the server cannot be identified by a domain name.
 HTMLElement getElementFromPoint(int x, int y)
          Returns the element for the specified x coordinate and the specified y coordinate.
 org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
          Gets a collection of objects based on the value of the NAME or ID attribute.
 java.util.List getFrames()
          Returns all frame elements in the document.
 HTMLElement getHead()
          Returns head element.
 int getHorisontalScrollPosition()
          Returns horisontal scroll position in pixels.
 java.util.Date getLastModified()
          Returns last time of the document modification.
 java.lang.String getReferrer()
          Returns the URI of the page that linked to this page.
 int getScrollHeight()
          Return maximum scroll position for vertical scrolling.
 int getScrollWidth()
          Return maximum scroll position for horisontal scrolling.
 java.lang.String getTitle()
          Returns document title.
 java.lang.String getURL()
          Returns the URI of the page that linked to this page.
 int getVerticalScrollPosition()
          Returns vertical scroll position in pixels.
 boolean isDesignMode()
          Returns true if document in the design mode.
 void removeWindowEventListener(java.lang.String eventName, org.w3c.dom.events.EventListener eventlistener)
          Removes listener from the document window.
 void scrollHorisontal(int pos)
          Scrolls document horisontally.
 void scrollVertical(int pos)
          Scrolls document vertically.
 void setCookies(java.util.Set cookies)
          Sets cookies.
 void setDesignMode(boolean isDesign)
          Switch the document mode: from view to design and otherwise.
 void setFontSize(FontSize fontSize)
          Sets document font size.
 void setTitle(java.lang.String title)
          Sets the title of a document as specified by the TITLE element in the head of the document.
 
Methods inherited from interface org.w3c.dom.html.HTMLDocument
close, getAnchors, getApplets, getBody, getCookie, getForms, getImages, getLinks, open, setBody, setCookie, write, writeln
 
Methods inherited from interface org.w3c.dom.Document
adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, normalizeDocument, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersion
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Method Detail

getTitle

java.lang.String getTitle()
Returns document title.

Specified by:
getTitle in interface org.w3c.dom.html.HTMLDocument
Returns:
document title

setTitle

void setTitle(java.lang.String title)
Sets the title of a document as specified by the TITLE element in the head of the document.

Specified by:
setTitle in interface org.w3c.dom.html.HTMLDocument
Parameters:
title - the string that represents a document title.

getURL

java.lang.String getURL()
Returns the URI of the page that linked to this page. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark).

Specified by:
getURL in interface org.w3c.dom.html.HTMLDocument
Returns:
the URI of the page.

getReferrer

java.lang.String getReferrer()
Returns the URI of the page that linked to this page. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark).

Specified by:
getReferrer in interface org.w3c.dom.html.HTMLDocument
Returns:
Returns the URI of the page that linked to this page.

getDomain

java.lang.String getDomain()
The domain name of the server that served the document, or null if the server cannot be identified by a domain name.

Specified by:
getDomain in interface org.w3c.dom.html.HTMLDocument
Returns:
the domain name of the server.

setFontSize

void setFontSize(FontSize fontSize)
Sets document font size.

Parameters:
fontSize - font size

getActiveElement

HTMLElement getActiveElement()
Returns document active element.

Returns:
document active element

setCookies

void setCookies(java.util.Set cookies)
Sets cookies.

Parameters:
cookies - java.util.Set of Cookie objects

getCookies

java.util.Set getCookies()
Returns cookies.

Returns:
cookies as java.util.Set of Cookie objects.

addWindowEventListener

void addWindowEventListener(java.lang.String eventName,
                            org.w3c.dom.events.EventListener eventlistener)
Adds listener to the document window.

Parameters:
eventName - event name
eventlistener - listener

removeWindowEventListener

void removeWindowEventListener(java.lang.String eventName,
                               org.w3c.dom.events.EventListener eventlistener)
Removes listener from the document window.

Parameters:
eventName - event name
eventlistener - listener

getHead

HTMLElement getHead()
Returns head element.

Returns:
head element

getFrames

java.util.List getFrames()
Returns all frame elements in the document.

Returns:
list of frame elements.

getVerticalScrollPosition

int getVerticalScrollPosition()
Returns vertical scroll position in pixels.

Returns:
number of pixels in HTML document above top edge of browser window.

getHorisontalScrollPosition

int getHorisontalScrollPosition()
Returns horisontal scroll position in pixels.

Returns:
number of pixels in HTML document under left edge of browser window.

scrollVertical

void scrollVertical(int pos)
Scrolls document vertically.

Parameters:
pos - position to scroll
Throws:
java.lang.IllegalArgumentException - if position negative or more that maximum allowed scroll position

scrollHorisontal

void scrollHorisontal(int pos)
Scrolls document horisontally.

Parameters:
pos - position to scroll
Throws:
java.lang.IllegalArgumentException - if position negative or more that maximum allowed scroll position

getScrollHeight

int getScrollHeight()
Return maximum scroll position for vertical scrolling.

Returns:
maximum scroll position for vertical scrolling.

getScrollWidth

int getScrollWidth()
Return maximum scroll position for horisontal scrolling.

Returns:
maximum scroll position for horisontal scrolling.

getLastModified

java.util.Date getLastModified()
Returns last time of the document modification.

Returns:
last time of the document modification.

getDocumentPeer

java.lang.Object getDocumentPeer()
Returns document native peer.

Returns:
IHTMLDocument2 COM interface pointer

getCharset

java.lang.String getCharset()
Returns the string that represents a character set used to encode the document. In case of the document has no character set, then this method returns null.

Returns:
the character set used to encode the document.

setDesignMode

void setDesignMode(boolean isDesign)
Switch the document mode: from view to design and otherwise.

Parameters:
isDesign - if true then switch to design mode else switch to view mode

getElementsByName

org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
Gets a collection of objects based on the value of the NAME or ID attribute.

Specified by:
getElementsByName in interface org.w3c.dom.html.HTMLDocument
Parameters:
elementName - a string that specifies the value of a NAME attribute.
Returns:
all elements in the document that have the specified NAME attribute or ID attribute value are returned.

getElementFromPoint

HTMLElement getElementFromPoint(int x,
                                int y)
Returns the element for the specified x coordinate and the specified y coordinate.

Coordinates are supplied in client coordinates. The upper-left corner of the client area is (0,0). The object or element located at position (x, y) must support and respond to mouse events.

Parameters:
x - specifies the X-offset, in pixels.
y - specifies the Y-offset, in pixels.
Returns:
the element for the specified x coordinate and the specified y coordinate.

isDesignMode

boolean isDesignMode()
Returns true if document in the design mode.

Returns:
true if document in the design mode else returns false

dispose

void dispose()
Disposes all resources.