com.teamdev.jxbrowser.dom
Interface DOMDocument

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

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

Represents an HTML document with additional methods that standard HTMLDocument doesn't provide.


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
 org.w3c.dom.Element getActiveElement()
          Returns the element that has the focus when the parent document has focus.
 org.w3c.dom.Element getElementFromPoint(int x, int y)
          Returns the element for the specified x and y coordinate.
 org.w3c.dom.Element getHead()
          Returns document head element.
 int getHorizontalScrollPosition()
          Returns horizontal scroll position in pixels.
 int getScrollHeight()
          Return maximum scroll position for vertical scrolling.
 int getScrollWidth()
          Return maximum scroll position for horizontal scrolling.
 int getVerticalScrollPosition()
          Returns vertical scroll position in pixels.
 void scrollHorizontal(int pos)
          Scrolls document horizontally.
 void scrollVertical(int pos)
          Scrolls document vertically.
 
Methods inherited from interface org.w3c.dom.html.HTMLDocument
close, getAnchors, getApplets, getBody, getCookie, getDomain, getElementsByName, getForms, getImages, getLinks, getReferrer, getTitle, getURL, open, setBody, setCookie, setTitle, 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

getHead

org.w3c.dom.Element getHead()
Returns document head element.

Returns:
head element

getVerticalScrollPosition

int getVerticalScrollPosition()
Returns vertical scroll position in pixels.

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

getHorizontalScrollPosition

int getHorizontalScrollPosition()
Returns horizontal 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

scrollHorizontal

void scrollHorizontal(int pos)
Scrolls document horizontally.

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 horizontal scrolling.

Returns:
maximum scroll position for horizontal scrolling.

getElementFromPoint

org.w3c.dom.Element getElementFromPoint(int x,
                                        int y)
Returns the element for the specified x and 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.

This method returns null if either coordinate is negative, or if the specified point lies outside the visible bounds of the document.

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.

getActiveElement

org.w3c.dom.Element getActiveElement()
Returns the element that has the focus when the parent document has focus.

The active element retains focus in the parent document even when focus is shifted from the parent to another application. If the focus returns to the parent document, focus also returns to the same active element.

Returns:
the element that has the focus or null.