com.jniwrapper.win32.ie.dom
Interface HTMLDocument

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

public interface HTMLDocument
extends org.w3c.dom.Document

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_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.util.List getAnchors()
          Returns all anchor elements in the document.
 HTMLElement getBody()
          Returns body 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.util.List getForms()
          Returns all form elements in the document.
 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.List getImages()
          Returns all image elements in the document.
 java.util.Date getLastModified()
          Returns last time of the document modification.
 java.util.List getLinks()
          Returns all image and image area elements in the document.
 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.
 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.
 
Methods inherited from interface org.w3c.dom.Document
createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, importNode
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Method Detail

getTitle

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

Returns:
document title

setFontSize

public void setFontSize(FontSize fontSize)
Sets document font size.

Parameters:
fontSize - font size

getActiveElement

public HTMLElement getActiveElement()
Returns document active element.

Returns:
document active element

setCookies

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

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

getCookies

public java.util.Set getCookies()
Returns cookies.

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

addWindowEventListener

public 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

public 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

public HTMLElement getHead()
Returns head element.

Returns:
head element

getBody

public HTMLElement getBody()
Returns body element.

Returns:
body element

getAnchors

public java.util.List getAnchors()
Returns all anchor elements in the document.

Returns:
list of anchor elements

getForms

public java.util.List getForms()
Returns all form elements in the document.

Returns:
list of form elements.

getFrames

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

Returns:
list of frame elements.

getImages

public java.util.List getImages()
Returns all image elements in the document.

Returns:
list of image elements.

getLinks

public java.util.List getLinks()
Returns all image and image area elements in the document.

Returns:
list of image and image area elements.

getVerticalScrollPosition

public int getVerticalScrollPosition()
Returns vertical scroll position in pixels.

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

getHorisontalScrollPosition

public int getHorisontalScrollPosition()
Returns horisontal scroll position in pixels.

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

scrollVertical

public 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

public 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

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

Returns:
maximum scroll position for vertical scrolling.

getScrollWidth

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

Returns:
maximum scroll position for horisontal scrolling.

getLastModified

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

Returns:
last time of the document modification.

getDocumentPeer

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

Returns:
IHTMLDocument2 COM interface pointer

getCharset

public 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

public 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

isDesignMode

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

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

dispose

public void dispose()
Disposes all resources.